-
Notifications
You must be signed in to change notification settings - Fork 19
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
API of 5 Pools of Aura (auraBAL, auraBAL Stable, wstETH, bbaUSD, and rETH) #250
base: master
Are you sure you want to change the base?
Conversation
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.
Good work, thanks! Left a bunch of comments. Looks good in general, but some small stuff to fix before we can merge :)
@@ -39,6 +39,7 @@ const VAULT_CATEGORIES_IDS = { | |||
STABLE_POLYGON: 'STABLE_POLYGON', | |||
CONVEX: 'CONVEX', | |||
MESHSWAP: 'MESHSWAP', | |||
AURA: 'AURA', |
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.
Please also add to VAULT_CATEGORIES_NAMES
, AURA: 'Aura'
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.
Fixed
data/mainnet/addresses.json
Outdated
@@ -1,2453 +1,2488 @@ | |||
{ |
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.
Can you reset this file to the original formatting, so we don't get 5k lines of diff?
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.
Fixed!
data/mainnet/pools.js
Outdated
chain: CHAINS_ID.ETH_MAINNET, | ||
id: 'aura_auraBAL', | ||
type: POOL_TYPES.INCENTIVE, | ||
tradingApyFunction: { |
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.
I don't think there's any trading APY for this pool. AuraBAL has no underlying growth, it's just earning staking rewards in the form of: AURA, BAL and bb-a-usd. Right?
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.
Yes! All the rewards should be calculated in standard apy.
data/mainnet/tokens.js
Outdated
@@ -8854,4 +8854,151 @@ module.exports = { | |||
rowTooltip: 'Out of Range', | |||
disableAutoSwap: true, | |||
}, | |||
aura_auraBAL: { |
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.
Move these entries up to the top of the file, just below the wETH entry. So they show up at the top of the website
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.
Fixed!
data/mainnet/tokens.js
Outdated
category: [ | ||
VAULT_CATEGORIES_IDS.AURA, | ||
VAULT_CATEGORIES_IDS.BALANCER, | ||
VAULT_CATEGORIES_IDS.ETH20, |
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.
This category is for staked ETH2.0 wrappers, so this does not belong in the category
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.
Fixed!
data/mainnet/tokens.js
Outdated
VAULT_CATEGORIES_IDS.BALANCER, | ||
VAULT_CATEGORIES_IDS.STABLECOINS, | ||
], | ||
displayName: 'bb-a-USD', |
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.
Let's split this up into the underlying tokens, aDAI-aUSDC-aUSDT
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.
Fixed
data/mainnet/tokens.js
Outdated
displayName: 'bb-a-USD', | ||
subLabel: 'Aura Finance', | ||
apyIconUrls: ['./icons/balancer.png', './icons/aura.png', './icons/bbausd.png'], | ||
apyTokenSymbols: ['BAL', 'AURA', 'bbaUSD'], |
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.
bbaUSD
is not actually a reward here. The yield displayed on AURA labeled bbaUSD
is the "boost"
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.
Fixed
"lptoken": "0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd", | ||
"rewardPool": "0xacada51c320947e7ed1a0d0f6b939b0ff465e4c2", | ||
"balancerPoolId": "0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249", | ||
"name": "auraBAL_lp" |
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.
This is missing an "extras"
entry:
"contract": "0xb1BCdf4bce3d5786eb10533D07E4595D1f1BC9c8"
"token": "0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF"
"name": "AURA"
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.
Fixed
"boostTypes": ["stakedMatic"], | ||
"poolId": "0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c" | ||
}, | ||
"0x616e8BfA43F920657B3497DBf40D6b1A02D4608d": { |
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.
This is incorrect. The auraBAL token has no boostAPY
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.
Fixed
|
||
let partApy | ||
if (types[i] == 'Aave') { | ||
partApy = await getAaveApy(poolBoostInfo.aaveTags[i]) | ||
partApy = networkId == '1' ? partApy.div(2) : partApy |
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.
Looking at the numbers displayed at the AURA front page, it seems that they do not take the 50% cut in consideration. I am not sure if it's a mistake at their side or ours, but I think we want to display the same way they do, as we are competing with their displayed values. So let's remove the 50% cut here and we'll see if we want to change it in the future.
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.
Agree, I have fixed it!
@@ -45,6 +45,141 @@ module.exports = { | |||
], | |||
cmcRewardTokenSymbols: ['FARM', 'WETH'], | |||
}, | |||
aura_auraBAL: { |
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.
Final small thing, which I forgot about earlier. Please add the tag isNew: true
to the entries added to tokens.js
. This will mark the vaults as "New" on the home page.
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.
Fixed!
I am submitting a Pull Request with the following changes to the API of 5 pools of Aura: auraBAL, auraBAL Stable, wstETH, bbaUSD, and rETH.
Firstly, I have added an AURA and BAL reward APY calculation file to the API. This will allow users to easily track the APY of their AURA and BAL rewards in each of the five pools.
Additionally, I have added stakeEth APR calculation in the balancer-boost of lp tradingAPY calculation. This will help users to understand better the APR they can earn from staked ETH kind of assets in the pool.
I have also adjusted the balancer subgraph poolInfo function to ensure it returns the same information as the on-chain function.
Finally, I have added Lido and Rocket-pool as stEth and rEth APR sources. This will allow users to easily track the APR they can earn by staking their stEth and rEth in the respective pools.
Thank you for your time and consideration in reviewing this Pull Request. I look forward to your feedback.