Intercoin Tokenomics on UniSwap

This is an optional extension to the Intercoin Tokenomics, that describes how to make UniSwap behave like a bonding curve.

Hacking UniSwap for Fun and Profit (optional)

Many non-technical people are wary of sending ETH to a smart contract directly, even if its source code is openly published. They are used to buying tokens directly on the UniSwap website, or some similar interface. (Never mind the fact that they are still trusting the token’s smart contract, this is just a psychological phenomenon at the moment.)

Therefore, we could try to turn UniSwap into a “bonding curve” interface, implementing the same tokenomics as the issuing contract’s bonding curve above. Doing this would mean that UniSwap itself would act more like a venue for “primary sales” of tokens than a “secondary market”, which creates opportunity for other exchanges and market makers to create the secondary market with tighter spreads, futures contracts, etc.

People would not pay any taxes when buying the token on UniSwap, but they’d pay a tax to cash out, something that has recently become popularized by tokens such as SAFEMOON and is now extremely commonplace across newly launched tokens. (So commonplace, in fact, that decentralized exchanges such as UniSwap and PancakeSwap natively support tokens featuring fees on transfer, telling their users how much ETH they will receive after factoring in the fee.)

Decentralized exchanges like UniSwap work by having an automated market maker facilitate trades between two tokens, such as ETH and AGU, by using a liquidity pool. The price relationship between them is expressed as x·y=k where x and y are the amount of ETH and AGU in the liquidity pool, respectively, and k is a constant.

To buy AGU on UniSwap, someone can send ETH to it, increasing x by some factor, whereupon y is decreased by that same factor, because UniSwap sends them back some AGU tokens. This is called a swap: buying AGU causes its price to go up, and selling AGU causes its price to go down.

Another set of operations on UniSwap involve adding and removing liquidity. These operations multiply or divide x and y by the same factor – so the price of AGU to ETH remains unchanged, as it is based on the ratio of x to y.

The Proof of Concept

With this in mind, we could make a smart contract which would start out by creating a liquidity pool with some ETH on one side, and the total supply of AGU tokens deposited on the other. As people come and buy the tokens, more ETH is deposited and AGU is withdrawn. After every such purchase, the smart contract could remove some liquidity – which doesn’t affect the price, but would withdraw 90% of the newly deposited ETH, along with a corresponding amount of AGU tokens, from the liquidity pool and into the contract’s own reserves. Thus, 10% of all deposited ETH would be left in the liquidity pool, while 10% could be distributed to the original team and investors, leaving 80% available for the “buyback fund”.

One could have the AGU rely on UniSwap’s price oracle, letting UniSwap determine the price. This would be alright for the vast majority of cases in real life, but if we want to guarantee payouts to absolutely everyone in the worst case of a complete “run on the bank”, then we’d want to stick with the linear price increases described in the Intercoin tokenomics. In order to mimic the linear price increases, however, the AGU smart contract must execute a combination of removeLiquidity() and swap() to add just enough AGU tokens to precisely end up with the same price as the AGU would have.

Whenever someone sells AGU for ETH, this increases y and decreases x, causing a drop in price. However, before this happens, the token contract can apply a “cashout tax”, which has recently become popularized by tokens such as SAFEMOON and is now extremely commonplace across newly launched tokens. (So commonplace, in fact, that decentralized exchanges such as UniSwap and PancakeSwap natively support tokens featuring fees on transfer, telling their users how much ETH they will receive after factoring in the fee.)

Normally such taxes may range between 10% and 20%, but if we charge 30%, then the price would drop by around 70% of what it would have dropped otherwise. After such sales, the smart contract could be made to leap into action and buy back the AGU tokens to restore the price to where it just was.

Normally, if more tokens are sold to the liquidity pool than are bought from it, the price would drop according to the formula x * y = z. In our case, however, the price stays the same and the tax would increase linearly.

Intercoin can apply this technique on multiple trading pairs in UniSwap, and across multiple blockchains (PancakeSwap on BinanceSmartChain, HoneySwap on xDaiChain, and so forth).

Because all the AGU sold to the liquidity pool had to have been first bought from it, we know that the smart contract has enough ETH for buybacks to exactly counteract the prices moves from the sales, after the tax has been applied. Thus, even if everyone who bought AGU sold it back, the price on UniSwap would not drop! The unprecedented price charts full of accurate green candles could bring a lot of confidence to prospective investors to buy more Intercoin, and enable a lot of important Intercoin applications, such as stablecoins and virtual currencies.

https://community.intercoin.org/t/intercoin-application-stablecoins

https://community.intercoin.org/t/intercoin-application-virtual-currency

1 Like