There’s an obvious risk to having trusted centralized Gateways. How can anyone trust that they will be there to swap your wBTC back to BTC years from now?
The following is a suggestion as to how to decentralize the Gateways and simultaneously increase the collective value of the Waves Network.
This will be using BTC/wBTC as an example but it applies equally to all coins needing a Gateway…
A preparation step is to introduce a new ‘type’ of Waves token called (for example) a ProxyToken.
ProxyTokens will act and behave like all other tokens, but they will have one difference:
ANYONE can issue ANY AMOUNT of them at any time, but the fee would not be 1 Waves - it would be equal to (or as close as possible to) the purchase price of the related asset - and this fee would be distributed evenly to all forging nodes.
For example, to create 0.1 pBTC, I could pay a fee of (approx) 330 Waves - which will be distributed to all forging nodes.
Unlike the current wBTC-type tokens, issuing ProxyTokens on the network will ADD VALUE to the Waves network through the payment and distribution of fees equivalent to the value of the asset issued. Collectively, everyone will benefit as external coins are introduced into the Network - like pumping up an infinitely expandable balloon.
Then…
Gateway functionality should be added to ALL nodes (that wish to enable and support it.)
Moving BTC -> pBTC and pBTC -> BTC should be done by Atomic Swap functionality built into each node.
But…To perform a swap, the participating node will have to have reserves in the token/coin that is the other ‘side’ of the swap.
For example:
I send 0.1 BTC from an external address to a Waves address.
A ‘gateway active’ Node that owns 0.1 pBTC gets to forge the transaction and the do the swap.
This node sends their 0.1 pBTC to my Waves address and it keeps the 0.1 BTC I sent + a special swap fee.
The same on the way out: The forging node must own the amount of BTC to send out before they can accept the pBTC.
Participating nodes will therefore have to build a reserve of both real assets and ProxyTokens (by buying and/or issuing them) to participate in the swaps, but they could also choose only to support one way or the other.
Node participation in gateway functions will be optional, but the extra fees should be a strong incentive.
The special fees for these gateway ‘swaps’ (for participating nodes) + the fees for ProxyToken issuance will make Waves nodes very profitable.