We are happy to inform our community members that we successfully passed an external LeastAuthority security audit, and now we are ready to launch our QuipuSwap exchange. This article will explain why QuipuSwap is a game-changer in the Tezos ecosystem, what we bring to the community, and how you may benefit from using QuipuSwap.
What is QuipuSwap?
QuipuSwap is an open-source automated market maker protocol that provides an interface for the seamless exchange of Tezos-based Tokens and XTZ. In other words, you may add or trade any FA1.2 or FA2 standard tokens without limitations.
The solution is driven by security, decentralization, and scalability principles and serves as a standalone project, and at the same time, as an indispensable tool for the future solutions developed on the Tezos blockchain.
Main QuipuSwap Participants
QuipuSwap is a fully decentralized protocol governed by the LP holders' vote, benefited from the baker's rewards, governed by shareholders.
The QuipuSwap ecosystem comprises five types of users: liquidity providers, traders, bakers, developers, and voters.
- Liquidity providers are incentivized to contribute FA1.2 and FA2 tokens to common liquidity pools.
- Traders can swap these tokens for one another for a fixed 0.30% fee (which goes to liquidity providers).
- Bakers are motivated to encourage liquidity providers to vote for them by offering better rewards or in other ways.
- Developers can integrate QuipuSwap smart contracts directly to power new and exciting interactions with tokens, trading interfaces, retail experiences, and more.
- Voters can stake their shares to vote for the favorite baker or against the malicious one contributing to system wellbeing and maximizing the baker rewards.
We expect that more roles such as a governor or liquidity miner may be introduced with future protocol development. Our next publications will provide detailed information on how each role may benefit from participating in QuipuSwap.
What QuipuSwap gives to the Tezos ecosystem
QuipuSwap is a quite featured protocol that makes the Tezos ecosystem in many ways.
Allows adding any arbitrary token-XTZ pair
Anyone can add their FA1.2 or FA2 tokens to QuipuSwap and create their Trading pair. This solution may help new Tezos projects acquire liquidity by adding their tokens to the QuipuSwap exchange.
Enables instant token exchanges
We are not a central authority who decides which token should be on the market. After you add your token pair to the Liquidity pool, it will become tradable at once without any restrictions.
Allows earning profit from both swaps and bakers rewards
We propose a new option for the XTZ holders to earn rewards. By adding your Tokens to the Liquidity pool, you will earn 0.3% commission from each trade operation in this pool and baking rewards.
Allows to vote for delegates and ban the unreliable delegate
By adding your XTZ tokens to the Liquidity pool, you get a right to vote for the baker. Chosen baker will use Delegated power of XTZ tokens in the pool and pay rewards to all LP token holders. To get the privilege to work with the Liquidity pool, a baker may propose special conditions to the liquidity providers.
Helps developers to build Tezos dapps
We follow the principles of transparency and open-source. Developers may fork QuipuSwap to create new Tezos DEXes or integrate our solutions to their dapps.
We consider QuipuSwap an essential step that will significantly increase the Tezos DeFi ecosystem development speed. We will be happy to hear feedback from the community members about our protocol. Just drop us a message in our Telegram or Discord community.
QuipuSwap under the hood
This section will try to explain how QuipuSwap works and essential governance and baking concepts that are integrated into our exchange.
QuipuSwap AMM protocol uses the “constant product” formula: x * y = k where x and y are reserve balances and k is the invariant that remained unchanged during the trading operation. The formula determines the exchange price that is slightly affected by fee charges (0.3%). Collected fees are distributed to LP holders proportionally to their shares in the pool.
The price that differs from the external market creates an incentive for arbitrageurs to trade and equalize it.
Smart contract architecture
The principles of simplicity, decentralization, and scalability underlie the system design that is resistant to the protocol updates and token standards modifications.
According to the simplicity principle, the QuipuSwap core consists of two smart contract types: factory and pair. The factory is used to deploy and register new arbitrary pairs by any user. The pair (also called dex) is responsible for the trading operations, liquidity, and baker delegation management related to the only XTZ-FA token exchange pair. The pairs are the most utilised components in the protocol ecosystem.
The contracts' functionality is not upgradable, but developers can modify the metadata to match the TZIP-16 requirements that are still under passionate discussions.
More about the current Smart contract architecture you may read in our documentation.
By providing liquidity to the Liquidity pool a user obtains shares (LP Tokens). Shares are transferable and can be used in other ecosystem products. Meanwhile, the most involved users who want to commit to the protocol can stake their shares to participate in QuipuSwap governance.
LP providers can vote for what baker the pair's XTZ will be delegated for and can ban a delegate in case of irresponsible behaviour.
Each trading pair has its governance. The voting power is proportional to staked shares. The baker who received the biggest number of votes becomes a delegate. Banning the delegate requires a third of the total votes in the pool.
Using the potential of the Liquid Proof of Stake, the QuipuSwap protocol delegates provided XTZ liquidity for the bakers. All rewards (including all donated XTZ or XTZ sent to the default entrypoint by mistake) received by the LP pair, are distributed among all its liquidity providers.
To make a fair distribution, the user portion of the reward depends on two measures: user shares in the pool and duration of the providing tokens. The more considerable number and the longer it is kept, the bigger the reward user should receive. The reward is collected and distributed every 30 days. The complete formula of how Baking rewards are distributed you may find by following the link.
How to start work with QuipuSwap
From the launch, we have three of the most common QuipuSwap usage cases:
- become an Liquidity Provider
- add a new FA1.2 or FA2 Token to the exchange
- use QuipuSwap for trading
Let's take a closer look at each of them.
How to become a LP provider
Anyone can become a liquidity provider for a pool by depositing an equivalent value of each underlying token in return for pool tokens of the same standard that the deposited FA token. These tokens track LP shares of the total reserves and can be redeemed for the underlying assets at any time. Shares play a crucial role in pair governance, enabling voting for the baker or against the current malicious delegate through the freezing LP tokens that can be freely unfrozen whenever the user decides. All collected baker's rewards are distributed between LP token holders proportionally to the amount and duration of their holding. More detailed information on how to become a Liquidity provider can be found on this page.
How to add new FA1.2 or FA2 tokens
As we mentioned before, we do not have any restrictions on adding your tokens to the QuipuSwap exchange. However, you must be aware that adding new tokens requires adding the same number of XTZ tokens with a price ratio of 1:1. For instance, you create a new Liquidity Pool by providing 100 FA2 tokens with a price of 2 XTZ each, so you need to add 200 XTZ to the trading pair. Your new liquidity pool will consist of 100 tokens and 200 XTZ tokens. Trades start immediately after successful confirmation of pool creation. See detailed instructions how to add a new token pair here.
How to start trading
Trading is the most common cause of QuipuSwap usage. To start a trade, you need to connect your XTZ Wallet to the QuipuSwap. We strongly recommend using the Temple wallet. Click the tab “Swap,” choose the tokens you want to exchange, enter the number of tokens, and click the “Swap” button. Confirm your operation in the Wallet. That’s all. If you find it is difficult to conduct the first trading operation, you can follow this instruction or ask for help from our community in Telegram or Discord.
It is only the beginning of the great journey of QuipuSwap development. We will be happy to hear your feedback and suggestions on how to make our protocol better. Await our next publications, where we will be writing about different cases of QupuSwap usage and other useful information. Don’t miss our updates - join our communities.