background

Core concepts

Legacy Liquidity

Prior to concentrated liquidity, Uniswap v2 pairs were the standard for DeFi liquidity. Shadow implements these traditional pairs alongside stable pairs for correlated assets.


Swaps

On Shadow, users can swap tokens for other tokens. Each trade's exchange rate and slippage is determined by the total value of the liquidity pair and the current pair balance, whose price arbitrage bots help maintain.

Pair Types

Shadow features two types of Liquidity Pairs, each with its own swap curve:

  • Volatile (Uni V2): This is the most common type of pair where tokens are paired with equal weights in terms of dollar value.

    • Volatile Swap formula**
  • Stable (Correlated): These pairs use an optimized curve designed specifically for correlated assets like stablecoins. The curve features a modified invariant that allows for highly efficient swaps with minimal slippage between tokens of similar value.

    • Stable Swap formula

Swap Curves

Visualization

To provide a graphical representation of the swap curves, the graph below illustrates the variance between 0 and 100. It demonstrates that the Orange (Correlated) curve exhibits less slippage from the mean as k fluctuates.

Orange = Correlated Curve, Black = Volatile Swap Curve

Fee Structure

Speaking of swap fees!

Fees are adjustable if required, and typically range from:

  • Volatile (0.2-2%)
  • Correlated (0.001%-0.03%)
  • Native (1%-3%).

The theoretical MIN and MAX for legacy fees is (0.01<= Fee <= 5000bps). This means the minimum fee is 0.0001%, and the highest is 50.00%.


Pairs

In the x(3,3) model, liquidity providers stake their LP tokens in a gauge to earn emissions from Shadow. Shadow Exchange encourages liquidity provision with incentives. The more votes allocated to a liquidity pair by xSHADOW voters, the more SHADOW that will be emitted to the gauge in the following epoch.

Rewards & Incentives

Legacy pairs can be staked to earn emissions and liquidity incentives. Once you have the LP tokens, you can deposit them within their corresponding gauge (if the pair is whitelisted), and start earning rewards in real-time! If the pair does not have a gauge, swap fees are directly auto-compounded directly into the pair.


Limit Orders & TWAP

Overview

Limit Orders allow you to set a specific price for buying or selling tokens. The order only executes when the market reaches your target price, giving you control over execution timing and price.

TWAP (Time-weighted Average Price) breaks large orders into smaller chunks executed over time to minimize price impact. Use TWAP when trading large amounts or during volatile periods.

How it Works

The protocol uses a maker-taker model:

  • Makers submit orders with price and expiration parameters
  • Takers compete to execute orders at the best possible price
  • Orders execute directly through DEX pools with no intermediary custody

Configuration Parameters

ParameterDescriptionDefault
IntervalsNumber of trade chunks1
Interval TimeTime between trades2 minutes
Max DurationTotal order lifetimeAuto-calculated

Note: dLIMIT is simply TWAP with a single trade (1 interval).

FAQ

Gas Usage

Why do limit orders use more gas? Limit orders require two transactions (bid + execution) due to the auction mechanism. This doubles gas costs but ensures optimal execution prices. In most L1/L2 networks, gas fees are negligible, making the benefits of optimal execution prices far outweigh the additional gas costs.

My limit price was hit but order didn't execute? The displayed minimum output includes gas fees and trading costs. If market price only reaches your limit price, the order may not execute due to insufficient output after fees. The order should execute once the market price exceeds your limit price by enough to cover all associated costs.

Order Management

Why can't I find my orders? Access limit orders directly on Shadow at: Shadow Limit Orders

How long do orders last? Orders expire after 90 days. After expiration, orders may never execute. Cancel expired orders to avoid this issue. A customizable expiration date feature is planned for the near future.

Why "never executes" error? Small order amounts can't cover gas fees. Increase your input amount to resolve this. Very small orders (~<1000$) may have execution prices slightly higher than specified to account for fees.

My order is stuck at "pending" status or not showing in the order table? Order history comes from the subgraph and may show slightly delayed information. Delays are typically no longer than a couple of minutes. Check the subgraph indicator at the bottom right corner of the order history table for status.

Trading Rules

Can I use tokens with transfer fees? No. Tokens with transfer fees should not be used with limit orders. Proceed at your own risk if you attempt to use them.

How do I set slippage? Slippage is irrelevant for limit orders. You specify exact input/output amounts and receive no less than your specified output. For example, if you specify 1000 CAKE input for 20 BNB output, you're guaranteed to receive at least 20 BNB when the order executes.

Can I sell below market price? No. For selling below market price, you'll need Stop Limit Orders (coming soon). Regular limit orders cannot execute below the current market price.

What technology powers this? TWAP and Limit orders are powered by Orbs.

Previous
xSHADOW