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

Add Aave-V2 live tests #1251

Merged
merged 9 commits into from
Sep 2, 2022
Merged

Add Aave-V2 live tests #1251

merged 9 commits into from
Sep 2, 2022

Conversation

Rubilmax
Copy link
Collaborator

@Rubilmax Rubilmax commented Aug 23, 2022

Pull Request

Issue(s) fixed

Fuzzing on prod cannot be done until Morpho's endpoints are not upgraded on-chain (User.sol now uses all Morpho's endpoints instead of only 1 of each supply/borrow/withdraw/repay)

@github-actions
Copy link

github-actions bot commented Aug 23, 2022

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

Generated at commit: 1bc424a26ca616c4722e6af734f0dca32a18f83a, compared to commit: db1470ccf5064f3ebd39c4d1f2b5eaff9a2e0fdf

🧾 Summary

Contract Method Avg (+/-) %
IncentivesVault setIncentivesTreasuryVault +1,400 ❌ +28.06%
Morpho aaveIncentivesController
createMarket
initialize
pool
rewardsManager
setIncentivesVault
setRewardsManager
setTreasuryVault
+2 ❌
+31 ❌
+4,523 ❌
-1 ✅
+2 ❌
+7 ❌
+9 ❌
+14 ❌
+0.31%
+0.01%
+2.01%
-0.24%
+0.32%
+0.03%
+0.04%
+0.06%
RewardsManagerOnPolygon initialize +18 ❌ +0.02%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
IncentivesVault 572,301 (0) setIncentivesTreasuryVault 2,583 (0) 0.00% 6,389 (+1,400) +28.06% 7,192 (+1,400) +24.17% 8,592 (+2,800) +48.34% 4 (0)
Morpho 3,436,193 (0) aaveIncentivesController
createMarket
initialize
pool
rewardsManager
setIncentivesVault
setRewardsManager
setTreasuryVault
427 (0)
2,847 (0)
3,663 (0)
406 (0)
404 (0)
2,695 (0)
2,631 (0)
2,673 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
646 (+2)
207,993 (+31)
230,102 (+4,523)
410 (-1)
625 (+2)
23,712 (+7)
21,592 (+9)
23,519 (+14)
+0.31%
+0.01%
+2.01%
-0.24%
+0.32%
+0.03%
+0.04%
+0.06%
427 (0)
203,554 (0)
231,146 (+4,500)
406 (0)
404 (0)
23,878 (0)
21,814 (0)
23,856 (0)
0.00%
0.00%
+1.99%
0.00%
0.00%
0.00%
0.00%
0.00%
2,427 (0)
229,201 (0)
231,146 (+4,500)
2,406 (0)
2,404 (0)
23,878 (0)
21,814 (0)
23,856 (0)
0.00%
0.00%
+1.99%
0.00%
0.00%
0.00%
0.00%
0.00%
2,025 (+63)
1,092 (+45)
218 (+9)
2,436 (+81)
2,002 (+63)
219 (+9)
220 (+9)
221 (+9)
RewardsManagerOnPolygon 1,153,164 (0) initialize 2,742 (0) 0.00% 92,714 (+18) +0.02% 93,129 (0) 0.00% 93,129 (0) 0.00% 218 (+9)

@github-actions
Copy link

github-actions bot commented Aug 23, 2022

Morpho-compound gas impacts (eth-mainnet)

Generated at commit: 1bc424a26ca616c4722e6af734f0dca32a18f83a, compared to commit: db1470ccf5064f3ebd39c4d1f2b5eaff9a2e0fdf

🧾 Summary

