-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(tokenomics): charge more fees for blocks that are harder to prove #351
Conversation
This reverts commit 900d6ab.
Codecov Report
@@ Coverage Diff @@
## implement-tokenomics-v1_pr #351 +/- ##
==============================================================
- Coverage 63.68% 61.51% -2.17%
==============================================================
Files 88 88
Lines 2489 2580 +91
Branches 283 296 +13
==============================================================
+ Hits 1585 1587 +2
- Misses 831 920 +89
Partials 73 73
*This pull request uses carry forward flags. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
If the average price increases after the protocol notices the prover fee it charges proposers is too low, and the amount of blocks that can be submitted before this happens is limited, is there a way for proposers to abuse the system? For the proposers the only thing that would matter is the gas cost. They could submit a lot of transactions that are more expensive to prove when the prover fee is "low", which will increase the prover fee eventually. They could then submit transactions that are cheap to prove to get the prover fee down again. I don't think there is anything wrong with that, it's just that the transactions fees for the second part will be higher than necessary (but the transaction fees will be lower than the transaction fees in the first part). Transaction fees will be fluctuating a lot anyway so I don't really see a real problem with that. For now I can't really see a way the system could be abused but I could be missing something.
I do want to stress that this is a big change to how the fee market will work, and will put potentially a lot of complexity on the proposers to create profitable blocks. It could introduce a DOS vector on proposers or increase transaction fees for users if having to calculate the costs by having to actually execute the transactions is a hard problem to solve well. Keeping prover fees linked to gas cost will allow us to use any existing fee market/MEV code pretty much out of the box, if we change that we will be forced to support modified versions that are specifically made for Taiko. |
Previously, when blocks are proven after
1.25*avgProofTime
, we mint extra tokens to incentivize the provers, but the blocks' proposers get away without paying extra fees. This may open a door for DOS attack -- the proposers may simply create certain transactions that are harder to prove.This PR enable the protocol to charge up to 25% additional fees -- 125% of the original proposer fees are burnt initially (100% is the fee, and 25% is called the deposit), then based on the
tRef
value in the whitepaper, we mint back [0-100%] of the deposit back to the proposer. If tRef == 0, we mint back all deposit, if tRef == 10000, we mint back no deposit to the proposer.