CypherSwap: More Than Just A DEX

Cypherium
Cypherium
Published in
6 min readOct 8, 2020

Although DeFi has enjoyed roller-coaster market conditions this year, the opportunity it presents for financial practitioners is still immense and far-reaching. The most fundamental innovation of DeFi is the automatic completion of transactions by computer code, replacing traditional transaction intermediaries. The rapid development of DeFi has, thus, attracted the attention of regulatory agencies and central banks in various countries.

Back in August of this year, Cypherium CEO Sky Guo discussed the market prospects of the combination of DeFi and central bank digital currency in a dialogue with representatives of the Bank of Thailand. In order to return the support of the community and welcome the Cypherium mainnet launch, we announced the launch of the first DeFi product based on the Cypherium public chain — the decentralized exchange CypherSwap.

The CypherSwap ecosystem is mainly composed of two types of users: liquidity providers and traders. Liquidity providers provide corresponding pledges on the chains of X currency and Y currency through the CypherLink protocol. Traders can exchange X coins for Y coins at a fixed fee of 0.30%. This exchange process is automatically completed by the smart contracting of the Cypherium chain.

CypherSwap’s unique architecture completely sidesteps the concept of limit orders. What is unusual here is that market makers in this system no longer specify the transaction price when providing liquidity, but only provide funds, and CypherSwap takes care of the rest.

CypherSwap, in effect, will bring all participants’ liquid assets together and compose the market according to a certain deterministic algorithm. This algorithm is called the “Automatic Market Maker” (AMM), and it will offer prices to end-users based on some predefined set of rules. AMM is not rigid, and different algorithms have trade-offs. While our AMM is in R&D, CypherSwap will initially use the same algorithm as Uniswap, the “Constant Product Market Maker Model.” One of the major characteristics of this AMM is that it can provide liquidity no matter how large the order book is or how small the liquidity pool is. The trick is to gradually increase the currency price as demand (buying orders) increases. Although this is not very friendly to larger orders, because the system never has to worry about insufficient liquidity, it can almost always operate effectively.

CypherSwap breaks through the limitation that Uniswap is only limited to Ethereum and its tokens, moving towards a broader market of any blockchain (such as BTC and XRP with larger currency values). With the expansion of functions, in theory, any currency on blockchain can be redeemed on CypherSwap.

The following is the basic architecture diagram of CypherSwap:

When the liquidity provider provides a transaction liquidity pair (such as USDT-ETH, XRP-ETH), it needs to send instructions to the CypherLink Connector. The CypherLink Connector will try to perform Lock processing on X Nodes and Y Nodes. Once the Lock is successful, the Cypherium chain node will be notified through the automatically formed route between CypherLink Connectors, and then a transaction instruction will be formed to execute the corresponding smart contract on the Cypherium chain; after the adjustment instruction is finally confirmed by other Cypherium consensus nodes, it will be recorded as a CypherSwap Pool and reward Liquidity providers a certain amount of CPH tokens.

When a trader needs to exchange X coins for Y coins, they also need to send instructions to a CypherLink Connector. The CypherLink Connector will try to place a lock on X Nodes. Once the Lock is successful, it will be notified via the route automatically formed between CypherLink Connectors. The nodes of the Cypherium chain will then form transaction instructions to execute the corresponding smart contract on the Cypherium chain. The smart contract will generate a price prediction (Price Oracle) based on the “Automatic Market Maker” (AMM) algorithm, which is automatically converted into the amount of Y coins. The corresponding number of exchanges is notified to X nodes and Y Nodes through the CypherLink Connector routing, allowing them to unlock and atomically exchange. The below diagram illustrates this process:

Every exchange of different currencies naturally comes with a certain time delay, and there is a certain inevitable risk for both parties of the exchange. Therefore, we have introduced a risk mechanism that utilizes the utility token on the Cypherium blockchain (CPH) as a pledge. Liquidity providers and traders need to pledge a certain amount of CPH to “Referee” their smart contract: if any trader or liquidity provider disagrees with a transaction, either of them may submit a referee request to Cypherium’s Referee Smart contract. The Referee will automatically follow the X and Y returned by CypherLink two days after receiving the referee request. The actual transfer of currencies will be automatically executed by the referees.

It is worth noting that traders and liquidity providers do not need to pledge a lot of CPH tokens to the Referee, but in fact, need only pledge the limit value of each transaction. For example, if the transaction is worth at most $2,000 USD, then as long as the pledge is equivalent to $2,000 USD worth of CPH, then that is required. Each time the transaction is completed, the last pledge can be reused. Each time the pledge Referee will automatically adjust the transaction risk value of the associated account. By default, the exchange smart contract will refer to the risk value for exchange quantity control.

Of course, traders and liquidity providers can also voluntarily take certain risks to conduct transactions without staking CPH, but the system will give priority to dealing with transaction pairs that are pledged within the risk value range.

CypherSwap provides a scalable and easy-to-develop framework for liquidity providers, and it supports a variety of AMM algorithm strategies as well as the classic order-book model commonly used in traditional exchanges. CypherSwap will automatically match the best market maker for the user’s order, greatly reducing user handling fees. For liquidity providers, CypherSwap can automatically match liquidity providers with the liquidity pools bearing the most yield, allowing them to achieve maximum return. In addition, CypherSwap enhances the developer experience by encapsulating the underlying logic of each transaction, and the network only opens the logic interface to developers, which reduces the chance of developer errors and makes CypherSwap extendable. Every new market maker mechanism can be added to CypherSwap as a plugin. CypherSwap will also support trading varieties such as NFT and derivatives. CypherSwap will also be able to be combined with Cypherium ID, establishing KYC/real-name registration, which allows regulatory agencies to crack down on criminal acts of money laundering through CypherSwap, ultimately helping to achieve CBDC integration.

The CypherSwap Token (CST) is the governance token of CypherSwap. The total issuance is 1.5 billion. Among them, 1.2 billion tokens are for Cypherium pre-sale participants and will be distributed at a ratio of 1 CPH = 2 CST. The other 200 million tokens are for participants of the public sale and will be distributed at a ratio of 1 CPH = 1 CST. 100 million tokens are for the CypherSwap Ecosystem Rewards for liquidity providers. The Cypherium team does not maintain any share. CypherSwap and CST do not bear any profit or dividends. CypherSwap will be fully governed by the Cypherium community, and token owners can use their CST to vote on network-wide decisions. The CST tokens will not have a lock-up or vesting period.

Finally, CypherSwap is an experimental product: users need to bear all risks themselves. Participants should not use CypherSwap as a decision on whether to participate in the Cypherium token public sale. This article does not constitute any legal contract relationship. The Cypherium team reserves the right of final interpretation. The CypherSwap infrastructure will take time to develop. It is estimated that this development time will take approximately 2–3 months to complete after the launch of Cypherium’s Mainnet scheduled for October 31, 2020. The Cypherium Team cannot guarantee or be accountable for any specific launch date or if the CypherSwap development will be completed.

--

--