Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

feat(curve): Support child liquidity gauges on Avalanche #442

Merged
merged 2 commits into from
May 17, 2022

Conversation

immasandwich
Copy link
Contributor

Description

  • Curve recently migrated their gauges
  • These gauges can be retrieved from the Curve Child Liquidity Gauge Factory (the term "child" here refers to sidechains/L2s) deployed at 0xabc000d88f23bb45525e447528dbf656a9d55bf5
  • The implementation of these gauges is the ChildLiquidityGauge, which emits CRV tokens and bonus rewards.
    • ROI is calculated using the inflation_rate of CRV and the individual rates of the reward tokens. Sum the rewards for the year and divide by the deposited balance.
    • Reward tokens are retrieved from reward_data by looping through the reward count.
    • The reward balances are retrieved by merging the results of claimable_tokens (for CRV) and claimable_rewards (for bonus tokens)

Checklist

How to test?

Rewards match:
https://avax.curve.fi/pools?see=0x2e146b3ebdebb7e873cc31166657c4e7e6515a30
http://localhost:5001/apps/curve/balances?addresses[]=0x2e146b3ebdebb7e873cc31166657c4e7e6515a30&network=avalanche

@immasandwich immasandwich changed the title Support child liquidity gauges on Avalanche feat(curve): Support child liquidity gauges on Avalanche May 17, 2022
@immasandwich immasandwich merged commit 140f5dc into main May 17, 2022
@immasandwich immasandwich deleted the support-child-liquidity-gauges-on-avalanche branch May 17, 2022 12:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant