delvtech / hyperdrive

An automated market maker for fixed and variable yield with on-demand terms.
Apache License 2.0
25 stars 3 forks source link

Fix MockEzEthPool calculateTVLs #1021

Closed sentilesdal closed 2 months ago

sentilesdal commented 2 months ago

Resolved Issues

Description

The testnet EzEth instance of Hyperdrive was returning vaultSharePrice values way below what it should. This now sets the price to basically: (totalSupply + interest) / totalSupply. I checked this on the currently deployed Sepolia contracts and it has sane values so I think this is all we need to do.

Review Checklists

Please check each item before approving the pull request. While going through the checklist, it is recommended to leave comments on items that are referenced in the checklist to make sure that they are reviewed. If there are multiple reviewers, copy the checklists into sections titled ## [Reviewer Name]. If the PR doesn't touch Solidity and/or Rust, the corresponding checklist can be removed.

[[Reviewer Name]]

github-actions[bot] commented 2 months ago

Hyperdrive Gas Benchmark

Benchmark suite Current: 8c825339257b35203135ce448e3320867872921e Previous: a55506bfa3b5371bf36b5678692fe30c8fbad4e2 Deviation Status
addLiquidity: min 33827 gas 33827 gas 0% 🟰
addLiquidity: avg 156305 gas 156018 gas 0.1840% 🚨
addLiquidity: max 428417 gas 428417 gas 0% 🟰
checkpoint: min 40292 gas 40292 gas 0% 🟰
checkpoint: avg 142307 gas 142331 gas -0.0169% βœ…
checkpoint: max 253424 gas 253424 gas 0% 🟰
closeLong: min 31361 gas 31361 gas 0% 🟰
closeLong: avg 135500 gas 135337 gas 0.1204% 🚨
closeLong: max 2625796 gas 2625796 gas 0% 🟰
closeShort: min 31349 gas 31349 gas 0% 🟰
closeShort: avg 131743 gas 131610 gas 0.1011% 🚨
closeShort: max 401915 gas 262998 gas 52.8206% 🚨
initialize: min 31371 gas 31371 gas 0% 🟰
initialize: avg 330366 gas 330372 gas -0.0018% βœ…
initialize: max 396259 gas 396259 gas 0% 🟰
openLong: min 33370 gas 33370 gas 0% 🟰
openLong: avg 173357 gas 173373 gas -0.0092% βœ…
openLong: max 306657 gas 306657 gas 0% 🟰
openShort: min 33936 gas 33936 gas 0% 🟰
openShort: avg 167925 gas 168009 gas -0.0500% βœ…
openShort: max 415379 gas 415307 gas 0.0173% 🚨
redeemWithdrawalShares: min 31251 gas 31251 gas 0% 🟰
redeemWithdrawalShares: avg 74736 gas 74854 gas -0.1576% βœ…
redeemWithdrawalShares: max 209828 gas 209828 gas 0% 🟰
removeLiquidity: min 31301 gas 31301 gas 0% 🟰
removeLiquidity: avg 208698 gas 208930 gas -0.1110% βœ…
removeLiquidity: max 403640 gas 403652 gas -0.0030% βœ…

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

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 9039205303

Details


Totals Coverage Status
Change from base Build 9039156905: 0.0%
Covered Lines: 1833
Relevant Lines: 1966

πŸ’› - Coveralls