Storm-Labs-Inc / cove-contracts-boosties

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

chore: improve router and update deployment scripts #299

Closed penandlim closed 7 months ago

penandlim commented 7 months ago

Describe your changes

Checklist before requesting a review

github-actions[bot] commented 7 months ago

Slither report

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

github-actions[bot] commented 7 months ago

Changes to gas cost

Generated at commit: 0dafe40956802be31716f3f3c3d47c89a238493f, compared to commit: 4ee1072ff47ce8431168895bb09d56430aecac9f

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

Contract Method Avg (+/-) %
Yearn4626RouterExt depositToVaultV2
previewRedeems
previewWithdraws
redeemStakeDaoGauge
-101 โœ…
+22 โŒ
+22 โŒ
+4,548 โŒ
-0.09%
+0.08%
+0.08%
+0.93%
DYFIRedeemer receiveFlashLoan +249 โŒ +0.26%

Full diff report ๐Ÿ‘‡
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **Yearn4626RouterExt** | 3,464,358 (+152,557) | _deposit_
_depositToVaultV2_
_multicall_
_previewRedeems_
_previewWithdraws_
_pullToken_
_redeemStakeDaoGauge_
_redeemVaultV2_
_withdrawFromRouter_ | 132,901 (+22)
101,150 (-109)
48,278 (+22)
672 (+22)
628 (+22)
30,975 (+22)
492,073 (+511)
650,698 (+22)
140,441 (+22) | **+0.02%**
**-0.11%**
**+0.05%**
**+3.38%**
**+3.63%**
**+0.07%**
**+0.10%**
**+0.00%**
**+0.02%** | 132,901 (+22)
116,632 (-101)
425,118 (+11)
26,066 (+22)
26,073 (+22)
30,975 (+22)
496,110 (+4,548)
712,794 (+22)
142,790 (+22) | **+0.02%**
**-0.09%**
**+0.00%**
**+0.08%**
**+0.08%**
**+0.07%**
**+0.93%**
**+0.00%**
**+0.02%** | 132,901 (+22)
110,530 (-87)
331,375 (-34)
26,360 (+22)
26,316 (+22)
30,975 (+22)
496,110 (+4,548)
727,846 (+22)
142,790 (+22) | **+0.02%**
**-0.08%**
**-0.01%**
**+0.08%**
**+0.08%**
**+0.07%**
**+0.93%**
**+0.00%**
**+0.02%** | 132,901 (+22)
138,216 (-109)
895,701 (+44)
48,862 (+22)
48,937 (+22)
30,975 (+22)
500,147 (+8,585)
759,840 (+22)
145,139 (+22) | **+0.02%**
**-0.08%**
**+0.00%**
**+0.05%**
**+0.04%**
**+0.07%**
**+1.75%**
**+0.00%**
**+0.02%** | 1 (0)
3 (0)
3 (0)
7 (0)
7 (0)
1 (0)
2 (+1)
3 (0)
2 (0) | | **DYFIRedeemer** | 2,139,607 (0) | _massRedeem_
_receiveFlashLoan_
_setSlippage_ | 30,408 (0)
23,419 (0)
24,030 (-24) | **0.00%**
**0.00%**
**-0.10%** | 441,231 (-12)
94,895 (+249)
38,866 (+1) | **-0.00%**
**+0.26%**
**+0.00%** | 440,099 (0)
25,622 (+907)
30,088 (0) | **0.00%**
**+3.67%**
**0.00%** | 689,094 (0)
279,843 (0)
53,508 (0) | **0.00%**
**0.00%**
**0.00%** | 1,545 (0)
1,280 (0)
513 (0) | | **YearnStakingDelegate** | 3,480,822 (0) | _deposit_
_execute_
_harvest_
_lockYfi_
_setBoostRewardSplit_
_setCoveYfiRewardForwarder_
_setExitRewardSplit_
_setSwapAndLock_
_withdraw(address,uint256)_
_withdraw(address,uint256,address)_ | 24,209 (0)
27,906 (0)
24,054 (0)
23,730 (0)
24,354 (0)
24,029 (0)
24,434 (0)
24,138 (0)
22,058 (0)
22,529 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 142,020 (-1)
137,364 (-303)
307,868 (+41)
242,139 (-1)
27,725 (-2)
47,422 (+3)
27,805 (-2)
47,438 (+8)
95,595 (-3)
105,970 (-1) | **-0.00%**
**-0.22%**
**+0.01%**
**-0.00%**
**-0.01%**
**+0.01%**
**-0.01%**
**+0.02%**
**-0.00%**
**-0.00%** | 85,977 (-12)
149,202 (0)
348,124 (0)
407,442 (0)
28,113 (0)
47,470 (0)
28,193 (0)
47,562 (0)
59,146 (-12)
91,546 (0) | **-0.01%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**-0.02%**
**0.00%** | 270,866 (0)
149,586 (0)
427,949 (0)
407,490 (0)
53,811 (0)
47,482 (0)
53,891 (0)
53,871 (0)
174,948 (0)
195,321 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 2,566 (0)
268 (0)
1,803 (0)
1,043 (0)
1,025 (0)
789 (0)
1,025 (0)
280 (0)
769 (0)
512 (0) | | **ERC20RewardsGauge** | 3,563,316 (0) | _depositRewardToken_ | 7,707 (0) | **0.00%** | 148,070 (-63) | **-0.04%** | 147,383 (0) | **0.00%** | 195,467 (0) | **0.00%** | 4,610 (0) | | **GaugeRewardReceiver** | 1,428,645 (0) | _harvest_ | 5,864 (0) | **0.00%** | 289,990 (-123) | **-0.04%** | 346,858 (0) | **0.00%** | 451,937 (0) | **0.00%** | 2,058 (0) | | **CoveToken** | 2,700,691 (0) | _addAllowedReceiver_
_mint_
_removeAllowedReceiver_
_removeAllowedSender_
_transfer_ | 26,282 (0)
26,635 (0)
31,007 (0)
30,931 (0)
28,476 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 50,940 (+1)
49,684 (-16)
42,430 (+1)
42,360 (-1)
46,532 (+1) | **+0.00%**
**-0.03%**
**+0.00%**
**-0.00%**
**+0.00%** | 55,335 (+12)
54,077 (0)
31,235 (0)
31,159 (0)
53,299 (0) | **+0.02%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 55,335 (0)
63,525 (0)
53,805 (0)
53,740 (0)
55,902 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 1,793 (0)
1,537 (0)
513 (0)
513 (0)
3,584 (0) | | **YearnGaugeStrategy** | 1,936,478 (0) | _approve_
_deposit_
_redeem_
_report_
_setDYfiRedeemer_
_setHarvestSwapParams_
_setMaxTotalAssets_ | 49,303 (+36)
30,739 (0)
300,924 (+36)
70,112 (0)
27,594 (0)
33,103 (0)
27,561 (0) | **+0.07%**
**0.00%**
**+0.01%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 49,382 (0)
289,629 (+5)
307,590 (0)
263,962 (-1)
75,348 (+1)
85,082 (+2)
31,554 (+5) | **0.00%**
**+0.00%**
**0.00%**
**-0.00%**
**+0.00%**
**+0.00%**
**+0.02%** | 49,399 (0)
313,642 (0)
305,760 (0)
97,796 (0)
79,893 (0)
33,103 (0)
32,460 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 49,411 (0)
468,474 (0)
316,081 (0)
915,925 (0)
79,912 (0)
561,281 (0)
49,920 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 512 (0)
7,938 (0)
769 (0)
8,195 (0)
3,587 (0)
301 (0)
811 (0) | | **SwapAndLock** | 1,173,235 (0) | _setDYfiRedeemer_ | 23,972 (0) | **0.00%** | 63,725 (+4) | **+0.01%** | 76,060 (0) | **0.00%** | 76,295 (0) | **0.00%** | 1,296 (0) | | **MiniChefV3** | 3,203,763 (0) | _deposit_
_harvestAndWithdraw_
_rescue_ | 24,361 (0)
22,233 (0)
34,784 (0) | **0.00%**
**0.00%**
**0.00%** | 120,743 (-2)
162,487 (+1)
47,963 (+1) | **-0.00%**
**+0.00%**
**+0.00%** | 120,915 (0)
170,990 (0)
53,963 (0) | **0.00%**
**0.00%**
**0.00%** | 124,061 (0)
171,122 (0)
67,902 (0) | **0.00%**
**0.00%**
**0.00%** | 786 (0)
261 (0)
1,027 (0) | | **StakingDelegateRewards** | 1,877,078 (0) | _notifyRewardAmount_ | 24,335 (0) | **0.00%** | 97,791 (+2) | **+0.00%** | 154,882 (0) | **0.00%** | 155,230 (0) | **0.00%** | 526 (0) | | **MasterRegistry** | 1,462,561 (0) | _addRegistry_
_multicall_
_updateRegistry_ | 24,195 (0)
173,026 (0)
24,175 (0) | **0.00%**
**0.00%**
**0.00%** | 78,149 (+1)
176,674 (-1)
63,897 (+1) | **+0.00%**
**-0.00%**
**+0.00%** | 95,280 (0)
176,386 (0)
74,474 (0) | **0.00%**
**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) | | **YSDRewardsGauge** | 3,889,441 (0) | _deposit_
_redeem_ | 9,257 (0)
8,305 (0) | **0.00%**
**0.00%** | 221,683 (-3)
137,710 (-1) | **-0.00%**
**-0.00%** | 161,738 (0)
130,562 (0) | **0.00%**
**0.00%** | 481,675 (0)
249,968 (0) | **0.00%**
**0.00%** | 1,792 (0)
1,024 (0) |
codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 97.73%. Comparing base (4ee1072) to head (c434892).

Files Patch % Lines
src/Yearn4626RouterExt.sol 80.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #299 +/- ## ========================================== - Coverage 97.83% 97.73% -0.10% ========================================== Files 19 19 Lines 968 970 +2 Branches 198 199 +1 ========================================== + Hits 947 948 +1 - Partials 21 22 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.