Skip to content

Conversation

@jalextowle
Copy link
Contributor

This PR updates the sweep function to reduce code duplication. In addition to move sweep into Hyperdrive.sol, this PR also makes it possible for governance to update the fee collector of a deployed pool and for governance to set a target to receive any swept funds.

@github-actions
Copy link

github-actions bot commented Mar 11, 2024

Hyperdrive Gas Benchmark

Benchmark suite Current: b626c19 Previous: 46c834d Deviation Status
addLiquidity: min 33915 gas 1546 gas 2093.7257% 🚨
addLiquidity: avg 146591 gas 67936 gas 115.7781% 🚨
addLiquidity: max 402414 gas 293159 gas 37.2682% 🚨
checkpoint: min 29254 gas 1182 gas 2374.9577% 🚨
checkpoint: avg 107738 gas 48477 gas 122.2456% 🚨
checkpoint: max 210817 gas 191559 gas 10.0533% 🚨
closeLong: min 31428 gas 1492 gas 2006.4343% 🚨
closeLong: avg 101766 gas 29374 gas 246.4492% 🚨
closeLong: max 228750 gas 152303 gas 50.1940% 🚨
closeShort: min 31349 gas 1494 gas 1998.3266% 🚨
closeShort: avg 97621 gas 33444 gas 191.8939% 🚨
closeShort: max 184485 gas 149156 gas 23.6859% 🚨
initialize: min 31283 gas 1451 gas 2055.9614% 🚨
initialize: avg 250652 gas 213962 gas 17.1479% 🚨
initialize: max 322135 gas 253953 gas 26.8483% 🚨
openLong: min 33503 gas 1499 gas 2135.0233% 🚨
openLong: avg 130350 gas 51658 gas 152.3326% 🚨
openLong: max 252131 gas 185562 gas 35.8743% 🚨
openShort: min 33848 gas 1520 gas 2126.8421% 🚨
openShort: avg 138815 gas 51482 gas 169.6379% 🚨
openShort: max 362061 gas 181325 gas 99.6752% 🚨
redeemWithdrawalShares: min 31227 gas 1488 gas 1998.5887% 🚨
redeemWithdrawalShares: avg 73129 gas 22375 gas 226.8335% 🚨
redeemWithdrawalShares: max 151526 gas 109301 gas 38.6319% 🚨
removeLiquidity: min 31323 gas 1530 gas 1947.2549% 🚨
removeLiquidity: avg 222988 gas 151225 gas 47.4545% 🚨
removeLiquidity: max 367068 gas 325781 gas 12.6732% 🚨

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

@jalextowle jalextowle enabled auto-merge (squash) March 11, 2024 18:09
@jalextowle jalextowle merged commit 67c55ba into main Mar 11, 2024
@jalextowle jalextowle deleted the jalextowle/feature/updated-sweep branch March 11, 2024 18:36
dpaiton pushed a commit that referenced this pull request Mar 28, 2024
* Updated the `sweep` function so that it is implemented in `Hyperdrive`

* Allows governance to update the fee and sweep collector

* Fixed the rust tests
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