Skip to content
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

Reset state #1352

Merged
merged 19 commits into from
Oct 17, 2022
Merged

Reset state #1352

merged 19 commits into from
Oct 17, 2022

Conversation

MerlinEgalite
Copy link
Contributor

@MerlinEgalite MerlinEgalite commented Oct 12, 2022

Pull Request

Issue(s) fixed

This pull request fixes #1350

This PR will not be merged until every features, changes and fixes have been implemented.

  • change solidity pragma
  • change license
  • fix stETH on IRM
  • fix stETH on Lens
  • fix is using as collateral on Aave V2
  • remove useless check
  • safeSub on Aave AND Compound
  • isDeprecated feature
  • granular pausing

@github-actions
Copy link

github-actions bot commented Oct 12, 2022

Morpho-aave-v2 gas impacts (eth-mainnet)

Generated at commit: c03f27638b985d06f579f7dd25c01cf1ccdf7676, compared to commit: 776cacf2dc898c0788ae295fad3f9a71f780c19a

🧾 Summary

Contract Method Avg (+/-) %
Lens computeLiquidationRepayAmount
getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getEnteredMarkets
getIndexes
getMainMarketData
getMarketConfiguration
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
-2,151 ✅
-731 ✅
-731 ✅
-730 ✅
-730 ✅
-730 ✅
+3,530 ❌
-1,790 ✅
-1,834 ✅
-110 ✅
-645 ✅
-1,472 ✅
+17,227 ❌
-2,059 ✅
-2,079 ✅
-1,316 ✅
-3,747 ✅
-731 ✅
-730 ✅
-3,717 ✅
-1,846 ✅
-1,396 ✅
-690 ✅
+4,193 ❌
-2.14%
-1.89%
-1.81%
-3.70%
-1.90%
-1.90%
+17.84%
-3.30%
-3.37%
-0.33%
-2.70%
-2.41%
+102.00%
-3.02%
-3.05%
-3.73%
-1.65%
-2.68%
-3.09%
-1.65%
-1.80%
-1.66%
-1.18%
+3.17%
ExitPositionsManager liquidateLogic
repayLogic
withdrawLogic
+39,359 ❌
+13,421 ❌
+11,778 ❌
+45.64%
+6.65%
+6.27%
Morpho aaveIncentivesController
addressesProvider
borrow(address,uint256)
borrow(address,uint256,uint256)
borrowBalanceInOf
borrowMask
claimRewards
claimToTreasury
createMarket
defaultMaxGasForMatching
deltas
exitPositionsManager
getHead
getMarketsCreated
initialize
interestRatesManager
isClaimRewardsPaused
liquidate
market
maxSortedUsers
p2pBorrowIndex
p2pSupplyIndex
poolIndexes
repay(address,address,uint256)
repay(address,uint256)
rewardsManager
setAaveIncentivesController
setDefaultMaxGasForMatching
setIncentivesVault
setMaxSortedUsers
setP2PIndexCursor
setReserveFactor
setRewardsManager
setTreasuryVault
supply(address,address,uint256)
supply(address,address,uint256,uint256)
supply(address,uint256)
supplyBalanceInOf
updateIndexes
userMarkets
withdraw(address,uint256)
withdraw(address,uint256,address)
+17 ❌
+88 ❌
-12,073 ✅
-12,745 ✅
+43 ❌
+24 ❌
-28 ✅
-4,315 ✅
-1,437 ✅
-22 ✅
+56 ❌
-22 ✅
-67 ✅
+346 ❌
-152 ✅
-266 ✅
-22 ✅
-25,107 ✅
-186 ✅
-22 ✅
+14 ❌
+12 ❌
+33 ❌
+755 ❌
-4,939 ✅
-26 ✅
-22 ✅
+101 ❌
-14 ✅
-28 ✅
+83 ❌
+3,494 ❌
-18 ✅
-49 ✅
+229 ❌
+2,612 ❌
-1,729 ✅
-25 ✅
+6 ❌
-1 ✅
-2,166 ✅
-253 ✅
+2.70%
+21.31%
-2.92%
-5.81%
+2.41%
+2.67%
-0.01%
-36.46%
-0.69%
-1.35%
+3.44%
-0.90%
-4.06%
+6.45%
-0.07%
-24.36%
-5.21%
-26.42%
-13.79%
-1.60%
+1.86%
+1.47%
+3.39%
+1.00%
-2.31%
-3.99%
-0.10%
+1.22%
-0.06%
-0.61%
+1.70%
+11.91%
-0.08%
-0.21%
+0.04%
+22.86%
-0.51%
-1.66%
+0.04%
-0.16%
-1.12%
-0.24%
InterestRatesManager updateIndexes -132 ✅ -1.00%
EntryPositionsManager borrowLogic
supplyLogic
-3,795 ✅
+2,393 ❌
-0.99%
+0.72%
RewardsManagerOnMainnetAndAvalanche claimRewards
getUserUnclaimedRewards
initialize
updateUserAssetAndAccruedRewards
-27 ✅
-5 ✅
-33 ✅
-206 ✅
-0.07%
-0.02%
-0.04%
-0.67%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Lens 4,056,848 (-47,373) computeLiquidationRepayAmount
getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getEnteredMarkets
getIndexes
getMainMarketData
getMarketConfiguration
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
73,808 (-1,495)
27,755 (-731)
29,645 (-731)
19,016 (-730)
20,270 (-730)
20,282 (-730)
19,012 (-774)
49,882 (-2,055)
49,920 (-2,099)
33,725 (-110)
18,185 (-645)
59,624 (-1,472)
34,117 (+26,227)
50,166 (-2,143)
50,142 (-2,187)
30,769 (-1,316)
223,461 (-3,747)
26,275 (-731)
22,557 (-730)
221,654 (-3,717)
81,563 (-1,495)
78,739 (-1,495)
30,491 (-690)
91,073 (-1,494)
-1.99%
-2.57%
-2.41%
-3.70%
-3.48%
-3.47%
-3.91%
-3.96%
-4.04%
-0.33%
-3.43%
-2.41%
+332.41%
-4.10%
-4.18%
-4.10%
-1.65%
-2.71%
-3.13%
-1.65%
-1.80%
-1.86%
-2.21%
-1.61%
98,250 (-2,151)
37,971 (-731)
39,741 (-731)
19,021 (-730)
37,763 (-730)
37,775 (-730)
23,320 (+3,530)
52,470 (-1,790)
52,508 (-1,834)
33,725 (-110)
23,257 (-645)
59,624 (-1,472)
34,117 (+17,227)
66,180 (-2,059)
66,103 (-2,079)
33,994 (-1,316)
223,959 (-3,747)
26,532 (-731)
22,892 (-730)
222,092 (-3,717)
100,704 (-1,846)
82,876 (-1,396)
57,936 (-690)
136,655 (+4,193)
-2.14%
-1.89%
-1.81%
-3.70%
-1.90%
-1.90%
+17.84%
-3.30%
-3.37%
-0.33%
-2.70%
-2.41%
+102.00%
-3.02%
-3.05%
-3.73%
-1.65%
-2.68%
-3.09%
-1.65%
-1.80%
-1.66%
-1.18%
+3.17%
86,982 (-1,495)
28,420 (-731)
29,913 (-731)
19,016 (-730)
37,763 (-730)
37,775 (-730)
19,020 (-766)
49,933 (-2,055)
49,971 (-2,099)
33,725 (-110)
21,961 (-645)
59,624 (-1,472)
34,117 (+26,227)
62,336 (-1,177)
62,322 (-1,211)
30,803 (-1,316)
223,959 (-3,747)
26,283 (-731)
22,667 (-730)
222,092 (-3,717)
84,150 (-1,495)
81,531 (-1,495)
53,957 (-690)
129,514 (-622)
-1.69%
-2.51%
-2.39%
-3.70%
-1.90%
-1.90%
-3.87%
-3.95%
-4.03%
-0.33%
-2.85%
-2.41%
+332.41%
-1.85%
-1.91%
-4.10%
-1.65%
-2.71%
-3.12%
-1.65%
-1.75%
-1.80%
-1.26%
-0.48%
128,398 (-3,027)
85,708 (-731)
88,455 (-731)
19,033 (-730)
55,257 (-730)
55,269 (-730)
34,928 (+15,125)
62,420 (-730)
62,458 (-774)
33,725 (-110)
36,800 (-645)
59,624 (-1,472)
34,117 (-773)
122,161 (-2,256)
122,159 (-2,256)
82,022 (-1,316)
224,457 (-3,747)
27,288 (-731)
23,680 (-730)
222,531 (-3,717)
155,605 (-2,898)
93,707 (-800)
101,210 (-690)
198,826 (+5,719)
-2.30%
-0.85%
-0.82%
-3.69%
-1.30%
-1.30%
+76.38%
-1.16%
-1.22%
-0.33%
-1.72%
-2.41%
-2.22%
-1.81%
-1.81%
-1.58%
-1.64%
-2.61%
-2.99%
-1.64%
-1.83%
-0.85%
-0.68%
+2.96%
7 (0)
6 (0)
6 (0)
3 (0)
2 (0)
2 (0)
6 (+2)
5 (0)
5 (0)
1 (0)
6 (0)
1 (0)
1 (-2)
9 (0)
9 (0)
21 (0)
2 (0)
4 (0)
4 (0)
2 (0)
6 (0)
7 (0)
10 (0)
23 (+2)
ExitPositionsManager 3,623,029 (-468,818) liquidateLogic
repayLogic
withdrawLogic
1,193 (-176)
657 (0)
724 (0)
-12.86%
0.00%
0.00%
125,606 (+39,359)
215,338 (+13,421)
199,699 (+11,778)
+45.64%
+6.65%
+6.27%
36,281 (+31,573)
114,832 (-380)
121,724 (-618)
+670.62%
-0.33%
-0.51%
304,568 (-12,285)
2,024,406 (-622)
2,111,247 (-637)
-3.88%
-0.03%
-0.03%
11 (-5)
67 (-2)
81 (-5)
Morpho 3,436,193 (+87,704) aaveIncentivesController
addressesProvider
borrow(address,uint256)
borrow(address,uint256,uint256)
borrowBalanceInOf
borrowMask
claimRewards
claimToTreasury
createMarket
defaultMaxGasForMatching
deltas
exitPositionsManager
getHead
getMarketsCreated
initialize
interestRatesManager
isClaimRewardsPaused
liquidate
market
maxSortedUsers
p2pBorrowIndex
p2pSupplyIndex
poolIndexes
repay(address,address,uint256)
repay(address,uint256)
rewardsManager
setAaveIncentivesController
setDefaultMaxGasForMatching
setIncentivesVault
setMaxSortedUsers
setP2PIndexCursor
setReserveFactor
setRewardsManager
setTreasuryVault
supply(address,address,uint256)
supply(address,address,uint256,uint256)
supply(address,uint256)
supplyBalanceInOf
updateIndexes
userMarkets
withdraw(address,uint256)
withdraw(address,uint256,address)
427 (+22)
492 (+87)
4,098 (-7,352)
13,646 (+2,612)
916 (0)
570 (-22)
5,893 (0)
1,108 (0)
2,847 (+22)
613 (-22)
1,050 (0)
2,427 (-22)
909 (-67)
2,181 (0)
3,663 (-66)
426 (0)
400 (-22)
4,288 (-7,850)
986 (-194)
351 (-22)
571 (0)
635 (0)
786 (+22)
16,054 (+2,581)
4,103 (-10,071)
404 (-22)
21,878 (-22)
1,179 (0)
2,695 (0)
577 (-22)
4,965 (+83)
2,740 (-22)
2,631 (0)
2,673 (-22)
555,046 (+229)
14,037 (+2,612)
4,074 (-3,599)
936 (-44)
1,832 (+6)
569 (0)
4,034 (-9,381)
103,748 (-253)
+5.43%
+21.48%
-64.21%
+23.67%
0.00%
-3.72%
0.00%
0.00%
+0.78%
-3.46%
0.00%
-0.90%
-6.86%
0.00%
-1.77%
0.00%
-5.21%
-64.67%
-16.44%
-5.90%
0.00%
0.00%
+2.88%
+19.16%
-71.05%
-5.16%
-0.10%
0.00%
0.00%
-3.67%
+1.70%
-0.80%
0.00%
-0.82%
+0.04%
+22.86%
-46.90%
-4.49%
+0.33%
0.00%
-69.93%
-0.24%
646 (+17)
501 (+88)
401,788 (-12,073)
206,764 (-12,745)
1,827 (+43)
922 (+24)
284,091 (-28)
7,519 (-4,315)
208,165 (-1,437)
1,613 (-22)
1,683 (+56)
2,427 (-22)
1,583 (-67)
5,710 (+346)
230,116 (-152)
826 (-266)
400 (-22)
69,927 (-25,107)
1,163 (-186)
1,351 (-22)
768 (+14)
830 (+12)
1,006 (+33)
76,461 (+755)
208,942 (-4,939)
626 (-26)
21,878 (-22)
8,408 (+101)
23,714 (-14)
4,560 (-28)
4,965 (+83)
32,838 (+3,494)
21,595 (-18)
23,524 (-49)
555,046 (+229)
14,037 (+2,612)
335,809 (-1,729)
1,478 (-25)
15,968 (+6)
641 (-1)
191,984 (-2,166)
103,748 (-253)
+2.70%
+21.31%
-2.92%
-5.81%
+2.41%
+2.67%
-0.01%
-36.46%
-0.69%
-1.35%
+3.44%
-0.90%
-4.06%
+6.45%
-0.07%
-24.36%
-5.21%
-26.42%
-13.79%
-1.60%
+1.86%
+1.47%
+3.39%
+1.00%
-2.31%
-3.99%
-0.10%
+1.22%
-0.06%
-0.61%
+1.70%
+11.91%
-0.08%
-0.21%
+0.04%
+22.86%
-0.51%
-1.66%
+0.04%
-0.16%
-1.12%
-0.24%
427 (+22)
492 (+87)
385,555 (-10,485)
198,199 (-13,129)
916 (0)
570 (-22)
397,901 (-22)
4,068 (-3,127)
204,995 (-1,386)
1,613 (-22)
1,050 (0)
2,427 (-22)
1,318 (-67)
2,181 (0)
231,146 (-66)
426 (0)
400 (-22)
9,695 (-4,491)
986 (-194)
1,351 (-22)
571 (0)
635 (0)
786 (+22)
103,282 (-175)
118,840 (-143)
404 (-22)
21,878 (-22)
8,304 (0)
23,878 (0)
4,560 (-28)
4,965 (+83)
4,921 (+2,159)
21,814 (0)
23,856 (-22)
555,046 (+229)
14,037 (+2,612)
201,545 (-2,085)
936 (-44)
16,468 (+6)
569 (0)
125,677 (-150)
103,748 (-253)
+5.43%
+21.48%
-2.65%
-6.21%
0.00%
-3.72%
-0.01%
-43.46%
-0.67%
-1.35%
0.00%
-0.90%
-4.84%
0.00%
-0.03%
0.00%
-5.21%
-31.66%
-16.44%
-1.60%
0.00%
0.00%
+2.88%
-0.17%
-0.12%
-5.16%
-0.10%
0.00%
0.00%
-0.61%
+1.70%
+78.17%
0.00%
-0.09%
+0.04%
+22.86%
-1.02%
-4.49%
+0.04%
0.00%
-0.12%
-0.24%
2,427 (+22)
2,492 (+87)
1,896,667 (-10,556)
456,425 (-13,129)
4,916 (0)
2,570 (-22)
447,213 (-44)
22,744 (-93)
234,710 (-1,386)
2,613 (-22)
9,050 (0)
2,427 (-22)
2,958 (-67)
14,181 (0)
231,146 (-66)
2,426 (0)
400 (-22)
312,624 (-11,366)
2,986 (-194)
2,351 (-22)
2,571 (0)
2,635 (0)
2,786 (+22)
110,048 (-142)
2,032,014 (-154)
2,404 (-22)
21,878 (-22)
10,304 (0)
23,878 (0)
8,544 (-33)
4,965 (+83)
66,209 (-16)
21,814 (0)
23,856 (-22)
555,046 (+229)
14,037 (+2,612)
1,920,039 (+136)
4,936 (-44)
32,363 (+6)
2,569 (0)
2,118,800 (-169)
103,748 (-253)
+0.91%
+3.62%
-0.55%
-2.80%
0.00%
-0.85%
-0.01%
-0.41%
-0.59%
-0.83%
0.00%
-0.90%
-2.21%
0.00%
-0.03%
0.00%
-5.21%
-3.51%
-6.10%
-0.93%
0.00%
0.00%
+0.80%
-0.13%
-0.01%
-0.91%
-0.10%
0.00%
0.00%
-0.38%
+1.70%
-0.02%
0.00%
-0.09%
+0.04%
+22.86%
+0.01%
-0.88%
+0.02%
0.00%
-0.01%
-0.24%
2,046 (-140)
221 (-20)
246 (+1)
41 (0)
329 (+2)
284 (+10)
14 (0)
11 (+6)
1,109 (-100)
2 (0)
360 (+3)
1 (0)
19 (0)
51 (+2)
221 (-20)
5 (+2)
1 (0)
22 (+6)
316 (+9)
2 (0)
233 (+4)
235 (+6)
245 (+6)
3 (0)
70 (+4)
2,023 (-140)
220 (-20)
33 (-2)
222 (-20)
4 (0)
1 (0)
21 (+2)
223 (-20)
224 (-20)
2 (0)
1 (0)
505 (-3)
317 (+4)
1,471 (0)
111 (+2)
86 (+1)
1 (0)
InterestRatesManager 908,486 (-14,820) updateIndexes 656 (0) 0.00% 13,020 (-132) -1.00% 14,287 (0) 0.00% 51,687 (0) 0.00% 2,718 (+22)
EntryPositionsManager 2,795,405 (-162,601) borrowLogic
supplyLogic
490 (0)
737 (0)
0.00%
0.00%
380,339 (-3,795)
335,768 (+2,393)
-0.99%
+0.72%
253,620 (-9,382)
203,217 (-390)
-3.57%
-0.19%
1,892,690 (-11,066)
1,916,065 (-339)
-0.58%
-0.02%
280 (-6)
500 (-11)
RewardsManagerOnMainnetAndAvalanche 1,133,544 (0) claimRewards
getUserUnclaimedRewards
initialize
updateUserAssetAndAccruedRewards
32,510 (-35)
14,763 (-22)
2,742 (0)
2,117 (0)
-0.11%
-0.15%
0.00%
0.00%
38,342 (-27)
23,386 (-5)
92,720 (-33)
30,622 (-206)
-0.07%
-0.02%
-0.04%
-0.67%
34,110 (-35)
20,784 (-22)
93,129 (0)
26,959 (0)
-0.10%
-0.11%
0.00%
0.00%
49,546 (-35)
36,820 (0)
93,129 (0)
78,353 (0)
-0.07%
0.00%
0.00%
0.00%
12 (0)
17 (0)
221 (-20)
1,130 (+3)

@github-actions
Copy link

github-actions bot commented Oct 12, 2022

Morpho-compound gas impacts (eth-mainnet)

Generated at commit: c03f27638b985d06f579f7dd25c01cf1ccdf7676, compared to commit: 776cacf2dc898c0788ae295fad3f9a71f780c19a

🧾 Summary

Contract Method Avg (+/-) %
Morpho borrow(address,uint256)
borrow(address,uint256,uint256)
borrowBalanceInOf
cEth
claimRewards
claimToTreasury
comptroller
createMarket
defaultMaxGasForMatching
deltas
enteredMarkets
getAllMarkets
getEnteredMarkets
getNext
incentivesVault
initialize
interestRatesManager
isClaimRewardsPaused
lastPoolIndexes
liquidate
marketParameters
marketStatus
maxSortedUsers
p2pBorrowIndex
p2pSupplyIndex
positionsManager
repay(address,address,uint256)
repay(address,uint256)
rewardsManager
setDefaultMaxGasForMatching
setIncentivesVault
setInterestRatesManager
setMaxSortedUsers
setP2PIndexCursor
setPositionsManager
setReserveFactor
setRewardsManager
setTreasuryVault
supply(address,address,uint256)
supply(address,address,uint256,uint256)
supply(address,uint256)
supplyBalanceInOf
treasuryVault
updateP2PIndexes
wEth
withdraw(address,uint256)
withdraw(address,uint256,address)
+8,757 ❌
-421 ✅
+29 ❌
-25 ✅
-43 ✅
-3,392 ✅
+1 ❌
-254 ✅
+67 ❌
+83 ❌
-22 ✅
-22 ✅
-28 ✅
-22 ✅
-22 ✅
-46 ✅
-22 ✅
-66 ✅
-13 ✅
+49,028 ❌
+21 ❌
+5 ❌
-22 ✅
-15 ✅
-15 ✅
-22 ✅
+451 ❌
+18,673 ❌
-26 ✅
+252 ❌
+53 ❌
-44 ✅
-49 ✅
+66 ❌
-67 ✅
+67 ❌
-18 ✅
-49 ✅
-203 ✅
+2,389 ❌
+2,224 ❌
-28 ✅
+66 ❌
+45 ❌
-22 ✅
+13,909 ❌
-188 ✅
+1.60%
-0.09%
+2.08%
-3.62%
-0.03%
-28.63%
+0.22%
-0.10%
+11.80%
+3.81%
-2.64%
-0.21%
-1.85%
-1.95%
-4.90%
-0.02%
-4.63%
-14.19%
-1.39%
+17.93%
+1.94%
+0.44%
-5.90%
-2.14%
-2.12%
-4.46%
+0.76%
+7.85%
-3.80%
+3.00%
+0.22%
-0.77%
-1.07%
+1.35%
-1.17%
+0.15%
-0.08%
-0.21%
-0.04%
+20.77%
+0.60%
-2.39%
+5.48%
+0.18%
-0.91%
+5.54%
-0.06%
PositionsManager borrowLogic
liquidateLogic
repayLogic
supplyLogic
withdrawLogic
+10,087 ❌
+61,557 ❌
+21,099 ❌
+2,499 ❌
+17,217 ❌
+1.90%
+22.98%
+9.46%
+0.69%
+6.95%
Lens computeLiquidationRepayAmount
getAllMarkets
getAverageBorrowRatePerBlock
getAverageSupplyRatePerBlock
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerBlock
getCurrentUserSupplyRatePerBlock
getEnteredMarkets
getIndexes
getMainMarketData
getMarketConfiguration
getNextUserBorrowRatePerBlock
getNextUserSupplyRatePerBlock
getRatesPerBlock
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
getUserUnclaimedRewards
initialize
isLiquidatable
-254 ✅
-22 ✅
-17 ✅
-17 ✅
-17 ✅
-17 ✅
-17 ✅
-61 ✅
-48 ✅
-92 ✅
-22 ✅
-39 ✅
-34 ✅
-855 ✅
-76 ✅
-96 ✅
-39 ✅
-124 ✅
-17 ✅
-17 ✅
-124 ✅
-216 ✅
-179 ✅
-83 ✅
+6,056 ❌
-61 ✅
-48 ✅
-188 ✅
-0.24%
-0.07%
-0.03%
-0.03%
-0.08%
-0.02%
-0.03%
-0.28%
-0.07%
-0.13%
-0.32%
-0.08%
-0.04%
-1.67%
-0.09%
-0.11%
-0.09%
-0.05%
-0.06%
-0.07%
-0.04%
-0.32%
-0.30%
-0.14%
+6.28%
-0.14%
-0.07%
-0.32%
RewardsManager accrueUserBorrowUnclaimedRewards
accrueUserSupplyUnclaimedRewards
claimRewards
initialize
-118 ✅
-49 ✅
-56 ✅
-24 ✅
-0.51%
-0.17%
-0.08%
-0.03%
InterestRatesManager updateP2PIndexes -100 ✅ -0.37%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Morpho 3,267,385 (-111,136) borrow(address,uint256)
borrow(address,uint256,uint256)
borrowBalanceInOf
cEth
claimRewards
claimToTreasury
comptroller
createMarket
defaultMaxGasForMatching
deltas
enteredMarkets
getAllMarkets
getEnteredMarkets
getNext
incentivesVault
initialize
interestRatesManager
isClaimRewardsPaused
lastPoolIndexes
liquidate
marketParameters
marketStatus
maxSortedUsers
p2pBorrowIndex
p2pSupplyIndex
positionsManager
repay(address,address,uint256)
repay(address,uint256)
rewardsManager
setDefaultMaxGasForMatching
setIncentivesVault
setInterestRatesManager
setMaxSortedUsers
setP2PIndexCursor
setPositionsManager
setReserveFactor
setRewardsManager
setTreasuryVault
supply(address,address,uint256)
supply(address,address,uint256,uint256)
supply(address,uint256)
supplyBalanceInOf
treasuryVault
updateP2PIndexes
wEth
withdraw(address,uint256)
withdraw(address,uint256,address)
3,918 (-9,858)
393,501 (-438)
894 (0)
405 (0)
5,871 (0)
1,172 (-22)
450 (0)
2,714 (-22)
635 (+67)
1,050 (0)
594 (-22)
2,433 (-22)
1,234 (-22)
1,035 (-22)
427 (-22)
3,810 (+45)
449 (-22)
399 (-66)
742 (-22)
4,065 (-6,315)
669 (0)
752 (-173)
351 (-22)
571 (-22)
569 (-22)
471 (-22)
9,059 (-214)
3,924 (-10,153)
449 (-22)
1,179 (+66)
2,695 (+67)
2,629 (-44)
577 (-44)
4,947 (+66)
2,630 (-67)
2,784 (+67)
2,631 (0)
2,629 (-22)
473,988 (-203)
13,891 (+2,389)
3,917 (-10,199)
936 (-44)
471 (+66)
1,811 (+45)
2,404 (-22)
3,877 (-1,941)
335,708 (-188)
-71.56%
-0.11%
0.00%
0.00%
0.00%
-1.84%
0.00%
-0.80%
+11.80%
0.00%
-3.57%
-0.90%
-1.75%
-2.08%
-4.90%
+1.20%
-4.67%
-14.19%
-2.88%
-60.84%
0.00%
-18.70%
-5.90%
-3.71%
-3.72%
-4.46%
-2.31%
-72.12%
-4.67%
+5.93%
+2.55%
-1.65%
-7.09%
+1.35%
-2.48%
+2.47%
0.00%
-0.83%
-0.04%
+20.77%
-72.25%
-4.49%
+16.30%
+2.55%
-0.91%
-33.36%
-0.06%
555,787 (+8,757)
449,088 (-421)
1,425 (+29)
665 (-25)
162,687 (-43)
8,457 (-3,392)
456 (+1)
260,753 (-254)
635 (+67)
2,259 (+83)
812 (-22)
10,433 (-22)
1,489 (-28)
1,105 (-22)
427 (-22)
246,960 (-46)
453 (-22)
399 (-66)
920 (-13)
322,433 (+49,028)
1,106 (+21)
1,152 (+5)
351 (-22)
687 (-15)
692 (-15)
471 (-22)
59,664 (+451)
256,434 (+18,673)
658 (-26)
8,651 (+252)
23,731 (+53)
5,670 (-44)
4,549 (-49)
4,947 (+66)
5,671 (-67)
43,786 (+67)
21,618 (-18)
23,514 (-49)
473,988 (-203)
13,891 (+2,389)
370,992 (+2,224)
1,146 (-28)
1,271 (+66)
25,120 (+45)
2,404 (-22)
265,176 (+13,909)
335,708 (-188)
+1.60%
-0.09%
+2.08%
-3.62%
-0.03%
-28.63%
+0.22%
-0.10%
+11.80%
+3.81%
-2.64%
-0.21%
-1.85%
-1.95%
-4.90%
-0.02%
-4.63%
-14.19%
-1.39%
+17.93%
+1.94%
+0.44%
-5.90%
-2.14%
-2.12%
-4.46%
+0.76%
+7.85%
-3.80%
+3.00%
+0.22%
-0.77%
-1.07%
+1.35%
-1.17%
+0.15%
-0.08%
-0.21%
-0.04%
+20.77%
+0.60%
-2.39%
+5.48%
+0.18%
-0.91%
+5.54%
-0.06%
634,689 (-118)
439,235 (-438)
894 (0)
405 (0)
177,263 (-44)
4,996 (-3,174)
450 (0)
255,389 (-22)
635 (+67)
1,050 (0)
867 (-22)
16,433 (-22)
1,508 (-22)
1,108 (-22)
427 (-22)
247,949 (+45)
449 (-22)
399 (-66)
742 (-22)
388,716 (-522)
669 (0)
752 (-173)
351 (-22)
571 (-22)
569 (-22)
471 (-22)
12,478 (+1,094)
166,038 (+15,346)
449 (-22)
8,304 (+66)
23,878 (+67)
5,670 (-44)
4,549 (-49)
4,947 (+66)
5,671 (-67)
2,784 (+67)
21,814 (0)
23,812 (-22)
473,988 (-203)
13,891 (+2,389)
394,844 (-8,706)
936 (-44)
471 (+66)
24,479 (+45)
2,404 (-22)
185,246 (-206)
335,708 (-188)
-0.02%
-0.10%
0.00%
0.00%
-0.02%
-38.85%
0.00%
-0.01%
+11.80%
0.00%
-2.47%
-0.13%
-1.44%
-1.95%
-4.90%
+0.02%
-4.67%
-14.19%
-2.88%
-0.13%
0.00%
-18.70%
-5.90%
-3.71%
-3.72%
-4.46%
+9.61%
+10.18%
-4.67%
+0.80%
+0.28%
-0.77%
-1.07%
+1.35%
-1.17%
+2.47%
0.00%
-0.09%
-0.04%
+20.77%
-2.16%
-4.49%
+16.30%
+0.18%
-0.91%
-0.11%
-0.06%
1,099,004 (-1,468)
681,884 (-118)
4,894 (0)
2,405 (0)
314,658 (-88)
23,536 (-139)
2,450 (0)
307,394 (-22)
635 (+67)
9,050 (0)
867 (-22)
16,433 (-22)
2,889 (-22)
1,171 (-22)
427 (-22)
247,949 (+45)
2,449 (-22)
399 (-66)
2,742 (-22)
556,854 (-522)
2,669 (0)
2,752 (-173)
351 (-22)
2,571 (-22)
2,569 (-22)
471 (-22)
204,641 (-171)
2,302,095 (-241)
2,449 (-22)
10,304 (+66)
23,878 (+67)
8,712 (-44)
8,521 (-55)
4,947 (+66)
8,713 (-67)
111,371 (+67)
21,814 (0)
23,812 (-22)
473,988 (-203)
13,891 (+2,389)
2,101,104 (-6,704)
4,936 (-44)
2,471 (+66)
54,533 (+45)
2,404 (-22)
1,943,502 (-6,388)
335,708 (-188)
-0.13%
-0.02%
0.00%
0.00%
-0.03%
-0.59%
0.00%
-0.01%
+11.80%
0.00%
-2.47%
-0.13%
-0.76%
-1.84%
-4.90%
+0.02%
-0.89%
-14.19%
-0.80%
-0.09%
0.00%
-5.91%
-5.90%
-0.85%
-0.85%
-4.46%
-0.08%
-0.01%
-0.89%
+0.64%
+0.28%
-0.50%
-0.64%
+1.35%
-0.76%
+0.06%
0.00%
-0.09%
-0.04%
+20.77%
-0.32%
-0.88%
+2.74%
+0.08%
-0.91%
-0.33%
-0.06%
257 (-6)
40 (0)
519 (+2)
23 (+2)
17 (0)
10 (+4)
2,637 (-225)
1,494 (-150)
1 (0)
205 (-1)
5 (0)
7 (0)
88 (+2)
36 (0)
1 (0)
247 (-25)
2,145 (-175)
1 (0)
347 (+4)
28 (-5)
151 (+2)
10 (-8)
1 (0)
479 (+4)
452 (+4)
1 (0)
4 (0)
64 (-4)
2,391 (-200)
29 (-3)
248 (-25)
2 (0)
4 (0)
1 (0)
2 (0)
21 (0)
249 (-25)
250 (-25)
1 (0)
1 (0)
508 (-10)
475 (+2)
5 (0)
1,310 (0)
1 (0)
85 (-5)
1 (0)
PositionsManager 4,301,120 (-468,039) borrowLogic
liquidateLogic
repayLogic
supplyLogic
withdrawLogic
148,089 (+147,026)
2,901 (+1,673)
679 (-22)
737 (-22)
657 (-22)
+13831.23%
+136.24%
-3.14%
-2.90%
-3.24%
542,124 (+10,087)
329,402 (+61,557)
244,226 (+21,099)
365,318 (+2,499)
264,992 (+17,217)
+1.90%
+22.98%
+9.46%
+0.69%
+6.95%
442,196 (+3,093)
384,583 (-1,153)
161,563 (+16,944)
395,215 (-6,729)
181,419 (-513)
+0.70%
-0.30%
+11.72%
-1.67%
-0.28%
1,095,172 (-1,800)
552,720 (-1,154)
2,298,230 (-566)
2,097,248 (-7,036)
1,939,675 (-6,695)
-0.16%
-0.21%
-0.02%
-0.33%
-0.34%
295 (-8)
27 (-6)
67 (-5)
508 (-12)
85 (-6)
Lens 4,875,711 (-40,654) computeLiquidationRepayAmount
getAllMarkets
getAverageBorrowRatePerBlock
getAverageSupplyRatePerBlock
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerBlock
getCurrentUserSupplyRatePerBlock
getEnteredMarkets
getIndexes
getMainMarketData
getMarketConfiguration
getNextUserBorrowRatePerBlock
getNextUserSupplyRatePerBlock
getRatesPerBlock
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
getUserUnclaimedRewards
initialize
isLiquidatable
57,311 (-188)
31,231 (-22)
46,872 (-17)
40,106 (-17)
13,686 (-17)
93,072 (-17)
10,991 (-17)
13,715 (-61)
56,919 (-56)
58,381 (-100)
6,920 (-22)
16,685 (-39)
92,255 (-34)
49,443 (-866)
63,561 (-56)
63,540 (-100)
39,293 (-39)
229,732 (-124)
24,173 (-17)
22,154 (-17)
342,843 (-124)
54,452 (-188)
45,806 (-105)
24,721 (-83)
11,882 (-22)
20,025 (-44)
2,776 (0)
54,487 (-188)
-0.33%
-0.07%
-0.04%
-0.04%
-0.12%
-0.02%
-0.15%
-0.44%
-0.10%
-0.17%
-0.32%
-0.23%
-0.04%
-1.72%
-0.09%
-0.16%
-0.10%
-0.05%
-0.07%
-0.08%
-0.04%
-0.34%
-0.23%
-0.33%
-0.18%
-0.22%
0.00%
-0.34%
104,762 (-254)
31,231 (-22)
64,362 (-17)
61,730 (-17)
20,869 (-17)
93,072 (-17)
52,048 (-17)
21,588 (-61)
69,872 (-48)
70,230 (-92)
6,920 (-22)
48,783 (-39)
92,255 (-34)
50,224 (-855)
88,737 (-76)
88,598 (-96)
43,035 (-39)
229,732 (-124)
27,413 (-17)
25,766 (-17)
342,843 (-124)
66,682 (-216)
59,663 (-179)
60,374 (-83)
102,461 (+6,056)
44,589 (-61)
71,216 (-48)
59,180 (-188)
-0.24%
-0.07%
-0.03%
-0.03%
-0.08%
-0.02%
-0.03%
-0.28%
-0.07%
-0.13%
-0.32%
-0.08%
-0.04%
-1.67%
-0.09%
-0.11%
-0.09%
-0.05%
-0.06%
-0.07%
-0.04%
-0.32%
-0.30%
-0.14%
+6.28%
-0.14%
-0.07%
-0.32%
96,652 (-266)
31,231 (-22)
48,872 (-17)
46,939 (-17)
13,686 (-17)
93,072 (-17)
52,048 (-17)
18,697 (-61)
58,919 (-56)
59,011 (-100)
6,920 (-22)
36,583 (-39)
92,255 (-34)
50,224 (-855)
77,244 (-56)
77,197 (-100)
39,293 (-39)
229,732 (-124)
27,413 (-17)
25,766 (-17)
342,843 (-124)
58,452 (-188)
58,960 (-188)
39,221 (-83)
90,775 (+3,521)
41,854 (-44)
71,495 (-22)
54,487 (-188)
-0.27%
-0.07%
-0.03%
-0.04%
-0.12%
-0.02%
-0.03%
-0.33%
-0.09%
-0.17%
-0.32%
-0.11%
-0.04%
-1.67%
-0.07%
-0.13%
-0.10%
-0.05%
-0.06%
-0.07%
-0.04%
-0.32%
-0.32%
-0.21%
+4.04%
-0.11%
-0.03%
-0.34%
169,838 (-266)
31,231 (-22)
126,507 (-17)
125,230 (-17)
35,237 (-17)
93,072 (-17)
93,106 (-17)
35,246 (-61)
100,374 (-17)
100,446 (-61)
6,920 (-22)
93,083 (-39)
92,255 (-34)
51,005 (-844)
160,043 (-100)
160,036 (-100)
100,293 (-39)
229,732 (-124)
30,654 (-17)
29,379 (-17)
342,843 (-124)
110,605 (-354)
75,463 (-188)
137,304 (-83)
165,527 (-188)
103,449 (-132)
71,495 (-22)
93,585 (-188)
-0.16%
-0.07%
-0.01%
-0.01%
-0.05%
-0.02%
-0.02%
-0.17%
-0.02%
-0.06%
-0.32%
-0.04%
-0.04%
-1.63%
-0.06%
-0.06%
-0.04%
-0.05%
-0.06%
-0.06%
-0.04%
-0.32%
-0.25%
-0.06%
-0.11%
-0.13%
-0.03%
-0.20%
20 (0)
1 (0)
6 (0)
6 (0)
3 (0)
1 (0)
2 (0)
4 (0)
5 (0)
5 (0)
1 (0)
3 (0)
1 (0)
2 (0)
9 (0)
9 (0)
21 (0)
2 (0)
4 (0)
4 (0)
2 (0)
9 (0)
10 (0)
10 (0)
22 (+2)
10 (0)
247 (-25)
25 (0)
RewardsManager 972,578 (0) accrueUserBorrowUnclaimedRewards
accrueUserSupplyUnclaimedRewards
claimRewards
initialize
2,107 (0)
2,129 (0)
20,740 (-88)
2,753 (0)
0.00%
0.00%
-0.42%
0.00%
23,228 (-118)
28,041 (-49)
68,575 (-56)
68,879 (-24)
-0.51%
-0.17%
-0.08%
-0.03%
23,802 (0)
25,824 (0)
67,376 (-71)
69,148 (0)
0.00%
0.00%
-0.11%
0.00%
56,277 (0)
57,058 (0)
184,999 (-132)
69,148 (0)
0.00%
0.00%
-0.07%
0.00%
576 (+1)
785 (-8)
24 (0)
247 (-25)
InterestRatesManager 806,808 (-20,220) updateP2PIndexes 618 (0) 0.00% 27,186 (-100) -0.37% 23,286 (0) 0.00% 102,847 (0) 0.00% 2,314 (-4)

@MerlinEgalite MerlinEgalite marked this pull request as draft October 12, 2022 14:33
@MerlinEgalite MerlinEgalite marked this pull request as ready for review October 12, 2022 14:54
@Rubilmax
Copy link
Collaborator

Rubilmax commented Oct 13, 2022

#1353 is a way of viewing the diff between this branch and the v1.10.1 tag: there should be no diff under contracts/compound or contracts/aave-v2

Rubilmax
Rubilmax previously approved these changes Oct 13, 2022
Rubilmax
Rubilmax previously approved these changes Oct 13, 2022
@MerlinEgalite MerlinEgalite changed the base branch from main to dev October 13, 2022 09:55
Copy link
Collaborator

@Rubilmax Rubilmax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to review again

contracts/aave-v2/libraries/Types.sol Show resolved Hide resolved
contracts/aave-v2/libraries/Types.sol Show resolved Hide resolved
contracts/aave-v2/lens/IndexesLens.sol Outdated Show resolved Hide resolved
@Rubilmax
Copy link
Collaborator

Rubilmax commented Oct 13, 2022

You're right, we agreed on resetting the state to v1.10.1, so this PR is LGTM on dev to me. But this can't be merged on main as is, because otherwise we'd get an intermediary version on main which does not correspond to any deployed version. We still have to apply commits related to the changes for the stEth (before merging to main), right?

PS: seen with @MerlinEgalite, we're crafting PRs on top of this one

@Rubilmax Rubilmax self-requested a review October 13, 2022 11:41
Copy link
Collaborator

@MathisGD MathisGD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at the diff with 1.10, it's ok

@MerlinEgalite MerlinEgalite merged commit fefab84 into dev Oct 17, 2022
@Rubilmax Rubilmax deleted the refactor/reset-state branch October 19, 2022 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reset state to v1.10.1 release
4 participants