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

Added a test suite for the Morpho wstETH/USDC market #1127

Merged
merged 11 commits into from
Aug 17, 2024

Conversation

jalextowle
Copy link
Contributor

Description

This PR adds a test suite for the Morpho wstETH/USDC market to ensure that precision issues don't result in problems. This is necessary since USDC only has 6 decimals and Morpho has an abnormally low share price of ~1e12.

@mcclurejt mcclurejt force-pushed the jalextowle/fix/morpho-passthrough-data branch from b78633c to 4de2e8f Compare August 9, 2024 18:08
@jalextowle jalextowle force-pushed the jalextowle/fix/morpho-passthrough-data branch from 360d30a to 457518d Compare August 15, 2024 23:22
@coveralls
Copy link
Collaborator

coveralls commented Aug 15, 2024

Pull Request Test Coverage Report for Build 10435093647

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 90.74%

Totals Coverage Status
Change from base Build 10393688866: 0.05%
Covered Lines: 2244
Relevant Lines: 2473

💛 - Coveralls

Copy link

github-actions bot commented Aug 15, 2024

Hyperdrive Gas Benchmark

Benchmark suite Current: 4d8ac7f Previous: 30c2843 Deviation Status
addLiquidity: min 33893 gas 33893 gas 0% 🟰
addLiquidity: avg 196895 gas 197265 gas -0.1876%
addLiquidity: max 474700 gas 474700 gas 0% 🟰
checkpoint: min 40316 gas 40316 gas 0% 🟰
checkpoint: avg 144443 gas 144469 gas -0.0180%
checkpoint: max 256108 gas 256108 gas 0% 🟰
closeLong: min 31384 gas 31384 gas 0% 🟰
closeLong: avg 135844 gas 135792 gas 0.0383% 🚨
closeLong: max 2539399 gas 2539399 gas 0% 🟰
closeShort: min 31327 gas 31327 gas 0% 🟰
closeShort: avg 131241 gas 131193 gas 0.0366% 🚨
closeShort: max 308136 gas 271272 gas 13.5893% 🚨
initialize: min 31305 gas 31305 gas 0% 🟰
initialize: avg 352386 gas 352372 gas 0.0040% 🚨
initialize: max 418737 gas 418737 gas 0% 🟰
openLong: min 33370 gas 33370 gas 0% 🟰
openLong: avg 174242 gas 174111 gas 0.0752% 🚨
openLong: max 333737 gas 333737 gas 0% 🟰
openShort: min 33936 gas 33936 gas 0% 🟰
openShort: avg 174325 gas 174056 gas 0.1545% 🚨
openShort: max 415133 gas 415133 gas 0% 🟰
redeemWithdrawalShares: min 31211 gas 31211 gas 0% 🟰
redeemWithdrawalShares: avg 74966 gas 75011 gas -0.0600%
redeemWithdrawalShares: max 305184 gas 305184 gas 0% 🟰
removeLiquidity: min 31217 gas 31217 gas 0% 🟰
removeLiquidity: avg 214810 gas 214343 gas 0.2179% 🚨
removeLiquidity: max 403538 gas 403538 gas 0% 🟰

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@mcclurejt mcclurejt left a comment

Choose a reason for hiding this comment

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

Nits and q's, nothing major

test/instances/aave/AaveHyperdrive.t.sol Show resolved Hide resolved
test/utils/InstanceTest.sol Show resolved Hide resolved
test/utils/InstanceTest.sol Show resolved Hide resolved
test/utils/InstanceTest.sol Show resolved Hide resolved
test/utils/InstanceTest.sol Show resolved Hide resolved
Copy link
Contributor

@jrhea jrhea left a comment

Choose a reason for hiding this comment

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

Great work!! I am going to approve, but I do have a couple of questions and a suggestion to tighten the error bounds on test_round_trip_short_maturity

@jalextowle jalextowle added this pull request to the merge queue Aug 17, 2024
Merged via the queue into main with commit 31045e7 Aug 17, 2024
32 checks passed
@jalextowle jalextowle deleted the jalextowle/fix/morpho-passthrough-data branch August 17, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants