Add SIMD-0017: Priced Compute Units#19
Conversation
|
Hello @anoushk1234! I love the enthusiasm with creating a new proposal, but this document does not follow the format designated in SIMD-0001. I'd recommend taking this idea into #core-technology on discord and vetting it out first to understand the likelihood of it being accepted, as specified in the idea stage of SIMD-0001. |
Hey Jacob, yeah that sounds good to us. Anatoly DM'd me asking to write it up haha so that's why we're posting. The fee per cu vote normalization was his idea and I passed things along to Anoush. |
Regarding the idea we're already discussing this with Anatoly and other validators in dms, for the format I was slightly confused since some proposals didn't follow the exact same format so i assumed it was flexible. Nevertheless we will improve it, thanks. |
|
For some more context, the voting fee normalized pricing (0.000005 Sol/total vote cu's) mentioned would cost: 2100 cu vote transaction = 0.000005 Sol so 2.38 * 10^-9 per cu For 1 year costs the calculation used is: 1k cu = 0.000002380952 Sol 10k cu = 0.00002380952 Sol 100k cu = 0.0002380952 Sol 1 million cu = 0.002380952 Sol Network non-vote fees per year using non vote cu's of half the current block size (48 million cu is full block, so 24 mil cu): Network vote fees per year using vote cu's equivalent to 2000 validators (2100 per vote * 2000 = 4.2 million cu per block): For reference, assuming slot times are 400ms (often slower than this on avg), our validator which has ~800k Sol stake and is around ~0.2% of stake would earn about 4500 Sol in block rewards just from non vote transactions with this current base fee per cu and assuming non vote cu's take up about 24 million cu per block. |
|
for dapps, this would be closer to reality Since the standard transaction was 200k CUs. The maximum tx would then be 8x of the standard one. Vote fees would reduce. Because vote fees would reduce the network needs to guard more against vote spam. Easy way would be to only allow the top X validators that fill up to 33% of the compute budget. |
|
Looks like most of the main points have been covered here already.
|
I don't think a base fee per cu of 0.000005/200k cu will achieve any of the desired spam resistance and cause more trouble than it's worth: Why not something less disruptive and more spam-resistant such as 5x to 10x lower than your original suggestion? 10x lower would be 0.000005/20k cu which would leave validator base block rewards nearly the same as they are now assuming half full blocks. CLOB transactions would also be similarly priced afaik? Priority will be needed anyway if blocks become full and people tend to over pay in first price auctions, which was the motivation for EIP1559: "However, first-price auction may require users to either overpay transaction fees or have a long waiting time. In particular, in periods of high demand, transaction fees can be volatile due to which it is difficult for users to make the right bid. If we overbid, we end up overpaying. If we bid low, we may experience a long waiting time." "Because vote fees would reduce the network needs to guard more against vote spam. Easy way would be to only allow the top X validators that fill up to 33% of the compute budget." |
|
@Overclock-Validator excellent thoughts, Here's my short take after reading all this: Solana should go full EIP1559. Here's my long take: We're trying to tackle a few distinct issues:
There is one additional, very key consideration that has come to light recently: blocks on the network are actually filling up! I think there was a perception that existed even as recently as two weeks ago that Solana had functionally unlimited block space. This was based on the claim of tens of thousands (or soon millions) of transactions per second. This perception overlooked that a small number of very computationally intensive transactions can consume all available block computing power. The problem of how to extract fees from a market with a perceived infinite supply is much, much different than a problem where, all-of-a-sudden, supply is bound. In light of bound supply, it makes sense to set base fees fairly low. I don’t know if it’s as low as .000005/200k, but the point is that, if blocks fill up relatively easily, this won’t matter. If lowering the base fee makes it easier for validators to survive in low usage times, then this is good. This addresses issues 1 and 2. Priority fees should, in theory, address 3. However, we could still see that people take advantage of the system because they are using a huge amount of compute power and paying relatively little for it (compared to someone doing a simple transfer). This should be enough of an argument alone to say that fees and therefore priority fees, should be priced in CU. A 200k CU tx that pays .000005 + .00000001 should be beaten out by a 2k cu tx that also pays .000005 + .00000001. The 200k cu should have to pay more than 100* ( .000005 + .00000001) in order to beat out the simple transfer. On to 4. @overlock-validator mentions the auction problem. EIP1559 solves this elegantly by rapidly raising the base fee, while still allowing for priority fees. The base fee gives the market an excellent idea of what is required to be paid in order to get your tx through in a reasonable time. This is fantastic. It reacts to demand and is informational. Base + Tip (priority) is an excellent (and now proven) model. Burn/give to validators however the community decides. If EIP1559 is working great for ETH, and Solana now clearly has similar limits on supply, the same concept should work well for Solana. Appendix: When firedancer comes around, or whenever the hardware on the network can actually sustain much greater than 48mm CU, governance can simply vote to raise this limit (expand supply) |
There was a problem hiding this comment.
Hey for stopping spam and hitting the block limit #16 would be a better choice as it would also incentivize the dapp developers rather than just Validators, also most of the spam is received by a few programs that become unusable for the regular user because of the cu limit hit by arbitrages that fail for the most part.
yea but the point on vote txns makes sense.
|
Application Fee #16 would help, especially to disincentivize spamming on hot accounts. But charging base fee based on transaction's requested CUs would help on preventing block space being filled up unnecessarily.
Agree. but it doesn't seem to do much because it is still too cheap. What do you guys think to increase priority fee from current |
|
Charging a base fee would affect all the users and I think the main focus here is reducing spam on specific mev hit accounts that fill the most block space. There are a bunch of SIMDs currently trying to solve similar problems #4 (comment) (Dynamic fee) #19 (Priced cu) #16 (app fee) would be better if we could have more clarity on this. |
|
Application fee (#16) is to deincentivize "bad actors" to lock-up specific dApp accounts, the fee only applies to users use these dapps. Dynamic base fee (#4) and this (Priced CU #19) are both trying to make base fee to better reflect the cost of executing a transaction. imho, this proposal (#19) is part of overarching design (#4), which can be tackled separately, and hopefully easily. |
There's no enforced ordering of transactions within a block, except when txs conflict. So I'd say this idea is a non-starter with current PoH protocol. |
I think you meant to reply to the comment I replied to? |
yes |
|
I think I recall @ripatel-fd talking about some better understanding of demand side due to contention within the scheduler of FD? As this seems to be a lagging response is there a way to smooth the curve out to ensure there's a more palatable experience from the UX? I think I'm also stuck on what the "ideal" configuration is within the network, as it seems there are many different "best" interests at play here too. If validators are aiming to maximize rewards and users are aiming to reduce their txn fees, and dApps are left to manage their own access fees is there something that satisfies all parties? Maybe a practical example might help, if I'm a market maker on Solana using Phoenix, how much more would I be expected to pay? Is that > then amount I'm willing to continue to be a participant in this economic activity? Broadly, I agree that something should be done with fees and more optimal strategies are well worth the time to explore, I suppose I'm curious how this addresses DDoS and Spam with keeping the current stakeholders comfy. |
Oh, I see this sentence
In last 7 days, vote takes about ~35% of block CUs |
|
One of the problems we have seen is that the priority fees do not reliably result in higher priority. In a competitive environment, a low-fee TX will sometimes be processed ahead of another TX with a higher priority fee. Has this been addressed/fixed yet? There might be confounding factors outside the fee structure that should be addressed before we can confidently optimize fees. (People won't use the fees if they don't work). |
|
Replying to @bji's comment
I wonder what is found to be confusing about the terminology here. I'm been too involved with the terminology, so I probably don't have a good outside perspective. If you've got a suggestion on how to make it less confusing, I'd be happy to hear.
If the network is under-utilized this dynamic price would be low, and thus the cost-per-CU would be low. As far as I am aware, using the numbers @taozhu-chicago ran, the cost of the vast majority of transactions during these periods would be lower than the current static-fee approach.
Solana's current scheduler does prioritize by price-per-cu, if the cu_price is set. I think a counter-argument to the current approach is that there is not an automated response to demand. Even if we saw more adoption of the current priority fee market, it's still a reactive process for users and bots. I think if we were starting Solana today, there's very little chance we'd have a static base fee that was not dependent on the cost of execution for a transaction. The base-fees in this proposal are a replacement for that, not priority markets. I don't mean to voice explicit support for the proposal at this point, just trying to give some thoughts as feedback. I'm sure @taozhu-chicago has some thoughts as well! |
A leader will begin packing at the beginning of their slot(s). If a low-priority transaction is there, but the high-priority transaction hasn't arrived then low-priority one would probably get packed before it. Non-conflicting transactions are processed & packed in parallel. So even if both are within the leader's buffer, a low-priority tx could come before a high-priority one if they didn't conflict, but the high-priority was blocked by some other even higher priority tx. |
Because I think that a priority fee is a whole value that shouldn't be expressed as a function of CU. It should just be expressed in its own terms, as an absolute value, not tied to CU. A validator should be looking at many factors of a transaction, including:
And then turning all that into an "expected total resource cost" for executing the tx. Then dividing this by priority fee + base_fee (which I believe at this time is only N_SIGNATURES*5000 lamports), to get a "total cost : total fees" ratio. Then priority ordering tx to get the maximum fees for minimum execution cost. Having priority fees as a function of CUs obfuscates that fact that the function of priority fees, it makes it seem like they are somehow related to CUs, when in fact they are not, at least not any more than they are related to a whole host of other transaction factors.
But the SIMD proposal did not include dynamic fees, it includes a fixed additional fee (for V2 it proposes governance for setting the fee, which still is not dynamic). Unless I'm missing something?
OK then, problem already solved? :)
Agreed, this is an important part of the system that is missing, but I don't think it's addressed by this SIMD proposal.
I agree that this is an issue, although I don't know that this SIMD addresses that issue.
CUs are only one part of the cost of execution; the total number of transactions that can be fit into a block is dependent on many factors, and write locks are a big part of those too. I think it's better to let validators compete on being the best to evaluate the true costs of executing tx relative to other tx instead of encoding some approximation in protocol. Because validators will earn more if they are better at packing blocks, so there is a natural incentive for validators to be good at that, even better than a static rule set for predicting tx execution cost would be. It becomes a differentiating factor for validators; those who earn more block rewards can potentially earn more stake by refunding some of those rewards back to stakers, or reduce commission commensurately, or just be more profitable in general. |
Yes tough problem to solve. How much induced latency is profitable? Waiting to initiate execution of tx could risk sub-optimal block packing due to running out of time in the slot. But premature initiation of execution of tx could allow too many "low-paying" tx to push out "high-paying tx". Validators can compete on being as skilled as possible at making these trade-offs.
|
|
Also to remind: this proposal is about base fee -- fee transactions need to pay for being included in block; it is not about priority fee that is paid to increase chances to be considered for block inclusion.
The (exponentially) increased base fee during block space contention should/would provide economic incentive to stop/reduce spamming. On the other hand, the experiment shows such dynamic fee schema would increase validators' income, and lower most transactions' base fee. A win-win is possible.
UX can be somewhat improved with this. For instance, wallet can display "transaction fee: <= 0.001 SOL" (if sets max base fee to 0.001 sol, without priority fee) |
Good reminder. I think that base fee should be only and exactly that expected to cover the cost of:
Because that is the only work that a validator is obligated to do to process the tx. A validator cannot even evaluate a tx relative to other tx unless it has done that work. Once that work is done, priority fees (and evaluation of the expected cost of executing the tx) can be used to determine what tx are included in a block, and are all that are needed for that purpose. A priority fee of 0 is acceptable here because a validator could decide that it has so much extra block space that it doesn't mind processing tx for free. |
|
@bji, you are right in this SIMD not having dynamic fees. I was conflating Tao's new comment #19 (comment) with the proposal. As it stands I don't support the SIMD as is, but am open to the dynamic fee-structure proposed in the comment I've linked. |
this is the best idea for decentralized the solana chain and attract more validators to the validator set, thanks for this idea |
|
Interesting data, but please re-compute with 50% base fee burned. Base fee needs to go to validators, it pays the one unavoidable cost that validators must pay to process tx, which is cost to receive and decode tx. 50% burn is OK, but it can't be 100% burn. 50% priority fee burn should probably be the case also, because otherwise validators can pay themselves very high priority fees to mess up any mechanisms that are based on tracking avg priority fee over time. |
|
Updated above comment with following scenario: |
Not convinced by this argument. Validators don't get base-fee rewards because they received and decoded the tx, they get it for packing it in their block.
The proposed mechanism for base-fee is exponentially increases and decreasing. If the leader receives any of those rewards, they are incentivizd to keep the base-fee high. We could probably do some math to find what percent makes this sort of strategy unprofitable. However, I think considering there's usually some base-level of load that's reasonably close to the threshold (remember the fee changes are determined by divergences 2stddev from mean load) it's likely that you wouldn't need too many transactions to bump it out of this range. Example: To get above 88% threshold for raising prices, Node 2 will send 3.36M CUs of spam for next 4 slots. The price is now 16.02 l/cu for my slots. Assuming mean load of 81%: 2491.4M lamports (4 slots @16.02 l/cu) - w/ 50% burn this would be 1245.7M lamports reward. Node 2 would effectively 3x their "investment" on those spam txs. In this example, the starting price was already high. But it shows that in these congestive periods this sort of strategy is incentivized specifically at the time we don't want it to be. |
|
My intuition agrees @apfitzge's argument - no one should benefit from global resource congestion, but everyone should pay to contribute to such congestion. so protocol to burn 100% dynamic base fee makes sense to me. |
I agree, however I do think @bji has a point, regardless of the behavior, there is a cost incurred on the validators side via bandwidth and cpu cycles. Is this accounted for within the model? As well doesn't the same argument apply to priority fees or is that localized to the "hot" accounts? |
The use of bandwidth and compute is requried for participation by all nodes, not just the leader. Potentially there's some economic changes to epoch-level rewards where all nodes are rewarded for base-level participation - this seems like an entirely different proposal and discussion beyond this congestion control. |
This reinforces the point I was making. People won't use PF if they work only some of the time. |
Thanks. This fixes my concern about PF not working reliably. Are we still left with a situation where simple transfers become expensive? |
|
Don't forget the cost of storing the TX/ledger in long-term storage. Currently, we do not collect fees for long-term storage. The price to write a TX should include the expense to save it forever in the ledger. I expect to rough out another SIMD for storage costs at Breakpoint this year. Teaser: Show up for Block 0 (Validator Day)! |
This is a legit issue. People are already talking about the ledger to store nfts similar to ordinals. If it's not an issue now it will be sooner then we think. |
when block space under stress (eg utilization > 88%), all transactions including simple transfer will become more expensive, otherwise one should expect simple transfers become cheaper. |
If the fees are too damn high, the blocks are too damn small! Thanks for answering my questions. I'll re-read this proposal over the weekend. |
|
@anoushk1234 @jacobcreech While I appreciate the effort that went into this proposal, and is worth discussing, I suggest closing this PR or setting it to draft stage. As it stands, this proposal presents a list of suggested changes, but it fails at specifying what these changes exactly are. It also doesn't clearly demonstrate how the suggested fix solves the problem mentioned. (Most of this is in various comments on this PR). In my humble opinion, if a SIMD cannot be unambiguously implemented, the idea should be further discussed via Discord/Forum, etc, before it enters the improvement process. |
@anoushk1234 @ripatel-fd I agree. As per SIMD-1, let's continue the discussion on this topic within #core-technology on the Solana Tech Discord. Once a design is met and fleshed out that has a chance of reaching consensus, feel free to open another SIMD and we can take it through review again. |
Problem
All transactions are required to pay the same base fee irrespective of the amount of compute units they use. This a spam/ddos vector and can cause blocks to reach their compute limit very frequently.
More on the issue here solana-labs/solana#29492
Solution
Transactions should be priced based on the amount of compute units they use instead of a constant base fee.