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

Fix rates lens interface once and for all #1260

Merged
merged 2 commits into from
Sep 2, 2022
Merged

Conversation

Rubilmax
Copy link
Collaborator

Pull Request

Issue(s) fixed

This pull request fixes #to-complete

or

This pull request fixes:

  • #to-complete
  • #to-complete
  • ...

@github-actions
Copy link

github-actions bot commented Aug 30, 2022

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

Generated at commit: 64fbe6a14da9821dcb670cff40bf395a3d7076e5, compared to commit: aee94360aa5f2591ef32a704db51bc94e130319f

🧾 Summary

Contract Method Avg (+/-) %
Lens computeLiquidationRepayAmount
getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getIndexes
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
-6,749 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-77 ✅
-77 ✅
-43 ✅
-86 ✅
-81 ✅
-82 ✅
-43 ✅
-215 ✅
-43 ✅
-43 ✅
-215 ✅
-107 ✅
-80 ✅
-43 ✅
-8,200 ✅
-6.46%
-0.11%
-0.11%
-0.23%
-0.11%
-0.11%
-0.23%
-0.15%
-0.15%
-0.21%
-0.15%
-0.12%
-0.12%
-0.13%
-0.10%
-0.16%
-0.19%
-0.10%
-0.11%
-0.10%
-0.07%
-6.02%
ExitPositionsManager withdrawLogic +2,198 ❌ +1.09%
Morpho borrow(address,uint256)
borrowBalanceInOf
deltas
market
p2pBorrowIndex
p2pSupplyIndex
poolIndexes
supplyBalanceInOf
withdraw(address,uint256)
+295 ❌
+2 ❌
+4 ❌
+1 ❌
+1 ❌
+1 ❌
+2 ❌
+2 ❌
+1,862 ❌
+0.07%
+0.11%
+0.24%
+0.09%
+0.13%
+0.12%
+0.20%
+0.14%
+0.97%
InterestRatesManager updateIndexes +9 ❌ +0.07%
EntryPositionsManager borrowLogic +260 ❌ +0.07%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Lens 4,011,819 (-55,068) computeLiquidationRepayAmount
getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getIndexes
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
73,487 (-86)
27,524 (-43)
29,453 (-43)
18,803 (-43)
20,065 (-43)
20,066 (-43)
18,832 (-43)
49,454 (-86)
49,547 (-86)
17,982 (-43)
59,179 (-86)
49,804 (-86)
49,836 (-86)
30,642 (-43)
222,608 (-215)
26,100 (-43)
22,366 (-43)
220,684 (-215)
81,175 (-86)
78,307 (-86)
30,308 (-43)
82,521 (-8,228)
-0.12%
-0.16%
-0.15%
-0.23%
-0.21%
-0.21%
-0.23%
-0.17%
-0.17%
-0.24%
-0.15%
-0.17%
-0.17%
-0.14%
-0.10%
-0.16%
-0.19%
-0.10%
-0.11%
-0.11%
-0.14%
-9.07%
97,779 (-6,749)
37,732 (-43)
39,541 (-43)
18,808 (-43)
37,582 (-43)
37,583 (-43)
18,836 (-43)
52,085 (-77)
52,178 (-77)
20,326 (-43)
59,179 (-86)
65,801 (-81)
65,781 (-82)
33,831 (-43)
223,082 (-215)
26,345 (-43)
22,689 (-43)
221,146 (-215)
100,214 (-107)
82,473 (-80)
57,753 (-43)
128,082 (-8,200)
-6.46%
-0.11%
-0.11%
-0.23%
-0.11%
-0.11%
-0.23%
-0.15%
-0.15%
-0.21%
-0.15%
-0.12%
-0.12%
-0.13%
-0.10%
-0.16%
-0.19%
-0.10%
-0.11%
-0.10%
-0.07%
-6.02%
86,661 (-33,290)
28,165 (-43)
29,721 (-43)
18,803 (-43)
37,582 (-43)
37,583 (-43)
18,832 (-43)
49,505 (-86)
49,598 (-86)
21,269 (-43)
59,179 (-86)
61,950 (-86)
61,992 (-86)
30,676 (-43)
223,082 (-215)
26,108 (-43)
22,476 (-43)
221,146 (-215)
83,762 (-86)
81,099 (-86)
53,774 (-43)
124,768 (-4,260)
-27.75%
-0.15%
-0.14%
-0.23%
-0.11%
-0.11%
-0.23%
-0.17%
-0.17%
-0.20%
-0.15%
-0.14%
-0.14%
-0.14%
-0.10%
-0.16%
-0.19%
-0.10%
-0.10%
-0.11%
-0.08%
-3.30%
127,728 (-172)
85,477 (-43)
88,263 (-43)
18,820 (-43)
55,100 (-43)
55,101 (-43)
18,849 (-43)
62,207 (-43)
62,300 (-43)
22,200 (-43)
59,179 (-86)
121,781 (-86)
121,835 (-86)
81,895 (-43)
223,556 (-215)
27,065 (-43)
23,441 (-43)
221,609 (-215)
154,807 (-172)
93,480 (-43)
101,027 (-43)
177,021 (-21,481)
-0.13%
-0.05%
-0.05%
-0.23%
-0.08%
-0.08%
-0.23%
-0.07%
-0.07%
-0.19%
-0.15%
-0.07%
-0.07%
-0.05%
-0.10%
-0.16%
-0.18%
-0.10%
-0.11%
-0.05%
-0.04%
-10.82%
7 (0)
6 (0)
6 (0)
3 (0)
2 (0)
2 (0)
4 (0)
5 (0)
5 (0)
5 (0)
1 (0)
9 (0)
9 (0)
21 (0)
2 (0)
4 (0)
4 (0)
2 (0)
6 (0)
7 (0)
10 (0)
23 (0)
ExitPositionsManager 3,623,029 (0) withdrawLogic 724 (0) 0.00% 203,092 (+2,198) +1.09% 121,707 (0) 0.00% 2,111,229 (0) 0.00% 79 (-1)
Morpho 3,436,193 (0) borrow(address,uint256)
borrowBalanceInOf
deltas
market
p2pBorrowIndex
p2pSupplyIndex
poolIndexes
supplyBalanceInOf
withdraw(address,uint256)
4,098 (0)
916 (0)
1,050 (0)
986 (0)
571 (0)
635 (0)
786 (0)
936 (0)
4,034 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
401,903 (+295)
1,827 (+2)
1,655 (+4)
1,164 (+1)
770 (+1)
834 (+1)
1,009 (+2)
1,482 (+2)
194,802 (+1,862)
+0.07%
+0.11%
+0.24%
+0.09%
+0.13%
+0.12%
+0.20%
+0.14%
+0.97%
385,520 (0)
916 (0)
1,050 (0)
986 (0)
571 (0)
635 (0)
786 (0)
936 (0)
125,660 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
1,896,632 (0)
4,916 (0)
9,050 (0)
2,986 (0)
2,571 (0)
2,635 (0)
2,786 (0)
4,936 (0)
2,118,782 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
245 (0)
329 (-1)
357 (-2)
313 (-2)
231 (-1)
231 (-1)
242 (-2)
315 (-1)
84 (-1)
InterestRatesManager 803,602 (0) updateIndexes 634 (0) 0.00% 12,942 (+9) +0.07% 14,185 (0) 0.00% 51,585 (0) 0.00% 2,709 (-2)
EntryPositionsManager 2,795,405 (0) borrowLogic 490 (0) 0.00% 380,365 (+260) +0.07% 253,176 (0) 0.00% 1,892,655 (0) 0.00% 279 (0)

