-
Notifications
You must be signed in to change notification settings - Fork 24
FLIP 336: Dynamic Transaction Fees #337
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
Conversation
|
I support, but I would love to see some adjustment and then discount/surge depending on the load. This seems to have very negative associations ( surge pricing ) like flow fees can increase 100x etc. But instead we can maybe do 10x down, 10x up etc. As you mention in the FLIP, fees are unreasonably low for adoption ( marketing etc ) maybe better to show that it is discounted like 100x. |
Thanks (as always) for taking the review the FLIP @bluesign. Do you mean that there should be a 10x down surge when network usage is slower than anticipated? TBH, that was part of the first draft but then I removed it as the tx price is already so low. OR did you mean that we first do a 100x to establish a new baseline and then do a 10x+ or 10x- based on that? Raising the base fees is something I feel should be tackled as a broader tokenomics discussion as it should address other concerns around inflation. This FLIP is intended to make sure the network can gracefully handle overcapacity. |
|
Love it! |
Yeah exactly, fees are now super cheap. Instead of saying "in surge you can pay 100x" it is much better to say: "in surge you can pay 10x, but also when network is calm, you can pay cheaper fees" |
| Flow measures execution load using a metric called Execution Effort, which represents the computational work required to process a transaction. In this proposal, the term Computation Unit (CU) is used interchangeably with Execution Effort. Each CU reflects a fixed amount of compute consumed by execution nodes. | ||
|
|
||
| When a transaction is executed, each operation within it consumes a predefined number of computation units. For example, reading or writing to storage, creating an account, or invoking a function all have associated CU costs. The total effort for a transaction is the sum of these units, based on the number and type of operations it performs. | ||
|
|
||
| Alternately, Transactions Per Second (TPS) or **transaction** throughput could have been used. However, Computation Units per Second (CU/s) provides a more accurate and granular view of network load than TPS. Transactions can vary widely in complexity, so relying on TPS alone can obscure the actual strain on the network. CU/s directly measures the consumption of execution resources, making it a more precise and reliable input for determining surge pricing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Execution effort focuses explicitly on execution time and is proportional to it. It covers only one of our available resources.
If the network is at execution capacity (the execution nodes are not executing fast enough) this is absolutely correct. However, execution is not always our bottleneck. With a high enough TPS of extremely simple transactions we would see problems else-where. This is what the inclusion effort is supposed to focus on.
In the future we could see the surge factor of a transaction also be a function of the Inclusion Effort and Execution Effort:
- If execution is struggling to keep up, but collection/consensus/network/... is doing fine we could have the surge factor be higher for transaction with a lot of execution effort and lower for low execution effort transactions
- If execution is not busy at all, but collection/consensus/network/... are struggling, we could change the surge factor so that is is cheaper to send 1 transaction with many operations instead of one transaction for each operation
While its ok to take only Execution Effort as the estimate now (since we do not have a good definition for inclusion effort), we should definitely mention that inclusion effort is part of this too and covers other resources besides execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment @janezpodhostnik.
- The FLIP proposes the usage of CU /second as a proxy for load. If the TPS is high but the transactions are extremely simple, wouldn't the CU/second still go well above the average?
- Will edit the FLIP to include something along the lines that surge will be applied to both inclusion effort and execution effort as the formula for tx fees = surge (inclusion effort + execution effort)
|
Nice!
I think we should limit the Lets say that I as a user send a tx and at the time of sending I could see that the surge factor is 1 so I expect to pay the normal fees. However, there could be a system transaction changing the surge factor already in flight and will change the surge factor before my transaction is executed. This means I will have to pay more than I expected. I will need to pay While users should account for the surge factor changing somewhat, I think its unreasonable to expect that users account for a huge Another (far more complex) solution would be to charge transactions with the surge factor as it was at the transaction reference block. |
|
@janezpodhostnik this is very good point. I think one option is setting surge pricing smoothing. Like we set surge pricing at some regular block interval ( maybe 600 blocks ) and it changes maximum x percent ( ex: 10 percent) up and down. This is especially important if you are running transactions on behalf of others ( like evm gateway ) |
As part of the short-term implementation, the plan is to only adjust surge if there is a sustained load instead of revising the surge very frequently (see here). We should never have to adjust surge more than once in Time to seal window of 12 seconds. |
The short term implementation would be far more rudimentary where we only adjust surge if there is a sustained load for ~1 hour. I added more explanation here. Let me know if that makes sense. |
|
How does this affect the events emitted at the end of every tx? Is gas/computation affected by this or only the amount of flow you pay for each gas/computation. |
|
I also agree with @bluesign that a model where there can also be negative surge to be good. But then general fee have to go up. |
|
Do we need to look into previous traffik to do some simulations or is it enough to be abstract here. Like will a period where live nation create accounts be enough for a surge. Because those tx are imho pretty expensive since they create new accounts. |
|
Great question @bjartek.
|
|
hi folks, @bluesign , @bjartek - As mentioned earlier, raising the base fees should be addressed as part of a broader tokenomics discussion, where we can look holistically at inflation and other related considerations. This FLIP is focused on ensuring the network can gracefully handle overcapacity, and is not intended to adjust base fees. Since there have been no further comments, I would like to mark this FLIP as The next step will be to run a test on testnet where we raise the surge price to validate that the mechanism works as expected. This will also help identify any upstream or downstream dependencies such as wallets, dapps, or other integrations that might be affected by surge pricing changes. |
@janezpodhostnik - ok to mark this FLIP as |
|
Marked the FLIP as |
Issue for the FLIP: #336
Comment Period: 2 weeks (July 28th to Aug 4th)