Contract Method Avg (+/-) %
Lens computeLiquidationRepayAmount -3,872 ✅ -3.56%
Morpho borrowBalanceInOf
createMarket
deltas
lastPoolIndexes
marketParameters
+1 ❌
+1,153 ❌
+11 ❌
+1 ❌
+6 ❌
+0.07%
+0.44%
+0.49%
+0.11%
+0.55%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Lens 4,798,203 (0) computeLiquidationRepayAmount 57,311 (0) 0.00% 104,762 (-3,872) -3.56% 96,652 (0) 0.00% 169,838 (-10) -0.01% 20 (0)
Morpho 3,267,385 (0) borrowBalanceInOf
createMarket
deltas
lastPoolIndexes
marketParameters
894 (0)
2,714 (0)
1,050 (0)
742 (0)
669 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
1,425 (+1)
260,764 (+1,153)
2,259 (+11)
920 (+1)
1,106 (+6)
+0.07%
+0.44%
+0.49%
+0.11%
+0.55%
894 (0)
255,389 (0)
1,050 (0)
742 (0)
669 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
4,894 (0)
307,394 (+7,000)
9,050 (0)
2,742 (0)
2,669 (0)
0.00%
+2.33%
0.00%
0.00%
0.00%
519 (-1)
1,500 (0)
205 (-2)
347 (-2)
151 (-2)

@github-actions
Copy link

github-actions bot commented Aug 23, 2022

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

Generated at commit: 1bc424a26ca616c4722e6af734f0dca32a18f83a, compared to commit: db1470ccf5064f3ebd39c4d1f2b5eaff9a2e0fdf

🧾 Summary

Contract Method Avg (+/-) %
IncentivesVault setIncentivesTreasuryVault +1,400 ❌ +28.06%
Morpho aaveIncentivesController
createMarket
initialize
pool
rewardsManager
setIncentivesVault
setRewardsManager
setTreasuryVault
+2 ❌
+29 ❌
+4,523 ❌
-1 ✅
+2 ❌
+7 ❌
+9 ❌
+14 ❌
+0.31%
+0.01%
+2.01%
-0.24%
+0.32%
+0.03%
+0.04%
+0.06%
RewardsManagerOnMainnetAndAvalanche initialize +18 ❌ +0.02%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
IncentivesVault 572,301 (0) setIncentivesTreasuryVault 2,583 (0) 0.00% 6,389 (+1,400) +28.06% 7,192 (+1,400) +24.17% 8,592 (+2,800) +48.34% 4 (0)
Morpho 3,436,193 (0) aaveIncentivesController
createMarket
initialize
pool
rewardsManager
setIncentivesVault
setRewardsManager
setTreasuryVault
427 (0)
2,847 (0)
3,663 (0)
406 (0)
404 (0)
2,695 (0)
2,631 (0)
2,673 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
646 (+2)
203,700 (+29)
230,102 (+4,523)
410 (-1)
625 (+2)
23,712 (+7)
21,592 (+9)
23,519 (+14)
+0.31%
+0.01%
+2.01%
-0.24%
+0.32%
+0.03%
+0.04%
+0.06%
427 (0)
198,698 (0)
231,146 (+4,500)
406 (0)
404 (0)
23,878 (0)
21,814 (0)
23,856 (0)
0.00%
0.00%
+1.99%
0.00%
0.00%
0.00%
0.00%
0.00%
2,427 (0)
227,598 (0)
231,146 (+4,500)
2,406 (0)
2,404 (0)
23,878 (0)
21,814 (0)
23,856 (0)
0.00%
0.00%
+1.99%
0.00%
0.00%
0.00%
0.00%
0.00%
2,025 (+63)
1,092 (+45)
218 (+9)
2,436 (+81)
2,002 (+63)
219 (+9)
220 (+9)
221 (+9)
RewardsManagerOnMainnetAndAvalanche 1,133,544 (0) initialize 2,742 (0) 0.00% 92,714 (+18) +0.02% 93,129 (0) 0.00% 93,129 (0) 0.00% 218 (+9)

@github-actions
Copy link

github-actions bot commented Aug 23, 2022

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

Generated at commit: 1bc424a26ca616c4722e6af734f0dca32a18f83a, compared to commit: db1470ccf5064f3ebd39c4d1f2b5eaff9a2e0fdf

🧾 Summary

Contract Method Avg (+/-) %
IncentivesVault setIncentivesTreasuryVault +1,400 ❌ +28.06%
Morpho aaveIncentivesController
createMarket
initialize
pool
rewardsManager
setIncentivesVault
setRewardsManager
setTreasuryVault
+2 ❌
+31 ❌
+4,523 ❌
-1 ✅
+2 ❌
+7 ❌
+9 ❌
+14 ❌
+0.31%
+0.01%
+2.01%
-0.24%
+0.32%
+0.03%
+0.04%
+0.06%
RewardsManagerOnMainnetAndAvalanche initialize +18 ❌ +0.02%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
IncentivesVault 572,301 (0) setIncentivesTreasuryVault 2,583 (0) 0.00% 6,389 (+1,400) +28.06% 7,192 (+1,400) +24.17% 8,592 (+2,800) +48.34% 4 (0)
Morpho 3,436,193 (0) aaveIncentivesController
createMarket
initialize
pool
rewardsManager
setIncentivesVault
setRewardsManager
setTreasuryVault
427 (0)
2,847 (0)
3,663 (0)
406 (0)
404 (0)
2,695 (0)
2,631 (0)
2,673 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
646 (+2)
208,107 (+31)
230,102 (+4,523)
410 (-1)
625 (+2)
23,712 (+7)
21,592 (+9)
23,519 (+14)
+0.31%
+0.01%
+2.01%
-0.24%
+0.32%
+0.03%
+0.04%
+0.06%
427 (0)
204,995 (0)
231,146 (+4,500)
406 (0)
404 (0)
23,878 (0)
21,814 (0)
23,856 (0)
0.00%
0.00%
+1.99%
0.00%
0.00%
0.00%
0.00%
0.00%
2,427 (0)
226,840 (0)
231,146 (+4,500)
2,406 (0)
2,404 (0)
23,878 (0)
21,814 (0)
23,856 (0)
0.00%
0.00%
+1.99%
0.00%
0.00%
0.00%
0.00%
0.00%
2,025 (+63)
1,092 (+45)
218 (+9)
2,436 (+81)
2,002 (+63)
219 (+9)
220 (+9)
221 (+9)
RewardsManagerOnMainnetAndAvalanche 1,133,544 (0) initialize 2,742 (0) 0.00% 92,714 (+18) +0.02% 93,129 (0) 0.00% 93,129 (0) 0.00% 218 (+9)

Base automatically changed from feat/extract-compound-tests to dev August 24, 2022 09:19
@Rubilmax Rubilmax marked this pull request as ready for review August 25, 2022 12:51
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.

Some changes to do but overall LGTM! 🔥

config/eth-mainnet/BaseConfig.sol Show resolved Hide resolved
test-foundry/prod/aave-v2/setup/TestSetup.sol Outdated Show resolved Hide resolved
test-foundry/prod/aave-v2/setup/TestSetup.sol Outdated Show resolved Hide resolved
test-foundry/prod/aave-v2/TestSupply.t.sol Outdated Show resolved Hide resolved
test-foundry/prod/aave-v2/TestSupply.t.sol Outdated Show resolved Hide resolved
test-foundry/prod/aave-v2/TestSupply.t.sol Outdated Show resolved Hide resolved
test-foundry/prod/aave-v2/TestSupply.t.sol Show resolved Hide resolved
test-foundry/prod/aave-v2/TestBorrow.t.sol Outdated Show resolved Hide resolved
test-foundry/prod/aave-v2/TestBorrow.t.sol Outdated Show resolved Hide resolved
test-foundry/prod/aave-v2/TestRepay.t.sol Outdated Show resolved Hide resolved
@Rubilmax Rubilmax merged commit aee9436 into dev Sep 2, 2022
@Rubilmax Rubilmax deleted the feat/extract-aave-tests branch September 2, 2022 12:22
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.

3 participants