@github-actions
Copy link

github-actions bot commented Aug 30, 2022

Morpho-compound gas impacts (eth-mainnet)

Generated at commit: 64fbe6a14da9821dcb670cff40bf395a3d7076e5, compared to commit: aee94360aa5f2591ef32a704db51bc94e130319f

🧾 Summary

Contract Method Avg (+/-) %
Morpho borrowBalanceInOf
cEth
deltas
lastPoolIndexes
liquidate
marketParameters
p2pBorrowIndex
p2pSupplyIndex
supplyBalanceInOf
+6 ❌
+1,740 ❌
+11 ❌
+4 ❌
-2,277 ✅
+6 ❌
+1 ❌
+1 ❌
+3 ❌
+0.42%
+261.65%
+0.49%
+0.44%
-0.70%
+0.55%
+0.15%
+0.14%
+0.26%
Lens computeLiquidationRepayAmount
getUserMaxCapacitiesForAsset
isLiquidatable
-3,301 ✅
-4,027 ✅
+180 ❌
-3.05%
-3.93%
+0.31%
PositionsManager liquidateLogic -1,961 ✅ -0.59%
RewardsManager accrueUserBorrowUnclaimedRewards
accrueUserSupplyUnclaimedRewards
+37 ❌
+33 ❌
+0.16%
+0.12%
InterestRatesManager updateP2PIndexes +20 ❌ +0.07%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Morpho 3,267,385 (0) borrowBalanceInOf
cEth
deltas
lastPoolIndexes
liquidate
marketParameters
p2pBorrowIndex
p2pSupplyIndex
supplyBalanceInOf
894 (0)
2,405 (+2,000)
1,050 (0)
742 (0)
4,065 (0)
669 (0)
571 (0)
569 (0)
936 (0)
0.00%
+493.83%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
1,425 (+6)
2,405 (+1,740)
2,259 (+11)
920 (+4)
322,433 (-2,277)
1,106 (+6)
687 (+1)
692 (+1)
1,146 (+3)
+0.42%
+261.65%
+0.49%
+0.44%
-0.70%
+0.55%
+0.15%
+0.14%
+0.26%
894 (0)
2,405 (+2,000)
1,050 (0)
742 (0)
388,716 (+42)
669 (0)
571 (0)
569 (0)
936 (0)
0.00%
+493.83%
0.00%
0.00%
+0.01%
0.00%
0.00%
0.00%
0.00%
4,894 (0)
2,405 (0)
9,050 (0)
2,742 (0)
556,854 (0)
2,669 (0)
2,571 (0)
2,569 (0)
4,936 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
519 (-6)
2 (-21)
205 (-2)
347 (-8)
28 (-1)
151 (-2)
479 (-6)
452 (-6)
475 (-6)
Lens 4,798,203 (-77,508) computeLiquidationRepayAmount
getUserMaxCapacitiesForAsset
isLiquidatable
57,311 (0)
11,882 (0)
54,487 (0)
0.00%
0.00%
0.00%
104,762 (-3,301)
98,434 (-4,027)
59,180 (+180)
-3.05%
-3.93%
+0.31%
96,652 (0)
86,300 (-4,475)
54,487 (0)
0.00%
-4.93%
0.00%
169,838 (-10)
161,612 (-3,915)
93,585 (0)
-0.01%
-2.37%
0.00%
20 (-1)
22 (0)
25 (-1)
PositionsManager 4,301,120 (0) liquidateLogic 2,901 (0) 0.00% 329,402 (-1,961) -0.59% 384,583 (+22) +0.01% 552,720 (0) 0.00% 27 (-1)
RewardsManager 972,578 (0) accrueUserBorrowUnclaimedRewards
accrueUserSupplyUnclaimedRewards
2,107 (0)
2,129 (0)
0.00%
0.00%
23,260 (+37)
28,074 (+33)
+0.16%
+0.12%
23,802 (0)
25,824 (0)
0.00%
0.00%
56,277 (0)
57,058 (0)
0.00%
0.00%
578 (-1)
788 (-1)
InterestRatesManager 806,808 (0) updateP2PIndexes 618 (0) 0.00% 26,880 (+20) +0.07% 23,286 (0) 0.00% 102,847 (0) 0.00% 2,518 (-2)

