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

[Feature]: Make TakerFee revenues send once per epoch #7519

Closed
ValarDragon opened this issue Feb 17, 2024 · 0 comments · Fixed by #7555
Closed

[Feature]: Make TakerFee revenues send once per epoch #7519

ValarDragon opened this issue Feb 17, 2024 · 0 comments · Fixed by #7555
Assignees

Comments

@ValarDragon
Copy link
Member

ValarDragon commented Feb 17, 2024

Basically same problem statement as #7518 . Currently taker fee sends are taking extra logic, gas, and sync time by being on every swap. (2.2% of block sync time on mainnet right now)

Instead we could just take the taker fee from the user, and send them to a "holding address". We can then send funds from that holding address to stakers + community pool once per day, at the beginning of epoch. We just need to be careful that its impossible for a normal address to send to this module account. (As then they could spam it with too many denoms)

As we want to implement more complicated taker fee distributions, e.g. kickbacks for some pairs, I am imagining this architecture becoming that there is one address per "type" of taker fee distribution, based on how we later choose "type" of fee distribution.

I am anticipating this to be a 1.5% block sync improvement on its own. (As we are still doing one token send still and calculating the taker fee. However it is removing a community pool send, and updates to two trackers, so 3 database writes and their respective, notable, CPU logics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants