Closed shuklaayush closed 2 years ago
Review: Tests are passing
Function for Minting is scraped from AuraToken, would like to see a couple tests against it just to be sure
Gas:
AURA.INIT_MINT_AMOUNT();
AURA.reductionPerCliff()
totalCliffs
EMISSIONS_MAX_SUPPLY
Are all constants / immutable could just be hardcoded for cheaper gas, although they are for view function so prob doesn't matter
Question: Harvests have 0 minOut, anything we can do to make it better?
Question: Do we have option to lock vs buy from pool for some of these swaps?
General Review:
Functions Review:
Function for Minting is scraped from AuraToken, would like to see a couple tests against it just to be sure
Added test for minting calculation https://github.com/shuklaayush/auraBal-staker/blob/241840f1641616a912c160854a703a987f1e7330/tests/test_custom.py#L27-L50
Are all constants / immutable could just be hardcoded for cheaper gas, although they are for view function so prob doesn't matter
Yep, these would only be called from off-chain
Harvests have 0 minOut, anything we can do to make it better?
We can but should be fine if we harvest using flashbots like in other strategies
Do we have option to lock vs buy from pool for some of these swaps?
Yes we do, but calculating the optimal way requires simulating the swap which might be expensive in balancer
Strategy that takes auraBAL
as want and stakes it on the rewards pool for more rewards. Upon harvest, it autocompounds the BAL received and emits all of the AURA in the form of graviAURA.
withdrawAll()
(NOTE: _withdrawAll
can only be called by the vault and it only handled the want
token. If rewards are claimed when withdrawing for a broken harvest for instance, AURA and BAL won't be processed and stuck on the strat as they are protected tokens. The broken strat will need to be upgraded to remove the protection or to fix harvest in order for these rewards to be rescued. It is still handy to claim all rewards when exiting a position fully - AURA rewards are calculated at claim time based on the totalSupply
and, if they are left unclaimed for a long time, the claimable amount may be reduced considerably).@shuklaayush
balEthBptToAuraBalMinOutBps
upon initialize to save us the trouble of calling afterwards._reportToVault
is called and fees are processed, we re-stake (_deposit) the outstanding amount to increase the position atomically?
Yes we do, but calculating the optimal way requires simulating the swap which might be expensive in balancer
Provide liq and lock (Gas: 174,773 + 314,272):
Direct BAL -> auraBAL deposit through Aura (Gas: 588,184): https://etherscan.io/tx/0x0f17866a94f6b68c501a1a3ba396987776c432bd5cd3960a6dd36d4db0c1b02d
So if we won't dynamically choose the best path, it seems like the current approach leads to the least gas consuming for the time being
Test cover the different scenarios expected for this strat (resolver checks tree and autocompounding), the rewards estimation logic and that the claim on withdraw flag works as expected with its proper permissions. All tests are passing and LGTM:
@shuklaayush I've noticed that fees where changed, @Tritium-VLK pls confirm fees before deployment
We should consider setting a default value for the balEthBptToAuraBalMinOutBps upon initialize to save us the trouble of calling afterwards.
Good catch. Fixed
What if, after _reportToVault is called and fees are processed, we re-stake (_deposit) the outstanding amount to increase the position atomically?
Sure sir
Tests are still passing:
LGTM!
Vault proxy: 0x37d9D2C6035b744849C15F1BFEE8F268a20fCBd8
Strategy proxy: 0xfB490b5beA343ABAe0E71B61bBdfd4301F5e4df9
Strategy logic: 0x500C5Aa6661B7d40fBcB05c6bd9bdC9e63f3C5AA
Guestlist: 0x6f54b4f2179b4125C4992a33FFB89e5322E26523
Total cap set at 85k auraBal and no user cap.
Current prices:
80bal-20eth pool:
Price of bpt can be calculated as
$$ \begin{align} p_{bpt} &= \frac{Invariant}{TotalSupply}\cdot \left(\frac{p_1}{w_1}\right)^{w_1} \cdot \left(\frac{p_2}{w_2}\right)^{w_2}\ &= \frac{3501000.4}{6902277.5}\cdot \left(\frac{4.75}{0.8}\right)^{0.8} \cdot \left(\frac{1116}{0.2}\right)^{0.2}\ &\approx $11.84 \end{align} $$
Assuming 1 auraBal = 1 veBal = 1 80bal-20eth bpt
Parameters:
Actors LG and fees confirmed with @Tritium-VLK LGTM
Paramters:
LGTM
Caps Math checks out
LGTM
Deployments, logics and parameters LGTM
Changes LGTM
All tests are passing, including upgrade test:
Test harvest shows proper handling of bb-a-usd and no dust:
Test changes LGTM
LGTM
New strategy deployments
New deployed strategy actors and parameters LGTM. Address already applied to migration script which further confirms proper logic and functioning through simulation: https://github.com/Badger-Finance/badger-multisig/pull/635
LGTM
Migration to new strategy executed; https://etherscan.io/tx/0xf8b99c319f881b9486b018ca20b1d6789c2d520fc1fcc00262187a827e015f10
Harvested over the weekend and then guarded launch over next week
Governance delegation: https://etherscan.io/tx/0x0ed843ee7b87165acc3948cda7034077c33f60817eb65dbe64e9126b9e973152
@shuklaayush Per feedback from the beta-squad, can we change the bauraBAL vault to autocompound USD for more auraBAL instead of emitting it s bobba?
https://discord.com/channels/743271185751474307/996717380023631892/1001560433406246952
Latest deployment of version that autocompounds BB-A-USD by @shuklaayush : https://etherscan.io/address/0x32BdF2B35Bbf8dAca3561C3ADE59c941488E9c69#readProxyContract
Deployment LGTM
Ready for review: https://github.com/Badger-Finance/badger-multisig/pull/721
Strategy difference for reference: https://www.diffchecker.com/CbqkLoPp
Current logic: https://etherscan.io/address/0x959927641c65a9fa13c6102091bc0ccddb827d77#code New logic: https://etherscan.io/address/0x79b9cb36b6cb7ecb073de493aa2b9c5995854a21#code
Closing as succesful
Strategy Review
Description
Stake auraBal to get rewards
Code Link
https://github.com/shuklaayush/auraBal-staker/tree/v0.0.4
Due Diligence Document (Link, but could also just be a .md file in repo)
Aura Aura Report yet to be released, from my own knowledge meaningful bugs where mitigated: https://code4rena.com/reports
Balancer: https://docs.balancer.fi/security/audits
Deployed Contract (If present)
Review By
Review by Security Board
Test Checks (screen shot of all test passing)
Launch Checklist