-
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(protocol): Auction #13813
Comments
The main thing I like about this strategy vs other tokenomics is:
|
This is a very simple, one day WIP: It ignores more complicated concepts like "bidding for batches" (which is obviously more gas efficient), and simply says: and then the client says The protocol code also has the concept of a deposit, but hasnt implemented something like, It is missing a lot, obviously, but it simply something to get the discussion/ball rolling. |
Implementing a simple, batch-based auction system for prover cost-efficiencyBackgroundOur current tokenomics framework rewards the fastest prover, encouraging prioritization of speed over cost-effectiveness. This conflicts with Taiko's commitment to delivering cost-efficient proofs. By incentivizing cost-effective proofs, we can significantly reduce Taiko's overall Layer 2 (L2) expenses, enhancing our competitive edge in the marketplace. Proposed SolutionI suggest introducing an auction mechanism to recalibrate provers' incentives, guiding them towards prioritizing cost-effectiveness. This mechanism facilitates provers to bid for block rewards, creating a transparent fee market. Moreover, this model promotes resource conservation, permitting provers to commit to resource-intensive Zero-Knowledge Proof (ZKP) computations only once they have definitively secured a block reward. Design ConsiderationsBatch-Based StrategyGiven the high gas fees associated with Ethereum, we endorse a batch-based strategy for running auctions. This approach bestows the winning bidder with proving rights for a batch of blocks, thereby reducing per-block gas costs. During the testnet phases, we anticipate starting with a smaller batch size, with plans to scale up to 256 blocks by the mainnet launch. Considerations for Future Blocks and Gas CostsTo mitigate the potential for accumulated ZKP delays, I suggest conducting auctions for upcoming blocks even before they are proposed. This approach does introduce uncertainty for provers due to the unknown block gas used and data size at the auction's outset. To address this, I propose a pricing model for the auction based on the gas/data usage of the auctioned block, with the block reward calculated as Bidding Procedures and Deposit RequirementsI suggest setting the initial bidding price for new auctions at Auction Window, Proving Window, and Multiple Auction ManagementThe auction window starts with the first bid and ends after either 5 minutes or 25 Ethereum blocks( or if the bid falls to 50% smaller than Reward and Penalty MechanismsIf the verified block's chosen fork choice originates from the auction winner's proof, the winner's deposit and reward TKO tokens are refunded. If the chosen fork choice comes from another prover's proof, the latter receives half the deposit, and the remaining half is burnt. This mechanism ensures fair competition and deters manipulation, such as winners submitting correct proofs via different addresses. Absence of Fallback ModeThere is no fallback fee/reward model for blocks that are not auctioned. This simplifies the auction design and eliminates the need for dual tokenomics systems - an auction-based primary system and an alternative fallback one. Block FeesI propose to charge a fee in Taiko tokens from the block proposer calculated as ChallengesInsufficient CompetitionThe success of the proposed auction framework heavily relies on the participation of many independent entities. If provers collude or form alliances to increase their profits, they could strategically place a single bid at the initial/highest price Nevertheless, this behavior may unintentionally incite competition. As the proving reward considerably increases, it is likely to catch the attention of other provers, thus encouraging their participation. This market self-regulation could restore balance and maintain the competitive integrity of the auction process. Additional Verification DelayIntroducing an auction window inevitably adds an extra delay to the proving time. This delay might not be noticeable when the average proving time is relatively long (over 30 minutes). Still, it could become significant in future scenarios where proof generation takes just a few minutes. However, as emphasized at the outset of the proposal, our goal is to optimize for cost, not speed. While this additional delay is an important consideration, it's unlikely to pose a major hurdle to our primary objective of cost-effectiveness. |
Some previous discussion on this: https://github.com/taikoxyz/internal/issues/121 Also let's take into account batch verification of proofs onchain when possible! Otherwise we'll have to modify things again when we can do this.
It seems underappreciated that the current proving system works exactly the same as the L2 proposing fee, which in turn is based on the data blobs EIP-1559 system (which in its turn is based on the current EIP-1559)! Same mechanism, same inputs, exactly the same math, exactly the same code (well in theory, unfortunately our current code base contains two pretty distinctive paths for doing the same thing). Even on the nodes side exactly the same logic needs to be followed when proposing blocks as is currently required for submitting proofs! This is why I like in the first place, same well known system, all code we already have basically reused as is, but in practice it seems like it's not really seen that way. :(
Yeah that's also my fear about an auction system. Will it actually have a different outcome then the current prover system that allows us to reuse code, in exchange for a completely new system that may end up being the same (single prover winning everything). Why would multiple addresses help though?
Hmm it doesn't! It very much aims to find the most efficient prover for the target time.
Unfortunately gas is not a great proxy for proving cost. I think a couple of smallish risks here:
I think a curve going up in time has some nice properties (see above).
So you propose to still have a built-in target time into the protocol, similar to the current proving system?
The auctions can be for block ids
Using the gas cost to estimate the prover cost isn't great because, regardless of the gas used in the L2 block, the prover has to pay the same gas fees to get the proof on-chain. These on-chain fees will (hopefully) be the biggest part of the proof generation cost (batching proof verification on-chain will obviously help here!).
Auctions make the most sense when we're pessimistic about prover times in the future. The redacted fee proving system would work well in the optimistic and pessimistic case which is part of why I like it. |
Brecht:
I'm out of the loop on this, is there another issue/TLDR? One proof can be proofs for multiple blocks?
In the event we put some code in that says
This is great, imo.
I would think so, because we need to slash the prover's deposit if they take a week to submit a proof for a block. I was thinking some small constant grace window + state.avgProofTime though, rather than a specific built-in target time. This window ending also allows someone else to submit the proof, and receive the other % of the deposit that wasnt slashed.
Daniel:
What is the advantage to use the bid instead of the proof reward itself? |
There currently is no loop to be in on. Yeah a proof of proofs so the proof verification cost on-chain can be lowered. I haven't really thought much about it to be honest, it also depends a bit on how blocks are assigned to provers, but only really two options that I currently see:
2 seems to be a good fit for an auction system. 1 seems to fit well when blocks aren't assigned to specific provers.
We have to be very careful with average proof times. If I understand correct that mean that the fastest prover can bring down the average time so much that only he would be able to submit proofs in a way that would not get slashed. After that happens, the most efficient provers cannot bid on the auction anymore because the given window would be impossible for them to achieve. |
Agreed, this is the idea behind the configurable grace window, to make sure it's always somewhat realistic. Thanks for the info on proof of proofs! |
I like the idea of the auction because in ideal conditions less math, less complex. Also saving (gas and resource) perspective, good if we have no or less waste.
I always highlighted the fears and worst case scenarios (or not worst case but ugly looking ones) of the current system (which fees going to 0 or ever increasing) - so I was trying to think about those concerns as well.
One argument I did not share, but now I do with Brecht is: we should not care how tokenomics look like - until it makes common / rational sense. I just feel it’s not a good argument because if the current system tanks the TKO to 0 (which kinda could seem ugly but), it means the network is efficient and cheaper to use, and we should not care if anyone is unrational and losing money on it by submitting proofs in a way it does not worth it for him/her. |
Isn't that basically just a fixed proof target with extra steps haha :)
In terms of complexity it's hard to beat basically 10 lines of code using code/formula we already have to use anyway! I can't imagine a more simple solution than the current system (well, a constant prover fee I guess :). It also has only one critical input parameter, the proof target time, which is easy to understand. The only other important one is the quotient that is just a damping factor. All the other ones are not important.
It doesn't really spam the network that much because all these will simply be skipped, and only the actual gas used is taken into account for the L2 base fee, so it won't raise quickly. So I don't think anyone can really exploit the invalid stuff, even when trying to attack the network. Proof costs for some of these blocks containing invalid data can go from very cheap to the same as normal blocks.
People with money to waste can still mess with an auction system for sure. And if we make the required deposit big that can get slashed that means we make the entry cost to be a prover very high, which greatly reduces the permissionlessness/decentralization of the provers.
Yeah some pros, some cons. However, especially on a testnet where there's room for speculation (and maybe even on mainnet) I don't expect this to result in a different outcome with an auction compared to any other proving fee system that is dynamic. |
Following several attempts at designing and implementing Taiko's tokenomics, I've come to a few important realizations:
With these points in mind, I propose several metrics to evaluate tokenomics, arranged according to their perceived importance. I invite feedback and am open to further discussion.
I'm hopeful that these comparison metrics will guide our discussions, preventing us from veering into too much subjectivity. |
In an effort to facilitate our ongoing discussions on tokenomics, I've developed a comparison table based on the metrics we've discussed. You may observe that these metrics seemingly tilt towards the "Batch Auction" method. I wish to candidly recognize that this bias could be inadvertent, given that I conceived the "Batch Auction" approach prior to establishing these metrics. Hence, I am earnestly soliciting your valuable feedback and suggestions to refine these metrics, thereby ensuring their fairness and objectivity.
Please note that the symbol "✓" signifies full compliance with a metric, "✕" denotes non-compliance, and "◎" indicates partial compliance. I encourage @Brechtpd to complete the remaining cells under the "PoS" column based on your understanding and evaluation of these designs. For future discussions, I propose that we focus on each cell of the table, if possible. This approach will likely keep our discussion more focused and directly pertinent to each metric. |
Note that there is a very easy "upgrade" path from the Alpha-3 to solve the downsides (real or speculative). The only thing that has to be changed to turn it into PoS:
There's of course still some details left out here that are important and we need to think more how things would work out within the set out constraints. But I just want to show that most of these goals are not really specific to any prover fee system, the implementation details very much matter! The Alpha-3 implementation in many ways is also an auction, it's just that the auction part is done implicitly based on when proofs are being submitted, which removes a lot of the complexity of actually implementing a full on-chain auction system.
Some other important ones I can currently think of:
|
A rough sketch of how PoS could work. Only small changes necessary to the current proving system, and some parts get simpler: Protocol:
POS contract:
I think that's it.
I think we're pretty close to being done! I think the fees work in a reasonable way, the only thing left is to iterate and tweak the more we learn (also from partners).
I would counter that a lot of the things that are really important are exactly these minutiae! A good example is the current proving system, the things about it that are now seen as not desirable are relatively small things that can be iterated on, no full overhaul necessary. Classifying these systems on a general level is still useful, but without taking into account some of the implementation details would mean that a lot of possible options and nuance are lost.
Realistically they will always withhold proofs to optimize for gas costs as well. Provers will (and should) take whatever time is allocated to them to submit their proof only when L1 gas fees are as low as possible. So I think waiting is inevitable, and a generous window for provers to submit their proof is a good thing to minimize costs everywhere. |
It's really hard for me to follow here. Lets say Alice can generate a proof in 30m and her cost per proof is $1, Bob's time delay is 20m and his cost is $1.1. Now Bob can always submit his proofs between 20-30m to beat Alice, right? So Alice know she will always lose, so she will not join the competition. That means potential cheaper proofs do not prevail.
So Alice now has to find a BD person to build on relationship with existing provers? She is not going to prove blocks without talking to other people? Doesn't talking to other provers means worse decentralization? |
Isn't PoS the same as the rich ones always wins? Assuming Alice stakes a lot of tokens and now can prove 10% of all blocks, but her proofs are on average 100% more expensive than others, she is not going to take a loss in most of her blocks, so rationally she will simply include only transactions that can make her profit and end up excluding transactions that will otherwise be included if she can lower her proof cost by 50%. I think this effectively increase the network's overall transaction fees as those 10% of Alice blocks now have higher L2 transaction fees than others. |
Maybe we should prepare two branches with different tokenomics. When we launch our mainnet, we can have one token but two L2s, each with a different tokenomics. If we feel like this current one is good to keep, keep it. I'll start an implementation based on the auction idea. It takes less time to write the code than to debate here. |
We have help some provers to run in previous Testnet of Taiko. It is good to see this discussion and I have learned a lot. We understand Taiko's desire to make cost a higher priority to make Taiko more competitive. Based on the current a3 economic design of the contract codes and the auction discussion, here are some comments from the provers' perspective, hope it will be helpful:
For Auction:
It is really a challenge to develop a perfect economic mechanism. I admire all the work that the Taiko team has done. We are looking forward to the final design. |
I think this has been explained quite a lot already because it's the core mechanism of the current design. Bob can only win by submitting the proofs earlier, but that will decrease the basefee and lower the prover fee and future rewards. So if Bob's proving cost is higher he will lose money by doing so. That is not sustainable for Bob, but is actually a good thing for the network because it reduces the prover fee! This is why the prover fee was going to
They only have to do so if they are worried about wasted prover work. Otherwise automatically the most efficient should prevail, it will just take a while to settle down and some will lose money in the progress. Everything is pointing in the direction of there only really be a couple of provers that will do the work anyway.
I don't really care about actual prover decentralization, the only thing that matteres is getting that 1proof/block in a reasonable time for a low price. Liveness and low fees, in a permissionless system, I think is the actual goal. I think you may be surprised that this is not unlike how 95% of blocks are built on Ethereum!
It's important that it's a delegated PoS, not a simple richest prover decides all. The Taiko token will already be used to control much more important things than selecting a short period in which a prover has the sole right to prove a block.
How would that work in practice if blocks are assigned randomly (but sure, deterministic in advance)? Other provers should randomly have very similar costs, especially when taking into account that gas costs will be significant part. I think in practice the actual proof generation cost variance will be low, and we also control how much that variance is based on the circuits we offer.
Provers don't decide which transactions get included in blocks?
All blocks will have the same prover fee, the same as in the current design. If Alice only has 10% of the stake, Alice cannot increase the prover fee, a >50% consensus of staked TKO is necessary for that.
Fair enough.
Isn't that how ~9 months of the 10 months were spent on this? It feels like this is the opposite conclusion of what the past has learned us! From your feedback above I think more discussion is necessary, my thinking of how things work are significantly different from yours and probably other people. |
Describe the feature request
We want to try an implementation of an auction mechanism, ideally as an L3 running parallell with our L2 running the current tokenomics, to compare and contrast. This thread can serve as a discussion among core members to figure out the best way to make a simple, early, non-gas optimzied proof of concept.
Describe alternatives you've considered
Description of the alternatives you've considered here.
Additional context
Additional context here.
The text was updated successfully, but these errors were encountered: