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(aave-v2)!: fix p2p rate computation of the lens #1267

Merged
merged 1 commit into from
Sep 3, 2022

Conversation

julien-devatom
Copy link
Collaborator

@julien-devatom julien-devatom commented Sep 2, 2022

Pull Request

Issue(s) fixed

This pull request fixes #1266

Fix applied

If poolSupplyRate > poolBorrowRate, p2pRate = poolBorrowRate in the contracts

@julien-devatom julien-devatom self-assigned this Sep 2, 2022
@julien-devatom julien-devatom added the 🐛 bug Something isn't working label Sep 2, 2022
@github-actions
Copy link

github-actions bot commented Sep 2, 2022

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

Generated at commit: ddb7d47cc6b8c592eb638a91b91d9d37bae3a38d, compared to commit: 8669ade38f068e7be6f182f4525ecb0cb862aaff

🧾 Summary

Contract Method Avg (+/-) %
Lens getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
+34 ❌
+34 ❌
+27 ❌
+27 ❌
+68 ❌
+30 ❌
+30 ❌
+34 ❌
+0.09%
+0.08%
+0.05%
+0.05%
+0.11%
+0.05%
+0.05%
+0.10%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Lens 4,075,304 (+8,417) getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
27,601 (+34)
29,738 (+34)
49,574 (+34)
49,667 (+34)
59,541 (+68)
49,924 (+34)
49,956 (+34)
30,719 (+34)
+0.12%
+0.11%
+0.07%
+0.07%
+0.11%
+0.07%
+0.07%
+0.11%
37,809 (+34)
41,160 (+34)
52,189 (+27)
52,282 (+27)
59,541 (+68)
65,853 (+30)
65,893 (+30)
33,908 (+34)
+0.09%
+0.08%
+0.05%
+0.05%
+0.11%
+0.05%
+0.05%
+0.10%
28,242 (+34)
31,330 (+34)
49,625 (+34)
49,718 (+34)
59,541 (+68)
62,070 (+34)
62,112 (+34)
30,753 (+34)
+0.12%
+0.11%
+0.07%
+0.07%
+0.11%
+0.05%
+0.05%
+0.11%
85,554 (+34)
92,548 (+34)
62,250 (0)
62,343 (0)
59,541 (+68)
121,901 (+34)
121,955 (+34)
81,972 (+34)
+0.04%
+0.04%
0.00%
0.00%
+0.11%
+0.03%
+0.03%
+0.04%
6 (0)
6 (0)
5 (0)
5 (0)
1 (0)
9 (0)
9 (0)
21 (0)

@github-actions
Copy link

github-actions bot commented Sep 2, 2022

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

Generated at commit: ddb7d47cc6b8c592eb638a91b91d9d37bae3a38d, compared to commit: 8669ade38f068e7be6f182f4525ecb0cb862aaff

🧾 Summary

Contract Method Avg (+/-) %
Lens getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
+34 ❌
+34 ❌
+27 ❌
+27 ❌
+68 ❌
+30 ❌
+30 ❌
+34 ❌
+0.09%
+0.09%
+0.05%
+0.05%
+0.11%
+0.05%
+0.05%
+0.10%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Lens 4,075,304 (+8,417) getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
27,601 (+34)
29,530 (+34)
49,574 (+34)
49,667 (+34)
59,333 (+68)
49,924 (+34)
49,956 (+34)
30,719 (+34)
+0.12%
+0.12%
+0.07%
+0.07%
+0.11%
+0.07%
+0.07%
+0.11%
37,809 (+34)
39,618 (+34)
52,189 (+27)
52,282 (+27)
59,333 (+68)
65,912 (+30)
65,893 (+30)
33,908 (+34)
+0.09%
+0.09%
+0.05%
+0.05%
+0.11%
+0.05%
+0.05%
+0.10%
28,242 (+34)
29,798 (+34)
49,625 (+34)
49,718 (+34)
59,333 (+68)
62,070 (+34)
62,112 (+34)
30,753 (+34)
+0.12%
+0.11%
+0.07%
+0.07%
+0.11%
+0.05%
+0.05%
+0.11%
85,554 (+34)
88,340 (+34)
62,250 (0)
62,343 (0)
59,333 (+68)
121,901 (+34)
121,955 (+34)
81,972 (+34)
+0.04%
+0.04%
0.00%
0.00%
+0.11%
+0.03%
+0.03%
+0.04%
6 (0)
6 (0)
5 (0)
5 (0)
1 (0)
9 (0)
9 (0)
21 (0)

@github-actions
Copy link

github-actions bot commented Sep 2, 2022

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

Generated at commit: ddb7d47cc6b8c592eb638a91b91d9d37bae3a38d, compared to commit: 8669ade38f068e7be6f182f4525ecb0cb862aaff

🧾 Summary

Contract Method Avg (+/-) %
Lens getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
+34 ❌
+34 ❌
+27 ❌
+27 ❌
+68 ❌
+30 ❌
+30 ❌
+34 ❌
+0.09%
+0.08%
+0.05%
+0.05%
+0.11%
+0.05%
+0.05%
+0.10%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Lens 4,075,304 (+8,417) getAverageBorrowRatePerYear
getAverageSupplyRatePerYear
getCurrentUserBorrowRatePerYear
getCurrentUserSupplyRatePerYear
getMainMarketData
getNextUserBorrowRatePerYear
getNextUserSupplyRatePerYear
getRatesPerYear
27,601 (+34)
29,738 (+34)
49,574 (+34)
49,667 (+34)
59,541 (+68)
49,924 (+34)
49,956 (+34)
30,719 (+34)
+0.12%
+0.11%
+0.07%
+0.07%
+0.11%
+0.07%
+0.07%
+0.11%
37,809 (+34)
41,160 (+34)
52,189 (+27)
52,282 (+27)
59,541 (+68)
65,853 (+30)
65,893 (+30)
33,908 (+34)
+0.09%
+0.08%
+0.05%
+0.05%
+0.11%
+0.05%
+0.05%
+0.10%
28,242 (+34)
31,330 (+34)
49,625 (+34)
49,718 (+34)
59,541 (+68)
62,070 (+34)
62,112 (+34)
30,753 (+34)
+0.12%
+0.11%
+0.07%
+0.07%
+0.11%
+0.05%
+0.05%
+0.11%
85,554 (+34)
92,548 (+34)
62,250 (0)
62,343 (0)
59,541 (+68)
121,901 (+34)
121,955 (+34)
81,972 (+34)
+0.04%
+0.04%
0.00%
0.00%
+0.11%
+0.03%
+0.03%
+0.04%
6 (0)
6 (0)
5 (0)
5 (0)
1 (0)
9 (0)
9 (0)
21 (0)

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.

LGTM

@julien-devatom julien-devatom merged commit 622a800 into main Sep 3, 2022
@julien-devatom julien-devatom deleted the fix/aave-v2-lens-negative-p2p-rate branch September 3, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👻 aave-v2 🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lens on Aave v2 fails when rates are inverted
4 participants