Let’s discuss here the new approach we are going to use to support custom assets fee. We have implemented my recent proposal called Sponsored Transactions and now testing it on TestNet.
Briefly, idea is that anyone can issue a token and allow others to use it as a fee. Any transaction in blockchain must be paid (very cheap, but not free), so we need to ensure fee asset has some value and miners get appropriate reward. Sponsored transactions allow to achieve this - users pays fee in assets to issuer and issuer pays waves to miners.
The story of this feature is rather long, we had a lot of discussions within the team and with community. Finally we decided to go with this, since ability to pay fees in assets is essential feature of our Waves Platform.
Although we call it “Sponsored Transactions”, asset issuer actually doesn’t pay for transactions. He takes his tokens instead and can even make profit on this, since token value can be greater than transaction cost.
Here are some interesting points:
- Only asset issuer can sponsor transactions. This behavior can be easily extended to allow anyone to sponsor transactions with any assets in future.
- Asset fee supported for Transfer transactions only. In future we can add this ability to other transaction types.
- Feature requires activation process. After feature is activated, sponsored transactions can be done. After next 10000 block period previous fee asset mechanism stops working (miners cannot accept any fee asset without sponsorship).
- Miners will get waves only for all the transactions which will make it easier to distribute mining rewards
- Fee size can be removed from node configs when feature is finally activated. In future we can introduce mechanism for changing fee size dynamically based on some consensus rules, if needed.
- SponsorFeeTransaction costs 1 waves, we don’t expect it to be used very frequently.
- Later this feature will allow us to support custom asset fees in official wallet.
Specifications is here: https://docs.wavesplatform.com/technical-details/sponsored-fee.html
Let’s discuss here any questions and ideas.