# 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
" %}
