Pools and instant swaps: any token for any other, through DZY
Swap any Dznye token at once against its pool. Every pool is paired with DZY, so any token reaches any other in one step. 0.2% fee, no middleman.
Every token on Dznye can have one pool: an amount of that token and an amount of DZY, held by the chain itself. Anyone can swap against it at once, at the pool's price. Nobody runs it and nobody can stop a swap.
How the price works
The price is the ratio of the two amounts. When you buy a token with DZY, you put DZY in and take the token out, so the token gets a little dearer for the next person. A big swap in a small pool moves the price a lot; the same swap in a big pool hardly moves it.
Every swap carries a minimum: the least you accept. If someone else's swap moved the price before yours, yours is refused and nothing is taken. The wallet sets it for you (1% by default).
Any token to any other
Because every pool has DZY on one side, a swap from one token to another goes through DZY in a single step: your token is swapped for DZY, and that DZY for the token you want, both or neither. You never hold the DZY in between.
The fee, and where it goes
- 0.16% of each swap stays in the pool, for the people who put their coins in it.
- 0.04% of the DZY side goes to the Sun, which pays it out again by the chain's rules.
That is 0.20% in all, a third below the 0.30% most pools elsewhere charge. No DZY is created or destroyed by a swap.
Backing a pool
Anyone can put DZY and a token into a pool at its current price and get shares. Swap fees build up inside the pool, so your shares are worth a part of a growing pool. Take them out whenever you like.
Backing a pool is not a savings account: when the price moves, you end up holding more of whichever coin got cheaper. The fees make up for that only when there is enough trading.
Before you buy a new token
- If its maker can still issue more, they can issue and sell into the pool at any time. The wallet says when a token can be issued further.
- A small pool moves a lot on a small swap.
- Nobody checks what a token is worth. A pool only shows what people last paid.
Tokens that stand for a file
A token can also carry the fingerprint of a file (its SHA-256) and where to find it. Make exactly one, never to be issued again, and it is what people call an NFT: it can be sent and sold like any token, and anyone can check the file against the fingerprint.
For developers
GET /liquidity lists every pool, GET /quote?from=&to=&amount= says what a swap gives right now, and the kit has swapNow, openPool, addLiquidity, removeLiquidity and makeItem. See the developer kit.