delvtech / hyperdrive

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

coverage for calculateDistributeExcessIdleShareProceedsNetLongEdgeCaseSafe #962

Closed jrhea closed 4 months ago

jrhea commented 4 months ago

This PR should cover all branches for calculateDistributeExcessIdleShareProceedsNetLongEdgeCaseSafe()

github-actions[bot] commented 4 months ago

Hyperdrive Gas Benchmark

Benchmark suite Current: c0e5da155a8026a8486cf8e807d303a8b86b3c80 Previous: bd5a941ef7b7c07fe68b3e7f8e4d082ad8e03da9 Deviation Status
addLiquidity: min 33893 gas 33893 gas 0% 🟰
addLiquidity: avg 143909 gas 143746 gas 0.1134% 🚨
addLiquidity: max 428295 gas 428335 gas -0.0093% ✅
checkpoint: min 40220 gas 40220 gas 0% 🟰
checkpoint: avg 104056 gas 104098 gas -0.0403% ✅
checkpoint: max 212154 gas 212154 gas 0% 🟰
closeLong: min 31517 gas 31517 gas 0% 🟰
closeLong: avg 137925 gas 137990 gas -0.0471% ✅
closeLong: max 2640435 gas 2640435 gas 0% 🟰
closeShort: min 31394 gas 31394 gas 0% 🟰
closeShort: avg 132893 gas 132798 gas 0.0715% 🚨
closeShort: max 227565 gas 227553 gas 0.0053% 🚨
initialize: min 31305 gas 31305 gas 0% 🟰
initialize: avg 253633 gas 253632 gas 0.0004% 🚨
initialize: max 322760 gas 322760 gas 0% 🟰
openLong: min 33437 gas 33437 gas 0% 🟰
openLong: avg 167381 gas 167437 gas -0.0334% ✅
openLong: max 253162 gas 253162 gas 0% 🟰
openShort: min 33959 gas 33959 gas 0% 🟰
openShort: avg 170279 gas 170211 gas 0.0400% 🚨
openShort: max 385650 gas 385650 gas 0% 🟰
redeemWithdrawalShares: min 31227 gas 31227 gas 0% 🟰
redeemWithdrawalShares: avg 62015 gas 62048 gas -0.0532% ✅
redeemWithdrawalShares: max 167572 gas 167572 gas 0% 🟰
removeLiquidity: min 31191 gas 31191 gas 0% 🟰
removeLiquidity: avg 224039 gas 223552 gas 0.2178% 🚨
removeLiquidity: max 398887 gas 398887 gas 0% 🟰

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

mcclurejt commented 4 months ago

what's the lift on hitting this branch as well?

jrhea commented 4 months ago

what's the lift on hitting this branch as well?

line 1070 it is already covered:

Screenshot_20240412-013014