Target Weight Market Maker

Overview

Target Weight Market Maker is a mechanism that implements efficient on-chain liquidity provision by utilizing novel approaches, including oracles and custom fee mechanics.

The TWMM is implemented as a smart contract. This smart contract works with ERC20 assets as collateral. It is helpful to think about the TWMM as a vault that provides on-chain liquidity. Unlike traditional AMMs, the TWMM does not rely on a bonding curve; instead, assets are managed in a portfolio-centric manner. A TWMM pool can also include more than two assets. This allows a TWMM pool to be described with target allocations, for example: 25% BTC, 50% ETH, and 25% USDC, where shares are denominated in the same quote value. Unlike on-chain portfolio managers, the TWMM allows these assets to be used for on-chain trading.

Trade execution happens by utilizing oracle prices. At its core, the TWMM uses the provided oracle prices to execute swaps.

More importantly, a custom fee is applied. This fee model is based on a "deviation factor." Because asset prices constantly fluctuate and trades may shift the collateral values, we define two primitives:

Target shares (target weights): The shares that are defined to be ideal for the pool.

Current shares: The shares that are actually describing the current reserves of the pool.

Deviation is a relation between current shares and target shares (e.g., if the current share is 5% and the target share is 10%, then the deviation is 5 - 10 = -5%). The pool charges fees based on deviation. It incentivizes trades that decrease deviation and penalizes those that increase it.

Why It Is Efficient

Oracles keep the price up-to-date with the market, which makes trade prices always fair and efficient and removing loss-versus-rebalancing problem. Oracle prices also allow the pool not to depend on reserve values for price discovery, which allows for stable prices on large trades.

The custom fee mechanics allow for the dynamic adjustment of target asset weights and incentivize the market to align with them, turning the LP token into a derivative of a traded portfolio. This allows for the creation of collateral management strategies with varying risk/return profiles. This mechanism reshapes impermanent loss from an unavoidable risk into a manageable market variable.

Key Roles

Interactions with a TWMM pool can be categorized by the role of the user performing the action. It is important to keep in mind that a TWMM pool can be actively managed, which makes every pool unique (unlike traditional AMMs where a pair of assets typically defines a single, static pool).

Strategy Manager. The Strategy Manager creates the pool and actively manages the pool's asset weights and fees. This can be a DAO multisig or an individual. The owner also configures their portion of the protocol fees.

Liquidity Provider. Liquidity providers are responsible for depositing liquidity into the pool, receiving an LP token which represents a share of the pool's assets and a share of the fees. Liquidity providers can also participate in protocol token farming.

Trader / Strategy Executor. This role consists of users who utilize the pool's liquidity for various needs: MEV extraction, solving intents, trading, etc. They are highly incentivized to perform trades that move assets' current shares toward their target shares, thereby capturing rebates and maintaining the integrity of the pool's strategy.

Asset Requirements

There are a couple of requirements for an asset to be included in a TWMM pool:

  • Be ERC20 compatible.

  • Its balanceOf function should only be affected by direct transfers (i.e., it is not a rebasing token).

  • Have a reliable oracle price feed (e.g., from Uniswap V3, Redstone, Chainlink, etc.).

If these requirements are fulfilled, an asset can be part of a TWMM pool.

Last updated