-
Notifications
You must be signed in to change notification settings - Fork 0
Some notes
We note
For an Encointer community
-
$\tau_A$ the name for its token, and for$x \in \mathbb{R}_+$ we note$x\tau_a$ for$x$ tokens -
$d_A \in [0,1[$ its demurrage rate, i.e. the proportion of the supply burnt at each cycle (constant) -
$U_A$ the UBI, i.e. the number of tokens$\tau_A$ received by each participant at the beginning of a cycle (constant) -
$N_A$ the number of participants (non constant) -
$S_A$ the supply of tokens$\tau_A$ (non constant)
For an AMM between a pair of communities
-
$r_A^{A,B}$ the reserve of tokens$\tau_A$ in the AMM. When there is no ambiguity on the pair of tokens, we simply write$r_A$ . -
$\tau_{AB} = \tau_{BA}$ the minted token of the AMM, that represents shares in the pool and that is minted upon liquidity providing
We write:
- LPer for liquidity provider
- LPing for liquidity providing
Let
$d_A = d_B$ -
$U_A = U_B$ (without loss of generality)
We want to build an AMM-like DEX to make it possible to swap
Typically, LPing operations have no effect on the swapping rate of AMMs. The ratio
However, in our case, it might be hard for a user to acquire both tokens, and be able to provide liquidity. It is hard to predict to which extent it is feasible. We can imagine a business from
Or, the design allows users to associate in order to provide liquidity. If
We can also have the intuition that this form of paired LP encompasses the idea of trust between communities because providing liquidity for a user
Considering the special case of a local currency, with demurrage and ubi, it is not clear if we would have enough liquidity in the AMMs.
In this case, one solution could be to apply a multiplication factor
A limit on this form of credit line between communities can be decided by on-chain governance and agreement.
Suppose
It is intuitive that the advantages LPers get, somehow depends on their utility, for example the amount of trades on the AMM.
Instead of a fixed demurrage reduction, we can give a reward to each LPer at the end of each cycle, that depends on:
- the amount of trades issued during the cycle
- the amount of liquidity provided compared to total liquidity (as in classic AMMs)
This reward can come from either swap fees paid by the users, or by freshly minted tokens (which is equivalent to a demurrage discount).
Still, we need a way to distinguish real swaps from swaps made only to increase rewards: These "fake" swaps can take two forms:
- numerous swaps that cancel each other
- swaps with byzantine community controlled by a LPer
To prevent this, we can think of several mechanisms:
- use PoP to not take into account swaps by LPers, and use "quadratic voting"
- sum the value of swaps by each users on a cycle, to not take into account swaps that cancel each other from a same user
- charge fees on swaps to make it non profitable for LPers to issue swaps only to increase rewards (for example fees increase with number of swap for 1 user)
High slippage means we need more liquidity. We can increase rewards for LPers who provides liquidity for pair where we observe high slippage. This would make LPs on this pair more attractive.
(The following is only an example and it may not be optimal).
It may be better to not totally compensate demurrage (to keep the supply controlled). Let
- worse case:
$x=0$ and$f(x) = d$ (normal demurrage) - best case:
$x \rightarrow \infty$ and$f(x) \rightarrow 0$ (no demurrage)
We can separate rewards for
We can imagine something looking like
Even with summed transactions on each cycle, it is still possible to make a big transaction in one direction, and revert it (with the opposite swap) on the next cycle, to maximize