Skip to content

Conversation

@jalextowle
Copy link
Contributor

Added guards to HyperdriveFactory that limit the fixed APR and time stretch that a user can specify. Furthermore, the time stretch will now be calculated using calculateTimeStretch and will be parameterized with a time stretch APR and the provided position duration.

Along with adding additional constraints to HyperdriveFactory, this PR also increases the minimumTransactionAmount of the stETH integration and adds guards for the minimumShareReserves and minimumTransactionAmount in the ERC4626 integration.

@jalextowle jalextowle requested a review from jrhea January 26, 2024 06:54
@github-actions
Copy link

github-actions bot commented Jan 26, 2024

Hyperdrive Gas Benchmark

Benchmark suite Current: c288d45 Previous: f780809 Deviation Status
addLiquidity: min 1633 gas 1633 gas 0% 🟰
addLiquidity: avg 67022 gas 67576 gas -0.8198%
addLiquidity: max 292669 gas 292669 gas 0% 🟰
checkpoint: min 1150 gas 1150 gas 0% 🟰
checkpoint: avg 48392 gas 48637 gas -0.5037%
checkpoint: max 191478 gas 191094 gas 0.2009% 🚨
closeLong: min 1558 gas 1558 gas 0% 🟰
closeLong: avg 28054 gas 28159 gas -0.3729%
closeLong: max 148580 gas 151053 gas -1.6372%
closeShort: min 1549 gas 1549 gas 0% 🟰
closeShort: avg 29913 gas 29893 gas 0.0669% 🚨
closeShort: max 129340 gas 145678 gas -11.2151%
initialize: min 1582 gas 1582 gas 0% 🟰
initialize: avg 213314 gas 213319 gas -0.0023%
initialize: max 255137 gas 255137 gas 0% 🟰
openLong: min 1487 gas 1487 gas 0% 🟰
openLong: avg 50689 gas 50565 gas 0.2452% 🚨
openLong: max 185335 gas 184943 gas 0.2120% 🚨
openShort: min 1608 gas 1608 gas 0% 🟰
openShort: avg 49997 gas 49977 gas 0.0400% 🚨
openShort: max 180248 gas 180248 gas 0% 🟰
redeemWithdrawalShares: min 1575 gas 1575 gas 0% 🟰
redeemWithdrawalShares: avg 20381 gas 20622 gas -1.1687%
redeemWithdrawalShares: max 108207 gas 108207 gas 0% 🟰
removeLiquidity: min 1639 gas 1639 gas 0% 🟰
removeLiquidity: avg 148994 gas 149220 gas -0.1515%
removeLiquidity: max 324287 gas 324287 gas 0% 🟰

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

@jrhea jrhea enabled auto-merge (squash) January 26, 2024 18:52
@jrhea jrhea merged commit 04b33c2 into main Jan 26, 2024
@jrhea jrhea deleted the jalextowle/cleanup/factory-cleanup-pt-2 branch January 26, 2024 20:01
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.

3 participants