@github-actions
Copy link

github-actions bot commented Aug 30, 2022

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

Generated at commit: 64fbe6a14da9821dcb670cff40bf395a3d7076e5, compared to commit: aee94360aa5f2591ef32a704db51bc94e130319f

🧾 Summary

Contract Method Avg (+/-) %
Lens computeLiquidationRepayAmount
getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getIndexes
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
-6,349 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-77 ✅
-77 ✅
-43 ✅
-86 ✅
-81 ✅
-82 ✅
-43 ✅
-215 ✅
-43 ✅
-43 ✅
-215 ✅
-108 ✅
-79 ✅
-43 ✅
-8,326 ✅
-6.12%
-0.11%
-0.10%
-0.23%
-0.11%
-0.11%
-0.23%
-0.15%
-0.15%
-0.21%
-0.14%
-0.12%
-0.12%
-0.13%
-0.10%
-0.16%
-0.19%
-0.09%
-0.11%
-0.10%
-0.07%
-6.10%
ExitPositionsManager withdrawLogic +2,121 ❌ +1.09%
Morpho borrow(address,uint256)
borrowBalanceInOf
deltas
market
p2pBorrowIndex
p2pSupplyIndex
poolIndexes
supplyBalanceInOf
withdraw(address,uint256)
+282 ❌
+2 ❌
+4 ❌
+1 ❌
+1 ❌
+1 ❌
+2 ❌
+2 ❌
+1,794 ❌
+0.07%
+0.11%
+0.24%
+0.09%
+0.13%
+0.12%
+0.20%
+0.14%
+0.96%
InterestRatesManager updateIndexes +9 ❌ +0.07%
EntryPositionsManager borrowLogic +248 ❌ +0.07%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Lens 4,011,819 (-55,068) computeLiquidationRepayAmount
getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getIndexes
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
73,487 (-86)
27,524 (-43)
29,661 (-43)
18,803 (-43)
20,065 (-43)
20,066 (-43)
18,832 (-43)
49,454 (-86)
49,547 (-86)
17,982 (-43)
59,387 (-86)
49,804 (-86)
49,836 (-86)
30,642 (-43)
215,108 (-215)
26,100 (-43)
22,574 (-43)
227,724 (-215)
81,175 (-86)
78,397 (-86)
30,353 (-43)
82,611 (-7,939)
-0.12%
-0.16%
-0.14%
-0.23%
-0.21%
-0.21%
-0.23%
-0.17%
-0.17%
-0.24%
-0.14%
-0.17%
-0.17%
-0.14%
-0.10%
-0.16%
-0.19%
-0.09%
-0.11%
-0.11%
-0.14%
-8.77%
97,428 (-6,349)
37,732 (-43)
41,083 (-43)
18,808 (-43)
37,582 (-43)
37,583 (-43)
18,836 (-43)
52,085 (-77)
52,178 (-77)
20,326 (-43)
59,387 (-86)
65,742 (-81)
65,781 (-82)
33,831 (-43)
215,582 (-215)
26,345 (-43)
22,897 (-43)
228,186 (-215)
100,281 (-108)
82,493 (-79)
57,798 (-43)
128,186 (-8,326)
-6.12%
-0.11%
-0.10%
-0.23%
-0.11%
-0.11%
-0.23%
-0.15%
-0.15%
-0.21%
-0.14%
-0.12%
-0.12%
-0.13%
-0.10%
-0.16%
-0.19%
-0.09%
-0.11%
-0.10%
-0.07%
-6.10%
86,751 (-30,402)
28,165 (-43)
31,253 (-43)
18,803 (-43)
37,582 (-43)
37,583 (-43)
18,832 (-43)
49,505 (-86)
49,598 (-86)
21,269 (-43)
59,387 (-86)
61,950 (-86)
61,992 (-86)
30,676 (-43)
215,582 (-215)
26,108 (-43)
22,684 (-43)
228,186 (-215)
83,807 (-86)
81,099 (-86)
53,819 (-43)
124,858 (-5,192)
-25.95%
-0.15%
-0.14%
-0.23%
-0.11%
-0.11%
-0.23%
-0.17%
-0.17%
-0.20%
-0.14%
-0.14%
-0.14%
-0.14%
-0.10%
-0.16%
-0.19%
-0.09%
-0.10%
-0.11%
-0.08%
-3.99%
124,930 (-172)
85,477 (-43)
92,471 (-43)
18,820 (-43)
55,100 (-43)
55,101 (-43)
18,849 (-43)
62,207 (-43)
62,300 (-43)
22,200 (-43)
59,387 (-86)
121,781 (-86)
121,835 (-86)
81,895 (-43)
216,056 (-215)
27,065 (-43)
23,649 (-43)
228,649 (-215)
154,987 (-172)
93,525 (-43)
101,072 (-43)
177,111 (-14,192)
-0.14%
-0.05%
-0.05%
-0.23%
-0.08%
-0.08%
-0.23%
-0.07%
-0.07%
-0.19%
-0.14%
-0.07%
-0.07%
-0.05%
-0.10%
-0.16%
-0.18%
-0.09%
-0.11%
-0.05%
-0.04%
-7.42%
7 (0)
6 (0)
6 (0)
3 (0)
2 (0)
2 (0)
4 (0)
5 (0)
5 (0)
5 (0)
1 (0)
9 (0)
9 (0)
21 (0)
2 (0)
4 (0)
4 (0)
2 (0)
6 (0)
7 (0)
10 (0)
23 (0)
ExitPositionsManager 3,623,029 (0) withdrawLogic 724 (0) 0.00% 197,082 (+2,121) +1.09% 112,148 (0) 0.00% 2,110,183 (0) 0.00% 79 (-1)
Morpho 3,436,193 (0) borrow(address,uint256)
borrowBalanceInOf
deltas
market
p2pBorrowIndex
p2pSupplyIndex
poolIndexes
supplyBalanceInOf
withdraw(address,uint256)
4,098 (0)
916 (0)
1,050 (0)
986 (0)
571 (0)
635 (0)
786 (0)
936 (0)
4,034 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
396,470 (+282)
1,827 (+2)
1,655 (+4)
1,164 (+1)
770 (+1)
834 (+1)
1,009 (+2)
1,482 (+2)
189,152 (+1,794)
+0.07%
+0.11%
+0.24%
+0.09%
+0.13%
+0.12%
+0.20%
+0.14%
+0.96%
385,478 (0)
916 (0)
1,050 (0)
986 (0)
571 (0)
635 (0)
786 (0)
936 (0)
116,101 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
1,895,904 (0)
4,916 (0)
9,050 (0)
2,986 (0)
2,571 (0)
2,635 (0)
2,786 (0)
4,936 (0)
2,117,736 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
245 (0)
329 (-1)
357 (-2)
313 (-2)
231 (-1)
231 (-1)
242 (-2)
315 (-1)
84 (-1)
InterestRatesManager 803,602 (0) updateIndexes 634 (0) 0.00% 12,942 (+9) +0.07% 14,185 (0) 0.00% 51,585 (0) 0.00% 2,709 (-2)
EntryPositionsManager 2,795,405 (0) borrowLogic 490 (0) 0.00% 375,314 (+248) +0.07% 243,216 (0) 0.00% 1,891,928 (0) 0.00% 279 (0)

@github-actions
Copy link

github-actions bot commented Aug 30, 2022

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

Generated at commit: 64fbe6a14da9821dcb670cff40bf395a3d7076e5, compared to commit: aee94360aa5f2591ef32a704db51bc94e130319f

🧾 Summary

Contract Method Avg (+/-) %
Lens computeLiquidationRepayAmount
getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getIndexes
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
-6,731 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-43 ✅
-77 ✅
-77 ✅
-43 ✅
-86 ✅
-81 ✅
-82 ✅
-43 ✅
-215 ✅
-43 ✅
-43 ✅
-215 ✅
-108 ✅
-79 ✅
-43 ✅
-10,567 ✅
-6.39%
-0.11%
-0.10%
-0.23%
-0.11%
-0.11%
-0.23%
-0.15%
-0.15%
-0.21%
-0.14%
-0.12%
-0.12%
-0.13%
-0.10%
-0.16%
-0.19%
-0.09%
-0.11%
-0.10%
-0.07%
-7.62%
ExitPositionsManager withdrawLogic +2,182 ❌ +1.09%
Morpho borrow(address,uint256)
borrowBalanceInOf
deltas
market
p2pBorrowIndex
p2pSupplyIndex
poolIndexes
supplyBalanceInOf
withdraw(address,uint256)
+373 ❌
+2 ❌
+4 ❌
+1 ❌
+1 ❌
+1 ❌
+2 ❌
+2 ❌
+1,848 ❌
+0.09%
+0.11%
+0.24%
+0.09%
+0.13%
+0.12%
+0.20%
+0.14%
+0.96%
EntryPositionsManager borrowLogic +328 ❌ +0.09%
InterestRatesManager updateIndexes +10 ❌ +0.08%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Lens 4,011,819 (-55,068) computeLiquidationRepayAmount
getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentBorrowBalanceInOf
getCurrentP2PBorrowIndex
getCurrentP2PSupplyIndex
getCurrentSupplyBalanceInOf
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getIndexes
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
getTotalBorrow
getTotalMarketBorrow
getTotalMarketSupply
getTotalSupply
getUserBalanceStates
getUserHealthFactor
getUserLiquidityDataForAsset
getUserMaxCapacitiesForAsset
73,487 (-86)
27,524 (-43)
29,661 (-43)
18,803 (-43)
20,065 (-43)
20,066 (-43)
18,832 (-43)
49,454 (-86)
49,547 (-86)
17,982 (-43)
59,387 (-86)
49,804 (-86)
49,836 (-86)
30,642 (-43)
215,108 (-215)
26,100 (-43)
22,574 (-43)
227,724 (-215)
81,175 (-86)
78,397 (-86)
30,353 (-43)
82,611 (-8,275)
-0.12%
-0.16%
-0.14%
-0.23%
-0.21%
-0.21%
-0.23%
-0.17%
-0.17%
-0.24%
-0.14%
-0.17%
-0.17%
-0.14%
-0.10%
-0.16%
-0.19%
-0.09%
-0.11%
-0.11%
-0.14%
-9.10%
98,636 (-6,731)
37,732 (-43)
41,083 (-43)
18,808 (-43)
37,582 (-43)
37,583 (-43)
18,836 (-43)
52,085 (-77)
52,178 (-77)
20,326 (-43)
59,387 (-86)
65,742 (-81)
65,781 (-82)
33,831 (-43)
215,582 (-215)
26,345 (-43)
22,897 (-43)
228,186 (-215)
100,281 (-108)
82,493 (-79)
57,798 (-43)
128,186 (-10,567)
-6.39%
-0.11%
-0.10%
-0.23%
-0.11%
-0.11%
-0.23%
-0.15%
-0.15%
-0.21%
-0.14%
-0.12%
-0.12%
-0.13%
-0.10%
-0.16%
-0.19%
-0.09%
-0.11%
-0.10%
-0.07%
-7.62%
86,751 (-33,078)
28,165 (-43)
31,253 (-43)
18,803 (-43)
37,582 (-43)
37,583 (-43)
18,832 (-43)
49,505 (-86)
49,598 (-86)
21,269 (-43)
59,387 (-86)
61,950 (-86)
61,992 (-86)
30,676 (-43)
215,582 (-215)
26,108 (-43)
22,684 (-43)
228,186 (-215)
83,807 (-86)
81,099 (-86)
53,819 (-43)
124,858 (-6,876)
-27.60%
-0.15%
-0.14%
-0.23%
-0.11%
-0.11%
-0.23%
-0.17%
-0.17%
-0.20%
-0.14%
-0.14%
-0.14%
-0.14%
-0.10%
-0.16%
-0.19%
-0.09%
-0.10%
-0.11%
-0.08%
-5.22%
127,818 (-172)
85,477 (-43)
92,471 (-43)
18,820 (-43)
55,100 (-43)
55,101 (-43)
18,849 (-43)
62,207 (-43)
62,300 (-43)
22,200 (-43)
59,387 (-86)
121,781 (-86)
121,835 (-86)
81,895 (-43)
216,056 (-215)
27,065 (-43)
23,649 (-43)
228,649 (-215)
154,987 (-172)
93,525 (-43)
101,072 (-43)
177,111 (-19,224)
-0.13%
-0.05%
-0.05%
-0.23%
-0.08%
-0.08%
-0.23%
-0.07%
-0.07%
-0.19%
-0.14%
-0.07%
-0.07%
-0.05%
-0.10%
-0.16%
-0.18%
-0.09%
-0.11%
-0.05%
-0.04%
-9.79%
7 (0)
6 (0)
6 (0)
3 (0)
2 (0)
2 (0)
4 (0)
5 (0)
5 (0)
5 (0)
1 (0)
9 (0)
9 (0)
21 (0)
2 (0)
4 (0)
4 (0)
2 (0)
6 (0)
7 (0)
10 (0)
23 (0)
ExitPositionsManager 3,623,029 (0) withdrawLogic 724 (0) 0.00% 201,950 (+2,182) +1.09% 113,376 (0) 0.00% 2,098,211 (0) 0.00% 79 (-1)
Morpho 3,436,193 (0) borrow(address,uint256)
borrowBalanceInOf
deltas
market
p2pBorrowIndex
p2pSupplyIndex
poolIndexes
supplyBalanceInOf
withdraw(address,uint256)
4,098 (0)
916 (0)
1,050 (0)
986 (0)
571 (0)
635 (0)
786 (0)
936 (0)
4,034 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
404,040 (+373)
1,827 (+2)
1,655 (+4)
1,164 (+1)
770 (+1)
834 (+1)
1,009 (+2)
1,482 (+2)
193,715 (+1,848)
+0.09%
+0.11%
+0.24%
+0.09%
+0.13%
+0.12%
+0.20%
+0.14%
+0.96%
386,443 (0)
916 (0)
1,050 (0)
986 (0)
571 (0)
635 (0)
786 (0)
936 (0)
117,328 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
1,902,296 (0)
4,916 (0)
9,050 (0)
2,986 (0)
2,571 (0)
2,635 (0)
2,786 (0)
4,936 (0)
2,105,764 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
245 (0)
329 (-1)
357 (-2)
313 (-2)
231 (-1)
231 (-1)
242 (-2)
315 (-1)
84 (-1)
EntryPositionsManager 2,795,405 (0) borrowLogic 490 (0) 0.00% 382,128 (+328) +0.09% 244,807 (0) 0.00% 1,898,319 (0) 0.00% 279 (0)
InterestRatesManager 803,602 (0) updateIndexes 634 (0) 0.00% 12,942 (+10) +0.08% 14,185 (0) 0.00% 51,585 (0) 0.00% 2,709 (-2)

contracts/aave-v2/interfaces/ILens.sol Outdated Show resolved Hide resolved
contracts/aave-v2/interfaces/ILens.sol Outdated Show resolved Hide resolved
contracts/aave-v2/interfaces/ILens.sol Show resolved Hide resolved
contracts/compound/interfaces/ILens.sol Show resolved Hide resolved
contracts/compound/interfaces/ILens.sol Show resolved Hide resolved
contracts/compound/interfaces/ILens.sol Show resolved Hide resolved
Copy link
Contributor

@MerlinEgalite MerlinEgalite left a comment

Choose a reason for hiding this comment

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

It changes the interface of Compound's lens why?

Agree with @QGarchery's recommendations

@Rubilmax Rubilmax merged commit 02f1a5b into dev Sep 2, 2022
@Rubilmax Rubilmax deleted the fix/lens-interface-3 branch September 2, 2022 13:16
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.

4 participants