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.
When can we expect this feature on main net? Same date as smart contracts (july) or earlier?
I love this feature and I think it’s a great way to increase leasing rewards and keep nodes from accepting useless tokens as fee yet still allow developers of tokens to allow their client to only use their assets instead of their tokens + Waves as fee.
It sounds pretty good, and from what I heard, both projects and nodes are happy with this.
Nodes get more and easier returns, projects are sure there asset can be used for tx’s.
We plan to release it in May release, so in a week or two it will be on mainnet, then activation.
I agree, don’t expect tokens fee will be used frequently but 1 waves isn’t much? It doesn’t seem fair for token issuer to keep his community live. Mercury team was going to use it, if I didn’t understand wrong their articles.
Adding new ability like smart contracts to be used with sponsered tx would cause unpredictible errors , if token issiuer will not cover the fee in time.
How mining rewards will be distrubuted among this sponsered txs ? To be fair on Pos, you should send correct fee to the miners, which will be seperated micro block miners and key block miners same as now.
Asset issuer who wants asset to be used as fee pays 1 waves only once to setup sponsorship. When you pay transaction fee in token, it costs for issuer standard transaction price - 0.001 waves.
Sorry for misunderstanding
This is one of the greatest feature in Waves platform since it is very easy to adopt and economically less expensive than smart-contract. I have tried it on TestNet and try to demo it to my users. Everyone seems to be happy.
One thing that I will add in this discussion is that the Sponsored-Tx will appear on the Sponsor’s Tx.History. This is good, since it will allow the sponsor to monitor all txs which have been sponsored.
I’m a big fan of the proposal and it will make things a lot easier both for nodes and projects.
On another note, I’d like to see non-issuers being able to sponsor transactions as well.
This for sure.
Personally I also would like to be able to only sponsor for a few addresses, however this makes things to complicated, so I understand why this isn’t possible
By the way, there is an open question: Should we allow to limit assets which one can send using my asset as fee? Is it ok that users can send any assets?
Of course, it should be use only for asset tx that sponsored issiued. It could be problem for sponsor bag with paying fee for other spam tokens.
I’m not sure this will actually be an issue because the sponsor will most likely set a token value > 0.001 waves…but to make things less complex it might be a good thing to only allow the sponsored asset to be transferred using the feature
This will open new possibility. In the sponsors point of view, it might not be a problem since they will be paid by some tokens worth something in exchange for 0.001 waves. Lets say if there is a guy who wants to spread his newly issued token, he may have several alternative ways for tx-fee. I hope it will lead to a more competitive token sponsorship price.
Yeah, it would be good if the cheapest sponsor would be accepted by doing a tx
I don’t think people will use other tokens as a fee if both cost same with default waves fee. Not sense. If sponsor want liquidty or a little bit attraction on his token, he have to use less cost fee rate to attract people using his token as a fee. Also allowing different user from other tokens to pay fee with less cost, would be problem for sponsor. Waves team can add two option for sponsor, if they want to allow all users to use or do not!
Issuers would get some of their tokens back with using it as a transaction fee. Not a bad idea but should be calculated with care since you’ll also pay for others’ transaction fees in Waves. From the user perspective, it’d be a nice practice I think, most of the token holders (if they are new on DEX) sell some of their tokens on DEX to get some Waves to make a transfer to another wallet. With this feature, they can manage it with tokens only. I’d like that if I’d be a Waves-asset trader.
Already proposed before implementation that:
- it is needed other type of tx to be supported by sponsored assets (Exchange, MassTransfer, Burn)
- Also not only token issuer should be able to start a sponsoring of any asset he wishes. He/She decides upon amount on minimum asset fee required to power up the tx and how much investor is willing to pay network for that. That could lead us to a new financial instrument for investment into specific tokens while supporting specific projects at the same time. Ie you set amount required and amount of waves you are willing to pay to the network (ie you are paying more to support network and to provide a higher fees for the nodes and for tx to be processed faster.
- any user must be able to use sponsored tokens to pay for transactions supported with sponsored assets (if its not yet already that way, didn’t check on testnet)
- there was also an idea regarding setting up a limit of investment after which sponsoring stops (during that the amount of waves on investor wallet is “freezed” and can only be used if sponsoring is stopped with specific txs
- investor must be able to set different payment schemas: ie for 0.5 tokens investor would pay the network 0.0011 waves and 0.7 tokens then investor would pay the network 0.0015 waves. Txs with more waves are executed faster. That option would be needed in future or for the super fast tx-s if such are needed
- Maybe also it is needed to set the sponsor? if there will be different sponsor for the same asset and have same prices users could also decide on sponsor. To go father - maybe sponsor could be able to set also number of users (wallets), who is allowed to use assets with very specific amount of asset fee (ie min amount of token for which investor pays 0.001 waves to the network but only selected wallets could use that).
- also algo is need to decided which sponsor to use if sponsoring settings are equal. If different then with selected fee seize in asset system identifies and uses the sponsor with highest waves payment. Or also during txs let the algo find best option for the txs - user sets Assetfee and let’s system “search” which minimum amount is needed of asset and then looking for best network rewarding size.
I believe that these all things are needed but not all now, maybe in few years some of them. Community should vote which stuff more needed and when to implement.
I am curious what kind of bug on Fee Sponsorship which has been fixed in the 0.13.2 release and caused the rollback in testnet network. Could you please share some details in here?
Some transaction details were written to database in a wrong format.