Storm-Labs-Inc / cove-contracts-boosties

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

feat: add deposit limits and initial fees #319

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: c721309ea67a7242b31af3b1a13933f1706dbb14, compared to commit: 841a7d29b128dc2f1548bf46aa72d7104988439b

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

Contract Method Avg (+/-) %
Yearn4626RouterExt redeemVaultV2 -4,014 โœ… -1.19%
DYFIRedeemer receiveFlashLoan -305 โœ… -0.32%

Full diff report ๐Ÿ‘‡
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **Yearn4626RouterExt** | 3,453,286 (0) | _approve_
_redeemFromRouter_
_redeemVaultV2_ | 25,150 (0)
82,727 (0)
132,876 (0) | **0.00%**
**0.00%**
**0.00%** | 52,291 (-1)
146,250 (+18)
331,955 (-4,014) | **-0.00%**
**+0.01%**
**-1.19%** | 52,198 (0)
146,630 (0)
132,895 (-9) | **0.00%**
**0.00%**
**-0.01%** | 52,663 (0)
151,532 (0)
759,862 (0) | **0.00%**
**0.00%**
**0.00%** | 1,029 (0)
516 (0)
516 (0) | | **DYFIRedeemer** | 2,139,607 (0) | _receiveFlashLoan_
_setSlippage_ | 23,419 (0)
24,054 (0) | **0.00%**
**0.00%** | 94,983 (-305)
38,866 (+1) | **-0.32%**
**+0.00%** | 24,435 (-1,187)
30,088 (0) | **-4.63%**
**0.00%** | 279,843 (0)
53,508 (0) | **0.00%**
**0.00%** | 1,280 (0)
513 (0) | | **MiniChefV3** | 3,232,710 (0) | _commitReward_
_deposit_
_harvestAndWithdraw_
_rescue_ | 40,814 (0)
24,361 (0)
22,233 (0)
34,784 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 76,469 (-1)
120,738 (-1)
162,445 (+212)
47,955 (-2) | **-0.00%**
**-0.00%**
**+0.13%**
**-0.00%** | 76,698 (0)
120,915 (0)
170,990 (0)
53,963 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 76,998 (0)
124,061 (0)
171,122 (0)
67,902 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 1,036 (0)
786 (0)
261 (0)
1,027 (0) | | **YearnGaugeStrategy** | 1,817,865 (0) | _approve_
_deposit_
_redeem_
_report_
_setDYfiRedeemer_
_setHarvestSwapParams_
_withdraw_ | 49,303 (+24)
30,717 (0)
294,218 (+24)
58,515 (0)
27,506 (0)
33,103 (0)
74,620 (0) | **+0.05%**
**0.00%**
**+0.01%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 49,388 (+1)
292,093 (-30)
300,891 (+1)
303,089 (+4)
75,254 (-1)
84,270 (+2)
176,139 (-123) | **+0.00%**
**-0.01%**
**+0.00%**
**+0.00%**
**-0.00%**
**+0.00%**
**-0.07%** | 49,411 (0)
309,101 (0)
299,066 (0)
69,644 (0)
79,805 (0)
33,103 (0)
201,536 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 49,411 (0)
447,887 (0)
309,375 (0)
914,862 (0)
79,824 (0)
561,281 (0)
256,843 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 512 (0)
7,938 (0)
769 (0)
5,890 (0)
3,587 (0)
299 (0)
1,792 (0) | | **YearnStakingDelegate** | 3,689,914 (0) | _execute_
_harvest_
_setGaugeRewardSplit_
_setSwapAndLock_ | 27,929 (0)
24,054 (0)
25,584 (0)
24,116 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 136,701 (+68)
311,643 (-84)
35,732 (+1)
47,410 (-1) | **+0.05%**
**-0.03%**
**+0.00%**
**-0.00%** | 149,225 (0)
352,133 (0)
25,856 (+8)
47,540 (0) | **0.00%**
**0.00%**
**+0.03%**
**0.00%** | 149,609 (0)
431,958 (0)
54,789 (0)
53,849 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 268 (0)
1,803 (0)
1,283 (0)
280 (0) | | **GaugeRewardReceiver** | 1,428,645 (0) | _harvest_ | 5,864 (0) | **0.00%** | 292,713 (-144) | **-0.05%** | 350,867 (0) | **0.00%** | 455,946 (0) | **0.00%** | 2,058 (0) | | **YSDRewardsGauge** | 3,896,771 (0) | _deposit_
_redeem_ | 2,732 (0)
8,327 (0) | **0.00%**
**0.00%** | 193,162 (-27)
134,323 (-37) | **-0.01%**
**-0.03%** | 178,853 (0)
127,219 (0) | **0.00%**
**0.00%** | 451,162 (0)
243,239 (0) | **0.00%**
**0.00%** | 2,048 (0)
1,024 (0) | | **StakingDelegateRewards** | 1,990,696 (0) | _notifyRewardAmount_
_setRewardReceiver_ | 24,268 (0)
45,291 (0) | **0.00%**
**0.00%** | 104,140 (-5)
45,445 (-4) | **-0.00%**
**-0.01%** | 141,488 (0)
45,519 (0) | **0.00%**
**0.00%** | 161,736 (0)
45,519 (0) | **0.00%**
**0.00%** | 527 (0)
257 (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,520 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%**
**0.00%** | 50,933 (-1)
50,381 (-1)
67,126 (-2)
42,421 (-2)
42,439 (-3)
49,807 (-1) | **-0.00%**
**-0.00%**
**-0.00%**
**-0.00%**
**-0.01%**
**-0.00%** | 55,323 (0)
55,120 (0)
75,549 (0)
31,235 (0)
31,248 (0)
57,862 (0) | **0.00%**
**0.00%**
**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) | | **MasterRegistry** | 1,462,573 (0) | _multicall_
_updateRegistry_ | 173,014 (-12)
24,175 (0) | **-0.01%**
**0.00%** | 176,534 (+7)
63,867 (-1) | **+0.00%**
**-0.00%** | 176,386 (0)
74,474 (0) | **0.00%**
**0.00%** | 179,746 (0)
98,418 (0) | **0.00%**
**0.00%** | 512 (0)
2,816 (0) | | **SwapAndLock** | 1,183,769 (0) | _setDYfiRedeemer_ | 23,966 (0) | **0.00%** | 63,704 (-1) | **-0.00%** | 76,054 (0) | **0.00%** | 76,289 (0) | **0.00%** | 1,296 (0) | | **ERC20RewardsGauge** | 3,604,944 (0) | _depositRewardToken_ | 7,707 (0) | **0.00%** | 148,467 (-1) | **-0.00%** | 147,383 (0) | **0.00%** | 195,467 (0) | **0.00%** | 4,610 (0) |
codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.59%. Comparing base (841a7d2) to head (4a331fe).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #319 +/- ## ======================================= Coverage 97.59% 97.59% ======================================= Files 19 19 Lines 996 996 Branches 204 204 ======================================= Hits 972 972 Misses 1 1 Partials 23 23 ```

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