> For the complete documentation index, see [llms.txt](https://yieldex.gitbook.io/yieldex-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yieldex.gitbook.io/yieldex-docs/architecture/modules/data-collection.md).

# Data Collection

1. On-schedule calls the protocols APIs (eg AAVE) to get current yield rates and other parameters for stablecoin pools.
2. Saves received data in a local database.

{% @mermaid/diagram content="sequenceDiagram
participant Scheduler as Scheduler<br/>
participant DCM as Data Collection Module
participant OnChainParser as On-chain Parser
participant DB as Database
Scheduler->>DCM: Data collection request
DCM->>OnChainParser: On-chain status request
OnChainParser->>OnChainParser: Query Protocol contracts
OnChainParser-->>DCM: APY Calculation/Aggregated Data
DCM->>DB: Save data to DB
" %}
