Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactors pool fees slightly #71

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Refactors pool fees slightly #71

merged 2 commits into from
Mar 12, 2024

Conversation

Quantumplation
Copy link
Member

Splits fees_per_10k into bid_fees_per_10k and ask_fees_per_10k to specify the bid and ask fees separately.
Also adds a fee_manager that is allowed to update the fees and update the fee manager. The idea is some pools may want to have someone manage the fees and react to volatility.

I still need to add a max_fee_pct property to the swap datum, so the user doesn't pay more than they expected if the manager changes the fee.

I also wanted to refactor the fees to follow the format:
[(PosixTime, feePct)]

But figured that was too much change before we launch, so I avoided doing that for now; we'll likely simplify with a new pool type in the future.

Pools might want different bid and ask fees, and they might want them at different cadence
The fee admin is a sundae multisig (so, an admin, a multisig, or a script) that can edit the fees, perhaps in response to a DAO vote, or some on-chain volatility policy, etc.
lib/calculation/process.ak Show resolved Hide resolved
validators/pool.ak Show resolved Hide resolved
@Quantumplation Quantumplation merged commit 9c523fb into main Mar 12, 2024
1 check passed
@Quantumplation Quantumplation deleted the pi/fee-refactor branch March 12, 2024 01:44
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.

2 participants