Uniswap turns left, Curve turns right, ACY goes forward.

Fredericking
ACY Finance
Published in
9 min readOct 24, 2021

In the past DeFi summer, DeFi protocols have focused on their respective niche markets. Uniswap uses its constant product curve to occupy the spot trading market, but Curve trades stablecoins by centralizing the supply of liquidity.

The release of Uniswap v3 changed this status. To a certain extent, Uniswap v3 is a collection of order book and AMM mechanisms. The passive liquidity providers become active market makers. This makes it possible to trade various forms of assets, from altcoins, assets that decay over time ( interest rate derivatives, options, etc.) to stablecoins.

Soon after Uniswap announced its entry into the stable currency market, Curve Finance, a protocol focused on stable currency exchange, released a v2 version of the whitepaper and proposed a new AMM mechanism that combines concentrated liquidity and passive liquidity of non-stable currency assets.

When Uniswap and Curve fight with each other, upgrading their AMM mechanism and invade into each other’s areas of expertise, ACY Finance has found a thoroughly new road nobody else notices to achieve the goals the traders and liquidity providers dream of, from the aspects of quantitative trading and protocol reforming.

Uniswap turns left

Not all AMMs are the same, and different strategies come with their own sets of trade-offs. Uniswap uses a Constant Product Market Maker Model. This AMM has a particularly desirable feature where it can always provide liquidity, no matter how large the order size or how tiny the liquidity pool is. The trick is to asymptotically increase the price of the coin as the desired quantity increases. While larger orders tend to suffer, the system never has to worry about running out of liquidity. It will quite literally always work.

Let’s go through a simple numerical example using the A Token/B Token trading pair. Let’s assume market makers have collectively funded this pool with 100,000 A Token and 1,000 B Token. Uniswap takes these two quantities and multiplies them together (100,000 x 1,000 = 100,000,000).

Uniswap’s goal for this particular trading pair is to keep this product equal to 100 million no matter how much trading activity occurs (hence the name Constant Product Market Maker). The key formula to keep in mind is x * y = k, where x and y are the coin quantities in the liquidity pool, and k is the product. To keep k constant x and y can only move inverse each other.

When a trader makes a purchase of B tokens into this contract, they are increasing x (as they add A tokens to the liquidity pool) and decreasing y (as they remove B tokens from the liquidity pool). However, this does not scale linearly. Trying to buy 100 B tokens instead of 10 B tokens does not require merely 10x the A tokens. It increases asymptotically. The easiest way to see this is by plotting out the curve x * y = k.

How does Uniswap achieve a hundredfold increase in liquidity? The quotation directly depends on the size of the order. The more you move to the right end of the curve, the less profit you get from the unit input

This also implies a problem: the larger the transaction, the higher the slippage. For example, when the amount of ETH purchased exceeds 2% of the liquidity pool, it will be very expensive to purchase a large amount of ETH.

Curve turns right

Curve is much more comprehensive than Uniswap and it is worth discussing in depth. Curve’s trading business is divided into stable currency, stable consideration assets, and other non-stable consideration assets.

It should be noted that, unlike Uniswap and other mainstream AMM spot trading platforms whose main service objects are market makers and traders, Curve actually has three main service objects.

The first two objects are market makers and traders. The third type of service object is ignored by most people. They are the issuance and operators of stablecoins and derivatives of BTC and ETH, as well as the issuers of bills. For Curve, the third object determines the height of its stable currencies and stable consideration assets business.

Similar to stable coin issuers, there are BTC asset issuers on Ethereum. In addition to WBTC (mainly operated by the well-known cryptographic institution Bitgo), which has the largest issuance and strongest consensus, there are also RenBTC and Synthetix issued by Ren. sBTC, HBTC issued by Huobi, BBTC issued by Binance, etc.

Stable Consideration Assets play an important role in Curve, including (1)BTC mirrored assets on Ethereum issued by various institutions, ETH pledge certificates, and synthetic assets such as sLink created by Synthetix, the largest trading volume of BTC assets is the RenBtc pool, followed by the SBTC pool with 9.3 million US dollars. (2)The largest transaction volume of ETH assets is the eth synthetic asset sETH pool created by the Synthetix protocol, followed by Lido’s ETH pledge certificate stETH pool. (3)The Link synthetic asset sLink pool created by the Synthetix protocol.

The Ethereum version of BTC issued by these institutions wants to get more users and scenarios to adopt, and they also have to solve the problem of de-anchor and depth from the real BTC price. Therefore, these institutions have also initiated proposals on Curve through proposals and other methods. The liquidity pool of BTC assets ensures the stable consideration and depth of their BTC assets.

For stablecoin issuers, the priority is to ensure that their stablecoin prices do not fall off the anchor and that they have an excellent low slippage exchange depth at the anchor price point. These two points are the major premise for subsequent scenarios and user expansion, which are also the starting point for users’ confidence in the stablecoin. However, these two points are not so easy to realize, especially the “low slippage under huge transactions”.

