Storm-Labs-Inc / cove-contracts-boosties

Core smart contracts of the Cove Protocol
Other
18 stars 6 forks source link

chore: update constants with coveYFI/YFI addresses #343

Closed penandlim closed 4 months ago

penandlim commented 4 months ago

Describe your changes

Curve Router NG deployment from 2 weeks ago is added. https://etherscan.io/address/0x16C6521Dff6baB339122a0FE25a9116693265353

Since CoveYFI/YFI pool is a stable NG type pool that takes in dynamic arrays for add_liquidity, we need to use the newer router that is aware of the pool type. https://github.com/curvefi/curve-router-ng/blob/master/contracts/Router.vy#L263-L266

Checklist before requesting a review

github-actions[bot] commented 4 months ago

Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results. Summary

github-actions[bot] commented 4 months ago

Changes to gas cost

Generated at commit: 84eeb9275d4a1c01a3a2cc6980081d86785c11b5, compared to commit: 1dc9b20d7e42f4d7a6cfb99fba21ee28c753efaf

๐Ÿงพ Summary (10% most significant diffs)

Contract Method Avg (+/-) %
DYFIRedeemer receiveFlashLoan +1,548 โŒ +1.57%
Yearn4626RouterExt redeemVaultV2 +4,015 โŒ +1.06%

