2020-07-23 MiniSwap
Most of the transactions are going through centralized exchanges, where the users need to fully trust them for managing their assests and transactions. However, the risk of trusting these centralized exchanges has also been seen. For example, QuadrigaCX, which was the largest cryptocurrency exchange in Canada, lost $19 million of their customers' assets [1].
Decentralized Exchanges (DEXes) have been introduced to address this problem -- they allow traders to purchase and sell cryptocurrencies in a peer-to-peer manner, so no involvement of any trusted party is required. Atomic Swap is one of the promising technology for implementing a DEX. While it enables pure peer to peer trading, it also introduces problems such as unfairness and long confirmation latency. While existing work [2] has provided a solution towards a fair atomic swap protocol, the issue of long confirmation latency is inherent.
Another promising direction is leveraging liquidity pools. With liquidity pools, pairs of assets are reserved for trading. For any pair of assets supported by the liquidity pool, traders can exchange their assets without any third party. As traders can only perform the transactions if there are reserved assets, one core problem is how to attract liquidity providers to provide liquidity by reserving assets. It is not difficult to see that incentive [3,4], which has been a key component of all permissionless blockchains, can be equipped to incentivize liqudity providers. However, flawed incentive designs will lead to attacks and other concerns [5-13].
There are two main types of incentive designs, namely "trans-fee mining" and "liquidity mining". They are different from the Proof-of-X mining in blockchains for reaching consensus (a detailed analysis can be found in the survey [14]). Rather, they are used to incentivise users to join the ecosystem.
"Trans-fee mining" was proposed by FCoin in 2018 [15]. With FCoin, each time a transaction is created, 100% of its transaction fee will be returned in FCoin token to the payer as a reward. This is one incentive design to encourage traders to join the system. However, as FCoin may have no value to the trader, FCoin also introduces extra reward to all coin holders -- 80% of the transaction fee in its native currency (such as ETH) will be distributed to all coin holders. So, traders are incentivized to join the system, becoming a holder of FCoin token, and obtaining a share of the transaction fee of every transaction in the FCoin ecosystem.
While this had successful attracted traders, it is not sustainable. Rather than charging a trader to perform transactions, FCoin rewards traders. Profit-driven traders will create transactions at full speed to earn FCoin token and the share as a token holder. Indeed, the trading volume of FCoin was the top one among all exchange services, and the daily reward can be as high as 6000 BTC [16]. However, once all coins are minted, then the system would lose liveness as there is not enough supply to be distributed.
"Liquidity mining" aims at giving reward to the liquidity providers rather than the traders. There are different ways to implement liquidity mining. Compound [17] is a famous example of protocols deploying liquidity mining. With Compound, users become a liquidity provider by supply assets to a pool and obtain interests for its contribution (similar to depositing money into a bank). Liquidity providers first reserve some assets in the pool and obtain "cToken" of Compound which entitles the owner to an increasing quantity of the underlying asset. Users can use their "cToken" to borrow different assets available on the Compound and pay some interests to Compund. The borrowers may have some quick gains through the financial games [18]. Both borrowers and liquidity providers can withdraw their asset by trading them back with "cToken". Oners of "cToken" can also manage the business direction and decisions of Compound through weighted voting. The potential concern here is that rich users might be able to take over the control of the system.
Uniswap [19] is another popular DEX deploying liquidity mining. Uniswap incentivizes liquidity providers by giving them a share of the earned transaction fees. In particular, Uniswap changes each transaction a 0.3% fee, where 0.25% will be distributed to the liquidity providers, and 0.05% will go to the Uniswap account. One issue is how to incentivize traders. With Uniswap, traders are incentivized by the potential profit it can gain through the price difference between Uniswap and other exchanges. Uniswap price oracle is based on a constant function market makers [20,21], where the product of the number of reserved tokens is a constant. For example, if Uniswap has a pair of X token A and Y token B, then when a user using X' token A to buy Y' token B, the product of the reserved number of tokens should remain the same, i.e., XY = (X+X')(Y-Y'). The price of Uniswap (V1) is also defined in this way. This allows traders to speculate in the exchange market as the asset price on Uniswap is changed dynamically and is different from other exchanges. This, on the other hand, may have a security risk as the price can be easily manipulated. Uniswap (V2) fixed this problem by taking an accumulated price over a period of time [22]. However, as speculation/manipulation becomes harder, the trading volume may decrease.
MiniSwap [23] introduces a hybrid model (a mixture of "trans-fee mining" and "liquidity mining") to address the above issues. MiniSwap provides three types of rewards. For each trade with transaction fee f ETH in MiniSwap, a number of MiniSwap tokens (called MINI) worth 2f ETH will be minted. A (parameterized) portion of the tokens are given to the trader, and the rest are distribued to the liqudity providers. The transaction fee (f ETH) is used to exchange MINI in the liquidity pool. 50% of the obtained MINI will be distributed to all MINI holders, and the other 50% will be destroyed. In this way, both traders and liquidity providers are incentivized to join the ecosystem.
Recall that with FCoin, there is a problem when all coins are minted. MiniSwap has an upper bound (of 500,000 tokens) on the number of tokens can be created every day, and this limit reduces every month until a point where the limit (18,000 tokens) remains unchanged. This guarantees the sustainability of the system as the mining process can last for 100 years. The parameterized ratio of tokens as the reward to the trader and liquidity provider can also strengthen sustainability. It enables the system to dynamically balance the incentive of different parties in the system to make it more sustainable.
Overall, the MiniSwap hybrid model has taken the benefit of both "trans-fee mining" model and "liquidity mining" model, while eliminated the potential concerns. Formally defining and analyzing these models, e.g. through the game-theoretic approach [24], would be an interesting direction.
Reference
[1] The Guardian, Cryptocurrency investors locked out of $190m after exchange founder dies, 2019.
[2] Runchao Han, Haoyu Lin, Jiangshan Yu. On the optionality and fairness of Atomic Swaps, ACM Conference on Advances in Financial Technologies, 2019.
[3] Satoshi Nakamoto. 2008. Bitcoin: a peer-to-peer electronic cash system
[4] Jiangshan Yu, David Kozhaya, Jeremie Decouchant, and Paulo Verissimo. Repucoin: your reputation is your power. IEEE Transactions on Computers, 2019.
[5] Joseph Bonneau. Why Buy When You Can Rent? - Bribery Attacks on Bitcoin-Style Consensus. Financial Cryptography and Data Security - International Workshops on BITCOIN, VOTING, and WAHC, 2016.
[6] Yujin Kwon, Hyoungshick Kim, Jinwoo Shin, and Yongdae Kim. Bitcoin vs. Bitcoin Cash: Coexistence or Downfall of Bitcoin Cash, IEEE Symposium on Security and Privacy (SP), 2019.
[7] Kevin Liao and Jonathan Katz. Incentivizing blockchain forks via whale transactions. International Conference on Financial Cryptography and Data Security, 2017.
[8] Ayelet Sapirshtein, Yonatan Sompolinsky, and Aviv Zohar. Optimal Selfish Mining Strategies in Bitcoin. Financial Cryptography and Data Security, 2016.
[9] Ittay Eyal and Emin Gu?n Sirer. Majority Is Not Enough: Bitcoin Mining Is Vulnerable. Financial Cryptography and Data Security, 2014.
[10] Ittay Eyal. The Miner’s Dilemma. IEEE Symposium on Security and Privacy, 2015.
[11] Miles Carlsten, Harry A. Kalodner, S. Matthew Weinberg, and Arvind Narayanan. On the Instability of Bitcoin Without the Block Reward. ACM SIGSAC Conference on Computer and Communications Security, 2016.
[12] Kartik Nayak, Srijan Kumar, Andrew Miller, and Elaine Shi. Stubborn mining: generalizing selfish mining and combining with an eclipse attack. IEEE European Symposium on Security and Privacy, 2016.
[13] Runchao Han, Zhimei Sui, Jiangshan Yu, Joseph K. Liu, Shiping Chen. Sucker punch makes you richer: Rethinking Proof-of-Work security model, IACR Cryptol. ePrint Arch, 2019.
[14] Christopher Natoli, Jiangshan Yu, Vincent Gramoli, Paulo Jorge Esteves Veríssimo.
Deconstructing Blockchains: A Comprehensive Survey on Consensus, Membership and Structure. CoRR abs/1908.08316, 2019.
[15] FCoin, https://www.fcoin.pro
[16] The Block Crypto. Cryptocurrency exchange Fcoin expects to default on as much as $125M of users' bitcoin, 2020.
[17] Compound, https://compound.finance.
[18] Philip Daian, Steven Goldfeder, Tyler Kell, Yunqi Li, Xueyuan Zhao, Iddo Bentov, Lorenz Breidenbach, Ari Juels. Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges. IEEE Symposium on Security and Privacy, 2020.
[19] Uniswap. https://uniswap.org
[20] Bowen Liu, Pawel Szalachowski. A First Look into DeFi Oracles. CoRR abs/2005.04377, 2020.
[21] Guillermo Angeris, Tarun Chitra. Improved Price Oracles: Constant Function Market Makers, CoRR abs/ 2003.10001, 2020.
[22] Uniswap V2.0 whitepaper. https://uniswap.org/whitepaper.pdf
[23] MiniSwap. https://www.miniswap.org
[24] Ziyao Liu, Nguyen Cong Luong, Wenbo Wang, Dusit Niyato, Ping Wang, Ying-Chang Liang, Dong In Kim. A Survey on Blockchain: A Game Theoretical Perspective. IEEE Access, 2019.