Skip to content
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

Merged
merged 10 commits into from Jan 19, 2021
Merged

Saddle apy calc #2295

merged 10 commits into from Jan 19, 2021

Conversation

r-czajkowski
Copy link
Contributor

@r-czajkowski r-czajkowski commented Jan 19, 2021

This PR adds support for calculating the APY for the TBTC/Saddle liquidity rewards.

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.
@r-czajkowski r-czajkowski marked this pull request as ready for review January 19, 2021 19:33
wrrappedToken -> wrappedToken
Copy link
Contributor

@michalsmiarowski michalsmiarowski left a 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",
Copy link
Contributor

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.

@michalsmiarowski michalsmiarowski merged commit 13270d0 into tbtc_saddle_liquidity_rewards Jan 19, 2021
@michalsmiarowski michalsmiarowski deleted the saddle-apy branch January 19, 2021 21:02
@pdyraga pdyraga added this to the token-dashboard/v1.8.0 milestone Jan 19, 2021
@pdyraga pdyraga added the 🗝️ token dashboard Related to KEEP token dashboard label Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗝️ token dashboard Related to KEEP token dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants