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

Fixed the LP share price issue in `addLiquidity` #1077

Closed jalextowle closed 5 days ago

jalextowle commented 6 days ago

Resolved Issues

Description

Prior to this PR, the LP share price in the AddLiquidity event had the wrong units.

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, the corresponding checklist can be removed.

[[Reviewer Name]]

github-actions[bot] commented 6 days ago

Hyperdrive Gas Benchmark

Benchmark suite Current: c9347d9171bf7fa57ac0a36e2fb58d0ec05bebb0 Previous: 0db25cdb9ece753acc07f967d39cc79aa167729d Deviation Status
addLiquidity: min 33937 gas 33937 gas 0% 🟰
addLiquidity: avg 156228 gas 156151 gas 0.0493% 🚨
addLiquidity: max 429217 gas 429262 gas -0.0105% ✅
checkpoint: min 40316 gas 40316 gas 0% 🟰
checkpoint: avg 144556 gas 144725 gas -0.1168% ✅
checkpoint: max 255724 gas 255940 gas -0.0844% ✅
closeLong: min 31361 gas 31361 gas 0% 🟰
closeLong: avg 135791 gas 135817 gas -0.0191% ✅
closeLong: max 2539376 gas 2539376 gas 0% 🟰
closeShort: min 31327 gas 31327 gas 0% 🟰
closeShort: avg 131164 gas 131048 gas 0.0885% 🚨
closeShort: max 270901 gas 271117 gas -0.0797% ✅
initialize: min 31349 gas 31349 gas 0% 🟰
initialize: avg 333191 gas 333388 gas -0.0591% ✅
initialize: max 399530 gas 399746 gas -0.0540% ✅
openLong: min 33370 gas 33370 gas 0% 🟰
openLong: avg 173062 gas 173182 gas -0.0693% ✅
openLong: max 333607 gas 333831 gas -0.0671% ✅
openShort: min 33936 gas 33936 gas 0% 🟰
openShort: avg 168476 gas 168273 gas 0.1206% 🚨
openShort: max 415212 gas 415052 gas 0.0385% 🚨
redeemWithdrawalShares: min 31251 gas 31251 gas 0% 🟰
redeemWithdrawalShares: avg 74933 gas 75122 gas -0.2516% ✅
redeemWithdrawalShares: max 305243 gas 305459 gas -0.0707% ✅
removeLiquidity: min 31301 gas 31301 gas 0% 🟰
removeLiquidity: avg 215227 gas 215003 gas 0.1042% 🚨
removeLiquidity: max 403642 gas 403870 gas -0.0565% ✅

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