The below Dashed line is for Uniswap v2, the blue line is for Curve v1, and the orange line is for Curve v2.

Dashed line — Uniswap v2, blue line — Curve v1, orange line — Curve v2

The mechanism behind Curve’s centralized liquidity

The bonding curve of Curve V1 combines a constant product (XYK) and a constant price invariant, so its price slippage is zero.

In the middle price range, the blue line is linear, indicating that there is no slippage. In areas far from the median price, the curve deviates from the linear shape, and liquidity drops sharply. In other words, only when a large amount of liquidity is taken out of the pool, the pricing curve will become parabolic.

If we apply the Curve V1 mechanism to non-stable currency transactions, the deposited assets will drop sharply. Specifically, Curve’s joint curve relies on deposited assets to stabilize prices. If the deposit price rises more than the slippage of the fund pool price, assets will soon be lost.

Curve v2 inherits some of the characteristics of v1. As shown in the figure above, the linear shape also surrounds the middle price. Curve v2 also introduces additional features, such as adding an internal oracle to continuously provide AMM with its changing intermediate price, which controls the risk for the liquidity provider.

Curve possess a very good token model, which is embodied in:

The distribution of all scarce resources on the platform is deeply tied to governance rights, and the governance rights (veCRV) need to be exchanged for the token CRV. A large number of long-term lock-ups have reduced the project’s circulating market value. This greatly reduces the tokens selling pressure.

Fully introduce the game of the platform participants (liquidity providers, asset and bill issuers) to form a continuous competition for governance rights (veCRV), further increase the demand for CRV, and undertake continuous unlocking of CRV selling pressure.

The stable currency price of CRV guarantees the APY of the liquidity provider and retains the liquidity; The multi-participant of the system are deeply tied to the development of the Curve platform, which improves the participation in governance depth and effectiveness; What is more, it creates extremely high conversion costs for the core participants, and it is difficult for them to leave if they have pledged a large number of CRVs for a long time.

Market makers provide Curve with liquidity, and traders provide Curve with transaction fees. So what do the issuance and operators of various assets contribute to Curve? The answer is: huge demand for Curve tokens.

ACY goes forward

ACY Finance has already found an innovative way to include more diverse assets and allow the launch of new tokens without permission in the field of DeFi, which will bring lower slippage and more output to traders, and more transaction fees to cover the impermanence loss of the liquidity providers.

What is the Global Optimal Split Algorithm?

Instead of having one transaction with one order, we split one order into two or more transactions. The keys we use to split the order depend on kind of factors, such as the amount of input and the liquidity connected. This solution significantly reduces the single route’s impact in Constant Product Market Maker Model. Also, ACY maintains an active reference page for the orders for easier access. All the users can see the weights in different routes.

So in ACY Finance, the large transaction becomes less painful. What is more, every order gets a limited and manageable trading fee at most 2 twice of the single route, while the gas costs can be controlled within a certain limit.

Split Algorithm and Flash Arbitrage just take place after the mempool pending process

The mempool is a group transaction that has been broadcasted to the network and is waiting to be mined into a block. A mempool service provides direct insight into a transaction’s life cycle. A transaction waits in mempool after being broadcasted by a user to a node. From there, the transaction will either be mined into a block, replaced by another transaction, or dropped by the network.

Robot Traders analyze the mempool to dramatically increase the odds of capturing MEV (miner extractable value). There are a variety of different types of trading strategies where mempool can be applied. Some of these strategies involve finding trading opportunities that otherwise do not exist.

(1)Front running — determine what gas price is required to win a gas auction.

(2)Tailgating (or back running) — predict trade opportunities that will mine into a future block based on the outcome of another user’s trade.

(3)Sandwiching — predict trade opportunities that will mine into a future block by pushing another user’s trade opportunity to its max slippage limit, which will result in an arbitrage opportunity at a later time (typically within the same block).

(4)Generic predator — hijacking a transaction call in hopes of front running an auction that leads to capturing MEV. This is done generically by replacing the original transaction caller’s address with the predator’s address and submitting a new transaction at a higher gas price.

ACY Flash Arbitrage processes the on-chain computing rather than off-chain which Uniswap V3 does.

Flash Arbitrage performance can be measured in terms of latency in milliseconds. We connect all the orders to our smart contract, and document reported incoming transactions. The baseline for each arbitrage transaction is assumed to be the time as soon as the transaction goes out of mempool. So each transaction in ACY Finance will get a latency of zero. But in Uniswap and Curve, the whole latency equals the time of the transaction data processing in the client server plus that the time pending in mempool.

If Curve wants to challenge Uniswap’s dominance, it may need to improve the user experience and target a more mainstream audience, but it is very hard. Similarly, If Uniswap wants to challenge Curve’s dominance in stable currencies, it may need to adopt a new AMM mechanism, not just the V3’s price range upgrade. As detailed above, the goal of low slippage under huge transactions is achieved by ACY Finance. What is more, the liquidity providers may gain twice the revenue from the split orders trading fee.

--

--