Liquidity Pools

Pool Design

Koi is designed to have a dynamic setup for Liquidity Pools so that both Stable and Normal AMM curves can be utilized. Additional to these pools, Koi Finance also has Concentrated Liquidity pools as well. Stable Pool - Assets that trade within a close price range (e.g USDC/DAI)

Normal Pool - Assets that trade with no correlation (eg. ETH / WBTC)

Concentrated Pool - Custom price range based on user input

There can be a Normal, Stable, and Concentrated pool for the same assets. Koi will find the best priced trade regardless of pool type.

Fees for each pool are independent of other pools. Each type of pool has a min-max fee that can be set by LPs: - Stable: 0.01%-2% - Normal: 0.01%-10% - Concentrated: 0.01%, 0.10%, 0.3%, 0.5%, 1%

LP Fees Notice for v2 pools

If you are building external contracts to hold LP tokens, make sure they call the claimFees() function on the LP pair prior to moving or receiving tokens. LP fees accumulate on the account that holds them and are non transferrable directly.

// example for a contract that holds LP tokens
// before withdrawing LP from a contract, claim fees and distribute
// fees will be lost forever if not claimed eventually
IKoiSwitchPairDynamic pair = IKoiSwitchPairDynamic(lp);
(uint claimed0, uint claimed1) = pair.claimFees();
IERC20(pair.token0()).safeTransfer(feeReceiver, claimed0);
IERC20(pair.token1()).safeTransfer(feeReceiver, claimed1);
IERC20(address(pair)).safeTransfer(feeReceiver, pair.balanceOf(address(this)));

Stable Pools

Stable pools are designed for assets that should be traded within a tight price range. This allows high volume trades to have capital efficient swaps. Once pricing is set upon pool creation, the trade price maintains tight a spread - make sure to set the proper pricing for these pools.

(x3y)+(y3x)k (x^3 * y) + (y^3 * x) ≥ k

Normal Pools

Normal pools are designed for non correlated and volatile priced assets. These pools use a generic AMM formula and are used for most trading pairs.

xyk x * y ≥ k

Dynamic Pools

Koi allows for pools to be created with LP fees ranging from 0.01% all the way up to 10% for normal pools, and 2% for stable pools. Once set upon pair creation, these fees can only be changed with the LP governance system. An LP provider (or delegated provider) with 50%+ vote weight can always change this fee. To prevent from gaming the system, there is a 0.1% fee on total votes when changing the fee of pools. This prevents flash loans from changing fee structures without some sort of losses. The simplicity of the dynamic fee pool w/ governance allows for a powerful system and tool for many projects in DeFi & crypto. Game Theory By observing traditional CEX markets and even most NFT marketplaces, it has been normalized for fees of 1%+ to be in place via marketmakers (spread), and content creators & teams (nfts). This fee system should empower not only individual LP providers, but also projects that focus on Protocol Owned Liquidity (POL) to set their base fee for their pairs to be able to build up a larger revenue stream for the project, versus what they can find on most traditional AMM based DEXs.

Governance

Koi comes prefabbed with a built in LP governance & delegation system. This allows for complex protocols to be built on-top of the Koi protocol, but also allows for dynamic fees within any LP pool. Each LP pool has a LP fee set upon pair creation. These fees can range from 0.1%-10%, depending on what the LP provider wants to set as the creator of the pool. Only one fee can be set at a time, meaning all LPs will be participating within that fee range. The LP governance system allows for the fee of the pool to be changed based on an account that controls more than 50% of the pool votes. Votes are directly correlated to the LP token supply balances. However, a LP provider may choose to delegate their 'votes' to another provider, allowing parties to lobby for delegates, thus increasing their pool weight. Mute has opted for this design, instead of a multi fee pool type for numerous reasons; the major one being that the pool with the deepest liquidity will always be traded on in comparison to its counterparts (pools with lower fees & lower liquidity). Thus, it is better to concentrate liquidity within one pool, and allow a governance system that allows for dynamic fees.

Protocol Fees

The protocol has 2 type of fees:

  • Dynamic (% of the LP pool fees)

  • Fixed (fixed % of the overall trade)

If the protocol fixed fee is set and is larger than what the LP pool fees are, then LP providers earn no fees for trades. Protocol Fixed fees will only be used early upon launch until LP TVL grows to a sustainable amount.

Last updated

2023 mute.io