Skip to content

simplify fees#646

Merged
wakamex merged 2 commits intomainfrom
simpler_fees
Nov 3, 2023
Merged

simplify fees#646
wakamex merged 2 commits intomainfrom
simpler_fees

Conversation

@wakamex
Copy link
Copy Markdown
Contributor

@wakamex wakamex commented Oct 31, 2023

calculate fees with only 2 functions: _calculateFeesGivenShares and _calculateFeesGivenBonds
totalCurveFee and totalFlatFee -> curveFee and flatFee to show they're not the sum of parts, unlike totalGovernanceFee

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 1, 2023

Hyperdrive Gas Benchmark

Benchmark suite Current: a24f2eb Previous: 1148b95 Deviation Status
addLiquidity: min 755 gas 733 gas 3.0014% 🚨
addLiquidity: avg 54090 gas 54072 gas 0.0333% 🚨
addLiquidity: max 96738 gas 96704 gas 0.0352% 🚨
checkpoint: min 558 gas 558 gas 0% 🟰
checkpoint: avg 47646 gas 47642 gas 0.0084% 🚨
checkpoint: max 99410 gas 99410 gas 0% 🟰
closeLong: min 755 gas 755 gas 0% 🟰
closeLong: avg 23510 gas 23397 gas 0.4830% 🚨
closeLong: max 114200 gas 114183 gas 0.0149% 🚨
closeShort: min 713 gas 802 gas -11.0973%
closeShort: avg 26614 gas 25012 gas 6.4049% 🚨
closeShort: max 112703 gas 111387 gas 1.1815% 🚨
initialize: min 706 gas 662 gas 6.6465% 🚨
initialize: avg 177371 gas 177327 gas 0.0248% 🚨
initialize: max 251632 gas 251633 gas -0.0004%
openLong: min 757 gas 757 gas 0% 🟰
openLong: avg 56990 gas 56892 gas 0.1723% 🚨
openLong: max 218431 gas 218401 gas 0.0137% 🚨
openShort: min 712 gas 712 gas 0% 🟰
openShort: avg 56119 gas 56235 gas -0.2063%
openShort: max 217822 gas 217803 gas 0.0087% 🚨
removeLiquidity: min 777 gas 777 gas 0% 🟰
removeLiquidity: avg 75980 gas 75957 gas 0.0303% 🚨
removeLiquidity: max 203187 gas 203187 gas 0% 🟰

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

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Nov 1, 2023

Coverage Status

coverage: 97.54% (-0.01%) from 97.551%
when pulling a24f2eb on simpler_fees
into e3658bb on main.

Comment thread contracts/src/HyperdriveShort.sol
Copy link
Copy Markdown
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Really nice job on this!

It would be good to get @jrhea's review too.

@jalextowle jalextowle requested a review from jrhea November 1, 2023 04:00
Copy link
Copy Markdown
Contributor

@jrhea jrhea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question about governanceFlatFee return value on _calculateFeesGivenBonds()

Comment thread contracts/src/HyperdriveBase.sol
@wakamex wakamex enabled auto-merge (squash) November 3, 2023 17:21
@wakamex wakamex merged commit 71c6996 into main Nov 3, 2023
@wakamex wakamex deleted the simpler_fees branch November 3, 2023 17:54
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.

4 participants