lfglabs-dev / api.starknet.quest

starknet.quest rust backend
7 stars 28 forks source link

Integrate Nimbora API for accurate APR calculation #283

Closed Benjtalkshow closed 4 weeks ago

Benjtalkshow commented 1 month ago

Closes #281

Add base APRs for Nimbora

Key Updates:

  1. Introduced an async function fetch_nimbora_data() to pull data from the Nimbora API.
  2. Updated the handler in get_alt_protocol_stats.rs to:
    • Fetch Nimbora data at the start.
    • Process DeFi Spring data as usual.
    • Before returning, update matching strategies with both base APR and incentive APR from Nimbora.
  3. Added error handling to ensure the system continues using just DeFi Spring data if the Nimbora API fails.
  4. Included basic logging to monitor strategy matching between DeFi Spring and Nimbora.
Benjtalkshow commented 4 weeks ago

Hi @Marchand-Nicolas I have made the requested changes