New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saddle apy calc #2295
Saddle apy calc #2295
Conversation
Added a function that returns the current BTC price based on the TBTC/ETH Uniswap pool. The BTC price in USD is required to calculate the APY for the Saddle pool.
Created a wrapper for the LPRewards contract to keep the same API for the diffferent pools(Uniswap, Saddle).
Added a pool field to recognize what kind of pool is. The dapp will support Uniswap and Saddle pool.
The LPRewardsTBTCSaddle was relased in `v.1.6.0`.
This contract is required to fetch how many tokenized BTC is in the Saddle pool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exceptional code 👏
}, | ||
KEEP_ETH: { | ||
contractName: LP_REWARDS_KEEP_ETH_CONTRACT_NAME, | ||
label: "KEEP + ETH", | ||
viewPoolLink: | ||
"https://info.uniswap.org/pair/0xe6f19dab7d43317344282f803f8e8d240708174a", | ||
address: "0xe6f19dab7d43317344282f803f8e8d240708174a", | ||
pool: "UNISWAP", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not important but I think we could extract the "SADDLE" and "UNISWAP" to a new constant like LIQUIDITY_POOL, since the "UNISWAP" is used three times already.
This PR adds support for calculating the APY for the TBTC/Saddle liquidity rewards.