Full diff report ๐Ÿ‘‡
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **DYFIRedeemer** | 2,139,607 (0) | _currentYfiRedeem_
_massRedeem_
_minYfiRedeem_
_receiveFlashLoan_
_setSlippage_ | 23,811 (0)
30,408 (0)
23,752 (+76)
23,419 (0)
23,982 (-36) | **0.00%**
**0.00%**
**+0.32%**
**0.00%**
**-0.15%** | 78,543 (+1)
440,571 (-2)
23,752 (+1)
100,081 (+1,548)
38,845 (+1) | **+0.00%**
**-0.00%**
**+0.00%**
**+1.57%**
**+0.00%** | 79,811 (0)
440,099 (0)
23,752 (0)
53,910 (+768)
30,088 (0) | **0.00%**
**0.00%**
**0.00%**
**+1.45%**
**0.00%** | 79,811 (0)
689,094 (0)
23,752 (0)
279,843 (0)
53,508 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 265 (0)
1,545 (0)
256 (0)
1,280 (0)
513 (0) | | **Yearn4626RouterExt** | 3,677,248 (0) | _approve_
_deposit_
_redeemFromRouter_
_redeemVaultV2_ | 25,150 (0)
101,194 (0)
82,780 (0)
132,893 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 52,303 (+1)
135,821 (+1)
146,537 (+1)
382,156 (+4,015) | **+0.00%**
**+0.00%**
**+0.00%**
**+1.06%** | 52,462 (0)
121,763 (0)
146,731 (0)
132,951 (+10) | **0.00%**
**0.00%**
**0.00%**
**+0.01%** | 53,252 (0)
162,409 (0)
151,585 (0)
759,884 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 1,039 (0)
1,028 (0)
516 (0)
516 (0) | | **MiniChefV3** | 3,232,710 (0) | _commitReward_
_deposit_
_harvestAndWithdraw_
_rescue_
_setRewardPerSecond_ | 40,814 (0)
24,361 (0)
22,233 (0)
34,784 (0)
24,104 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 76,575 (+2)
120,737 (+1)
167,054 (-119)
47,965 (-1)
44,380 (+1) | **+0.00%**
**+0.00%**
**-0.07%**
**-0.00%**
**+0.00%** | 76,698 (0)
120,915 (0)
171,002 (0)
53,963 (0)
47,197 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 76,998 (0)
124,061 (0)
171,122 (0)
67,902 (0)
53,549 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 1,036 (0)
786 (0)
261 (0)
1,027 (0)
1,547 (0) | | **YearnStakingDelegate** | 3,689,914 (0) | _deposit_
_execute_
_harvest_
_setBoostRewardSplit_
_setDepositLimit_
_setExitRewardSplit_
_setGaugeRewardSplit_
_setSwapAndLock_
_withdraw(address,uint256)_
_withdraw(address,uint256,address)_ | 26,589 (0)
27,929 (0)
24,054 (0)
24,401 (0)
48,062 (0)
24,458 (0)
25,608 (0)
24,116 (0)
22,081 (0)
22,507 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 220,786 (0)
137,106 (+82)
313,030 (+143)
27,780 (-1)
48,133 (+1)
27,837 (-1)
35,744 (-1)
47,412 (+1)
242,552 (+1)
106,879 (-1) | **0.00%**
**+0.06%**
**+0.05%**
**-0.00%**
**+0.00%**
**-0.00%**
**-0.00%**
**+0.00%**
**+0.00%**
**-0.00%** | 241,123 (-6)
149,237 (0)
352,133 (0)
28,136 (0)
48,062 (0)
28,193 (0)
25,856 (0)
47,540 (0)
278,682 (0)
90,560 (0) | **-0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 350,077 (0)
149,609 (0)
431,958 (0)
53,834 (0)
48,434 (0)
53,891 (0)
54,789 (0)
53,849 (0)
279,042 (0)
193,370 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 3,334 (0)
268 (0)
1,803 (0)
1,025 (0)
526 (0)
1,025 (0)
1,283 (0)
280 (0)
769 (0)
512 (0) | | **GaugeRewardReceiver** | 1,428,645 (0) | _harvest_ | 5,864 (0) | **0.00%** | 296,608 (+145) | **+0.05%** | 350,867 (0) | **0.00%** | 455,946 (0) | **0.00%** | 2,058 (0) | | **YSDRewardsGauge** | 3,896,771 (0) | _depositRewardToken_
_redeem_ | 124,845 (0)
8,327 (0) | **0.00%**
**0.00%** | 149,141 (+39)
135,819 (-2) | **+0.03%**
**-0.00%** | 149,219 (0)
127,219 (0) | **0.00%**
**0.00%** | 153,694 (0)
243,239 (0) | **0.00%**
**0.00%** | 512 (0)
1,024 (0) | | **CoveToken** | 3,495,457 (0) | _addAllowedReceiver_
_addAllowedSender_
_mint_
_removeAllowedReceiver_
_removeAllowedSender_
_transfer_ | 26,282 (0)
26,283 (0)
26,613 (0)
31,007 (0)
31,020 (0)
28,508 (-12) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**-0.04%** | 50,935 (-1)
50,383 (-1)
67,296 (+1)
42,422 (-1)
42,441 (-1)
50,033 (+13) | **-0.00%**
**-0.00%**
**+0.00%**
**-0.00%**
**-0.00%**
**+0.03%** | 55,323 (0)
55,132 (+12)
75,561 (0)
31,235 (0)
31,248 (0)
57,862 (0) | **0.00%**
**+0.02%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 55,335 (0)
55,336 (0)
98,393 (0)
53,805 (0)
53,829 (0)
92,556 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 1,793 (0)
1,593 (0)
1,537 (0)
513 (0)
513 (0)
3,585 (0) | | **RewardForwarder** | 936,966 (0) | _forwardRewardToken_ | 8,239 (0) | **0.00%** | 113,802 (+16) | **+0.01%** | 160,655 (0) | **0.00%** | 169,692 (0) | **0.00%** | 1,280 (0) | | **YearnGaugeStrategy** | 1,802,550 (-15,315) | _deposit_
_report_
_setHarvestSwapParams_
_withdraw_ | 30,717 (0)
58,515 (0)
33,103 (0)
74,620 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 293,472 (-18)
303,111 (-2)
84,268 (-3)
180,894 (+1) | **-0.01%**
**-0.00%**
**-0.00%**
**+0.00%** | 309,101 (0)
69,644 (0)
33,103 (0)
236,223 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 447,887 (0)
914,862 (0)
561,281 (0)
256,843 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 7,938 (0)
5,890 (0)
299 (0)
1,792 (0) | | **StakingDelegateRewards** | 1,990,696 (0) | _notifyRewardAmount_ | 24,268 (0) | **0.00%** | 104,252 (-6) | **-0.01%** | 161,388 (0) | **0.00%** | 161,736 (0) | **0.00%** | 527 (0) | | **MasterRegistry** | 1,462,573 (0) | _addRegistry_
_multicall_
_updateRegistry_ | 24,195 (0)
173,026 (+12)
24,175 (0) | **0.00%**
**+0.01%**
**0.00%** | 78,104 (+2)
176,545 (+7)
63,865 (+3) | **+0.00%**
**+0.00%**
**+0.00%** | 95,088 (+12)
176,386 (+6)
74,474 (0) | **+0.01%**
**+0.00%**
**0.00%** | 95,640 (0)
179,746 (0)
98,418 (0) | **0.00%**
**0.00%**
**0.00%** | 5,376 (0)
512 (0)
2,816 (0) | | **SwapAndLock** | 1,183,769 (0) | _setDYfiRedeemer_ | 23,966 (0) | **0.00%** | 63,711 (+1) | **+0.00%** | 76,054 (0) | **0.00%** | 76,289 (0) | **0.00%** | 1,296 (0) |