Trident : A New Automated Market Control and Routing System

    Overview

    In this dashboard, I will go through the following questions:

    1. What is Trident?

    2. How it works?

    3. What about others, What makes Trident special?

    db_img

    1.What is Trident?

    Trident is basically a system that implements automatic market maker algorithms and special routing mechanisms to provide an extensible AMM deployment framework. This framework initially has four predefined pool types, which will dive into later. In addition to the initial pool types, developers can also utilize this framework to implement new pool types that conform to the standards of IPool interface.

    Before moving further, there are some definitions to familiarize with.

    1.Automatic Market Maker?!

    Here's a basic understanding of this term:

    It is basically a magic box, or an algorithm if you will, that dictates price of coins(assets) based on some formulas. The most basic algorithm that can be used for an AMM, is ** Constant Product AMM**.

    The formula for this algorithm is as simple as X * Y = K. Where K is a constant that corresponds to the amount of Liquidity in a pool of this two assets X and Y. The formula works as some sort of scale of justice, in this case liquidity. Whenever there is a surplus in one asset, the other asset 's price is adjusted (raised) so that the market stays in balance.

    There are some limitations and issues with this implementation that has lead to the development of other more complex algorithms.

    db_img

    2.So How Does it Work?

    Now that we have some understanding of AMM, I will explain how this system works.

    There are 3 so-called Prongs that compose Trident.

    1. Pool Type Options

    2. Routing Engine: Tines

    3. Integration to BentoBox

    These altogether, provide an efficient platform that improves user experience and increases the yield profit.

    Pool Types

    Trident is a superset of popular AMM concepts that are implemented into and extendible framework. This is very crucial, since many AMMs face the siloed liquidity problem, that in long-term has shown to be inefficient. Also the ability to design and extend new pools is an exciting opportunity.

    The predefined Pool types are as follows:

    1.Hybrid Pool

    The hybrid pool combines and order book and trading engine with the liquidity pools of an AMM to solve two of the biggest issues with DeFi, Slippage and front-running. This is achieved by using the StableSwap Curve for like-kind assets. It can support up to 32 assets.

    2.Concentrated Liquidity Pool

    Providing liquidity to concentrated liquidity platforms is significantly more difficult because liquidity providers are required to provide liquidity at set price ranges, so if the price of the underlying asset moves outside of the set price range, the LP no longer earns fees without re-adjusting the price ranges.

    For example, if a user provides liquidity for the ETH-USDT pair at a price range between $2,500 - $3,000, and the price of ETH rises above $3,000, the user will no longer earn fees. Additionally, fees earned from providing liquidity are not automatically re-invested, and the user is exposed to impermanent loss. The narrower the range that liquidity is provided, the greater the capital efficiency and the greater the yields that may be earned by the LP. But, these tight ranges come with increased risk

    3.Weighted Pool

    Also called Index pool are similar to Constant Product Pools, except that it is possible to assign different weight to swappable assets. This pool can support up to 8 assets. The advantage is that the extreme price shift's impact can be reduced by diversifying weights.

    4.Constant Product Pool

    This is a pool of two assets that have the same value and are balance in supply demand actions.

    Routing Engine, Tines

    The router works to find an efficient "route" to an optimal price. It implements a Multihop, Multi-route and Multi-Pool-Type search path by considering factors such as gas cost, price impact and graph topologies. Price impacts (slippage) is reduced by performing trades in horizontal channels as shown below.

    db_img

    Integration to BentoBox

    Bentobox is a special smart contract that can be perceived as a vault that holds liquidity and can yield profit to investors by lending assets or flash loans. It allows single token approval and achieves gas efficiency by reducing the steps of approval process.

    3. What about others, What makes Trident special?

    As shown in table below, All of the other AMM-based DEX are very limited in functionality and extensibility. While Trident has multiple preset pool structures and can be upgraded for newer custom pools, Many DeFi exchanges support only asset-pair.

    Also The code for this project is under GPL3 license, which is a first in this field and it is exciting to see how it turns out.

    db_img
    db_img

    Liquidity pools are one of the core technologies behind the current DeFi technology stack. They enable decentralized trading, lending, yield generation, and much more. With a steadily growing trading volume on its decentralized exchange, the profit-sharing mechanism for SUSHI holders, an increasing number of chains and scaling solutions to launch on and new features being added to the ecosystem, Sushi looks like one of the strongest DeFi projects.

    Conclusion