メインコンテンツまでスキップ

5.8 Proactive Market Making: The DODO Approach

The Reactive AMM Problem

Imagine you're a market maker on a centralized exchange. You have a position: you're long 100 ETH at $2,000 and short 200,000 USDC. Suddenly, Elon tweets something crypto-positive, and on Binance, ETH pumps to $2,100.

What would you do?

Obviously, you'd adjust your quotes:

  • Stop offering ETH at $2,000 (you'd get arbitraged)
  • Start quoting $2,100 for ETH
  • Maybe even buy more ETH before the crowd catches on

This is proactive market making—you adjust prices based on external information, not just internal inventory.

Now consider Uniswap:

Same scenario, ETH pumps on Binance from $2,000 to $2,100. What does Uniswap do?

Nothing.

The Uniswap pool still quotes $2,000 until arbitrageurs drain it. The pool is reactive—it only updates prices after trades force it to rebalance. By the time it reaches $2,100, LPs have sold ETH at $2,000-$2,090 to arbitrageurs who immediately sold at $2,100 on Binance.

The cost: That $100 profit per ETH? Pure loss for LPs. This is the fundamental component of impermanent loss.

DODO asked a provocative question in 2020: What if AMMs could be proactive like centralized exchanges? What if they used external price oracles to update quotes before arbitrageurs arrived?

The result is the Proactive Market Maker (PMM) algorithm—a radical departure from constant product formulas that:

  • Uses Chainlink oracles for pricing
  • Adjusts prices based on external information
  • Enables single-sided liquidity provision
  • Claims to reduce impermanent loss by 50-80%

But there's no free lunch. Oracle dependence introduces:

  • Centralization risk
  • Oracle manipulation vectors
  • Latency issues
  • Higher complexity

This lesson explores DODO's PMM algorithm—its mathematics, mechanics, trade-offs, and place in the AMM design space. Is it the future of market making, or a clever optimization with fatal flaws?

The Reactive vs Proactive Paradigm

How Reactive AMMs Work (Review)

Uniswap constant product (xy = k):

  1. Price determined solely by pool ratio: P = y/x
  2. Trades change ratio, changing price
  3. Arbitrageurs trade when P ≠ P_market
  4. Pool converges to market price via arbitrage
  5. LPs bear the cost of convergence

Timeline of a price movement:

T=0: Binance ETH = $2,000, Uniswap ETH = $2,000 ✓ aligned

T=1s: Binance ETH = $2,100 (news breaks)
Uniswap ETH = $2,000 (no change yet)
✗ Misaligned by 5%

T=3s: Arbitrageur buys Uniswap ETH at $2,000-$2,050
Sells on Binance at $2,100
Profit: ~$50 average
Uniswap now at $2,050

T=5s: More arbitrageurs attack
Uniswap → $2,080

T=10s: Final arbitrageurs finish
Uniswap → $2,095
✓ Nearly aligned

Cost to LPs: Sold ETH at avg $2,047 when market was $2,100
Loss: $53 per ETH × 100 ETH = $5,300

The fundamental issue: AMMs are always behind the market. They're price takers, not price makers.

How Proactive Market Making Works

DODO with Chainlink oracle:

  1. Oracle reports external market price: P_oracle
  2. Pool adjusts internal pricing toward P_oracle
  3. Pool stays ~aligned with market
  4. Arbitrage opportunities minimized
  5. LPs keep more value

Same timeline with DODO:

T=0: Binance ETH = $2,000, Oracle = $2,000, DODO = $2,000 ✓

T=1s: Binance ETH = $2,100
Oracle = $2,000 (updates every 0.5%)
DODO = $2,000

T=3s: Oracle updates = $2,100
DODO adjusts = $2,095 (slightly below oracle)
Arbitrageur window: $5 profit vs $100 in Uniswap

T=5s: DODO = $2,098
Nearly aligned

Cost to LPs: Sold ETH at avg $2,097 vs market $2,100
Loss: $3 per ETH × 100 ETH = $300
Improvement: 94% less loss than Uniswap!

The key difference: DODO tries to front-run arbitrageurs by using external information.

Visualization: Price Paths

Price ($)
2,100 ├─ Market price (Binance)
│ ●━━━━━━━━━━━━━━━━━━━━●

│ DODO
2,095 │ ╱────────────●
│ ╱ (follows oracle)
│ ╱
│ ╱ Uniswap
2,050 │ ╱ ╱─────────────●
│ ╱ ╱
│ ╱ ╱
│╱ ╱
2,000 ●───●────────────────────> Time (seconds)
0 1 3 5 10

Shaded area = arbitrage profit extracted from LPs
DODO has much smaller shaded area

The Proactive Advantage

Quantifying the benefit:

For a 5% price move on a $1M pool:

Uniswap:

Arbitrage extracted: ~$12,500
LP loss: $12,500
Impermanent loss: 0.25% (includes this arbitrage)

DODO (with timely oracle):

Arbitrage extracted: ~$1,000 (92% reduction)
LP loss: $1,000
"Impermanent loss": 0.02% (much lower)

Over time: DODO LPs can outperform significantly, especially in volatile markets with frequent price movements.

The Critical Assumption

DODO's advantage depends on:

  1. Oracle speed: Oracle must update faster than arbitrageurs react
  2. Oracle accuracy: Oracle must reflect true market price
  3. Oracle reliability: Oracle must not fail or be manipulated
  4. Pool parameters: Must be tuned correctly for asset

If any of these fails, the advantage disappears—or worse, becomes a liability.

Oracle-Based Pricing: The Foundation

Why Oracles?

The problem with pure on-chain pricing:

  • Only knows about on-chain trades
  • Blind to Binance, Coinbase, OKX (99% of volume)
  • Always lagging true market price

The solution: Price oracles

  • Aggregate off-chain prices
  • Push to blockchain
  • AMM uses as reference price

Available oracle solutions:

Chainlink:

  • Most popular
  • Aggregates data from multiple exchanges
  • Updates every 0.5% deviation or 1 hour
  • Used by DODO, other protocols

Band Protocol:

  • Similar to Chainlink
  • More customizable
  • Lower latency options

Uniswap V3 TWAP:

  • On-chain, manipulation-resistant
  • But lags by design (time-weighted)
  • Good for some use cases

API3:

  • First-party oracles
  • Direct from exchanges
  • Lower latency potential

How it works:

1. Multiple nodes fetch ETH price from:
- Binance
- Coinbase
- Kraken
- Huobi
- Others (7-21 data sources)

2. Nodes submit prices on-chain

3. Aggregation contract computes median

4. Update triggers if:
- Deviation > 0.5% (for ETH/USD)
- OR time > 1 hour (heartbeat)

5. New price available on-chain

Typical latency:

  • Price moves on CEX: 0s
  • Nodes detect: 1-10s
  • On-chain update: 5-30s
  • Total lag: 6-40s

Accuracy:

  • Usually within 0.1% of spot
  • Occasionally lags by 0.5-1% during volatility
  • Very rarely fails (99.9%+ uptime)

DODO's Oracle Integration

Price feed usage:

interface IChainlinkOracle {
function latestAnswer() external view returns (int256);
}

contract DODOPool {
IChainlinkOracle public oracle;

function getMidPrice() public view returns (uint256) {
int256 oraclePrice = oracle.latestAnswer();
require(oraclePrice > 0, "Invalid oracle price");
return uint256(oraclePrice);
}
}

Key parameters:

  1. P_oracle: External market price from oracle
  2. k: Slippage parameter (0 ≤ k ≤ 1)
  • k=0: Fixed price (infinite liquidity)
  • k=1: Like constant product
  • Typically k=0.1-0.5
  1. i: Initial price/oracle price ratio
  • Usually i=1 (match oracle)
  • Can differ for custom strategies
  1. B, Q: Base token (ETH) and quote token (USDC) quantities

Oracle Update Mechanism

DODO adjusts prices gradually:

If pool_price < oracle_price - threshold:
Increase pool price toward oracle

If pool_price > oracle_price + threshold:
Decrease pool price toward oracle

If |pool_price - oracle_price| < threshold:
Maintain current price

The threshold is crucial:

  • Too small: Constant adjustments, high gas
  • Too large: Misalignment, arbitrage opportunities
  • Typical: 0.1-0.5% for liquid assets

Oracle Failure Modes

What happens if oracle fails?

1. Oracle stops updating:

T=0: Oracle = $2,000, working fine
T=1hr: Market = $2,200, Oracle stuck at $2,000
Result: DODO quotes $2,000, massive arbitrage opportunity
LPs lose severely

2. Oracle manipulation:

Attacker manipulates data sources
Oracle reports false price
DODO adjusts to false price
Attacker arbitrages against mispriced pool

3. Oracle front-running:

Oracle update pending in mempool
Bot sees update: $2,000 → $2,100
Bot frontruns: trades at $2,000 before update
Still captures arbitrage, just smaller

DODO's mitigations:

  1. Multiple oracle sources: Use Chainlink + Band as backup
  2. Price bounds: Reject prices deviating >10% from recent
  3. Emergency pause: Admin can pause pool if oracle suspected broken
  4. Gradual adjustment: Don't jump to oracle price instantly

But these add centralization and complexity.

The PMM Algorithm: Mathematical Deep Dive

The Core PMM Formula

DODO's pricing formula combines elements of constant product and constant sum:

Price function:

When B > B₀ (base token excess):
P = i × (1 - k + k(B₀/B)²)

When B < B₀ (base token deficit):
P = i / (1 - k + k(B/B₀)²)

Where:
- P = marginal price
- i = oracle price (or initial price)
- k = slippage parameter
- B = current base token amount
- B₀ = equilibrium base token amount

For B = B₀ (at equilibrium):

P = i × (1 - k + k × 1) = i

Price equals oracle price—pool is balanced.

Deriving the Formula

Design goals:

  1. When balanced (B = B₀): Price = i (oracle price)
  2. When imbalanced: Price adjusts to restore balance
  3. Slippage controlled by k parameter
  4. Smooth, differentiable function

Starting point: Modify constant product with price target

Assume we want:

Price_effect(B) = f(B/B₀)

Where f(1) = 1 (balanced gives oracle price).

DODO chose:

f(r) = 1 - k + kr²   for r = B₀/B (excess base)
f(r) = 1 / (1 - k + kr²) for r = B/B₀ (deficit base)

Why this functional form?

When k=0:

f(r) = 1 (always)
P = i (constant, no slippage)

When k=1:

f(r) = r² (for excess)
P = i × r²

This gives behavior closer to constant product.

The quadratic term creates smooth slippage that:

  • Is gentle near equilibrium
  • Increases rapidly far from equilibrium
  • Prevents complete depletion

Numerical Example

Pool setup:

  • Oracle price: i = $2,000 per ETH
  • Equilibrium: B₀ = 100 ETH, Q₀ = 200,000 USDC
  • Slippage parameter: k = 0.5
  • Current state: B = 100 ETH (balanced)

Scenario 1: Someone buys 10 ETH

After trade: B = 90 ETH (deficit)

New price:

r = B/B₀ = 90/100 = 0.9
P = i / (1 - k + kr²)
= 2000 / (1 - 0.5 + 0.5 × 0.81)
= 2000 / (0.5 + 0.405)
= 2000 / 0.905
= $2,209 per ETH

The pool now prices ETH at $2,209 (10.5% premium) to discourage further buying.

Compare to constant product:

Uniswap with same initial state:

After buying 10 ETH:
New price ≈ $2,222

DODO is slightly gentler (k=0.5 vs k=1 in Uniswap-equivalent).

Scenario 2: Someone sells 10 ETH

After trade: B = 110 ETH (excess)

New price:

r = B₀/B = 100/110 = 0.909
P = i × (1 - k + kr²)
= 2000 × (1 - 0.5 + 0.5 × 0.826)
= 2000 × (0.5 + 0.413)
= 2000 × 0.913
= $1,826 per ETH

Pool now prices ETH at $1,826 (8.7% discount) to discourage further selling.

The k Parameter: Deep Dive

k controls the price curve's flatness:

Price deviation from oracle

+20%│ k=1.0
│ ╱
+15%│ ╱
│ ╱
+10%│ ╱ k=0.5
│ ╱ ╱
+5%│ ╱ ╱
│ ╱ ╱ k=0.1
0%├───●───●──●────────
│ ╱ ╱ ╱
-5%│ ╱ ╱ ╱
│╱ ╱ ╱
-10%│ ╱ ╱
│ ╱ ╱
-15%│ ╱ ╱
│╱ ╱
-20%│ ╱
└────────────────────> Imbalance (B/B₀)
0.7 0.9 1.0 1.1 1.3

Interpreting k values:

k = 0 (flat pricing):

Pros:
- Zero slippage
- Perfect capital efficiency
- Best trader experience

Cons:
- Requires infinite backing capital
- Pool can be drained completely
- Only works with perfect oracle

k = 0.1 (very flat):

Pros:
- Very low slippage
- High capital efficiency
- Good for stable pairs (stETH/ETH)

Cons:
- Vulnerable to oracle lag
- Requires high confidence in peg

k = 0.5 (moderate):

Pros:
- Balanced slippage vs protection
- Works for most assets
- Reasonable capital efficiency

Cons:
- Still vulnerable to oracle issues
- Moderate slippage on large trades

k = 1.0 (constant product-like):

Pros:
- Similar to Uniswap behavior
- Good protection against depletion
- Oracle less critical

Cons:
- Why use DODO then?
- High slippage
- Low capital efficiency

Slippage Calculation

For a trade of size ΔB:

Step 1: Calculate price impact

Average price paid:

P_avg = (1/ΔB) ∫[B to B-ΔB] P(B') dB'

This requires integrating the PMM formula.

For small trades (approximation):

P_avg ≈ P_mid + k × P_mid × (ΔB/B₀)²

Step 2: Calculate slippage

Slippage = (P_avg - P_oracle) / P_oracle
≈ k × (ΔB/B₀)²

Example:

  • Trade: 5 ETH (5% of B₀ = 100)
  • k = 0.5
  • Oracle price: $2,000
Slippage ≈ 0.5 × (0.05)² = 0.5 × 0.0025 = 0.125%

Average price ≈ $2,000 × 1.00125 = $2,002.50

Compare to Uniswap:

  • Uniswap slippage on 5% trade: ~0.25%
  • DODO: 0.125%
  • DODO is 2x better

But this assumes oracle is accurate and timely!

Comparing PMM to Other Curves

Visual comparison at equilibrium:

Quote tokens out

│ Constant Sum (x+y=k)
│ ╱
100%│ ╱
│╱────── DODO k=0.1
│────────── DODO k=0.5
│───────────── Constant Product (xy=k)



└──────────────────> Base tokens in
0% 50% 100%

Near equilibrium: DODO behaves like constant sum (flat)

Far from equilibrium: DODO behaves like constant product (curved)

The interpolation is controlled by k, similar to Curve's amplification coefficient A (Lesson 5.6), but with different mechanics.

The Invariant

Does DODO have a conservation function?

Not exactly like xy = k. Instead, DODO maintains:

Value = Q + B × i

Where value is denominated in quote tokens.

But this only holds at equilibrium (B = B₀). During imbalance, the formula allows value to deviate slightly, which is recovered via fees and price adjustments.

This is fundamentally different from traditional AMMs:

  • Uniswap: xy = k (always)
  • Curve: Complex formula (always)
  • DODO: Target value, but can deviate

This flexibility enables single-sided liquidity provision.

Single-Sided Liquidity Provision

The Traditional AMM Limitation

Uniswap V2 requires both tokens:

To provide $10,000 liquidity at price $2,000:

Required:
- 2.5 ETH ($5,000)
- 5,000 USDC

Total: $10,000, split 50/50

Why? Because the constant product formula requires both assets:

x × y = k
Δk requires Δx AND Δy in proportion

The problems:

  1. Exposure to both assets: Even if you're bullish on ETH, you must hold USDC
  2. Impermanent loss: Forced rebalancing between assets
  3. Capital inefficiency: Only have ETH? Must swap half to USDC first (slippage + fees)

DODO's Single-Sided Innovation

DODO allows single-sided deposits:

Option 1: Deposit only ETH
Option 2: Deposit only USDC
Option 3: Deposit both (traditional)

How it works:

Base pool (ETH):

  • LPs deposit only ETH
  • Earns fees on buys (users buying ETH)
  • Represented as shares of base pool

Quote pool (USDC):

  • LPs deposit only USDC
  • Earns fees on sells (users selling ETH for USDC)
  • Represented as shares of quote pool

The pools are separate but coupled via PMM formula.

Mathematical Mechanics

Base pool value:

B_total = Σ B_i (all base LPs' deposits)
B₀ = target equilibrium amount

When someone buys ETH:
- Takes from B_total
- Pays USDC to quote pool
- Base pool LPs earn fees

Quote pool value:

Q_total = Σ Q_i (all quote LPs' deposits)
Q₀ = target equilibrium amount

When someone sells ETH:
- Takes from Q_total
- Pays ETH to base pool
- Quote pool LPs earn fees

Coupling via price:

The PMM formula uses B and Q to determine price, but they can be imbalanced:

If B_total > B₀ (excess ETH):
Pool wants to sell ETH
Price slightly below oracle
Encourages buying

If Q_total > Q₀ (excess USDC):
Pool wants to buy ETH
Price slightly above oracle
Encourages selling

Example: Single-Sided LP Journey

Alice (ETH bull):

Day 0: Alice has 10 ETH, wants to LP
Traditional AMM: Must sell 5 ETH for USDC, then provide both
DODO: Deposits 10 ETH directly to base pool

Pool state:
- Base pool: 100 ETH → 110 ETH
- Quote pool: 200,000 USDC (unchanged)
- Alice's share: 10/110 = 9.09%

Day 1-30: Trading happens

Total trades:
- Buys: 20 ETH purchased (base pool earns fees)
- Sells: 15 ETH sold (quote pool earns fees)

Fees generated:
- Base pool: $40,000 × 0.3% = $120 in USDC
- Quote pool: $30,000 × 0.3% = $90 in ETH

Alice's earnings (9.09% of base pool fees):
- $120 × 9.09% = $10.91 in USDC

Day 30: Alice withdraws

ETH price: $2,000 → $2,400 (+20%)

Pool rebalanced via trades:
- Base pool: 110 ETH → 95 ETH (sold 15 net)
- Quote pool: 200k USDC → 230k USDC (bought 15 ETH net)

Alice withdraws:
- Share: 9.09% of 95 ETH = 8.64 ETH
- Fees: $10.91 USDC

Value:
- 8.64 ETH × $2,400 = $20,736
- Plus fees: $10.91
- Total: $20,746.91

Compare to holding:
- 10 ETH × $2,400 = $24,000
- Loss: $3,253.09

Compare to Uniswap V2:
- Would have lost similar amount via IL
- But also earned more fees (both directions)

Key insight: Alice still suffers "impermanent loss" from rebalancing, but only on her asset (ETH). She wasn't forced to hold USDC initially.

Benefits and Drawbacks

Benefits:

  1. Directional exposure: Bulls can LP only in their preferred asset
  2. No swap needed: Deposit directly without selling
  3. Simpler tax treatment: Only one asset (in some jurisdictions)
  4. Flexibility: Can provide liquidity with what you have

Drawbacks:

  1. Asymmetric IL:
  • Base pool LPs lose if base token appreciates (pool sells it)
  • Quote pool LPs lose if base token depreciates (pool buys it)
  1. Asymmetric fees:
  • Base pool only earns on one trade direction
  • May earn less than traditional two-sided LP
  1. Pool imbalance risk:
  • If only base LPs join, no quote liquidity
  • Pool becomes dysfunctional
  • Requires coordination/incentives
  1. Complexity:
  • Harder to analyze returns
  • Need to track both pools separately

Single-Sided IL Example

Scenario: ETH $2,000 → $3,000 (+50%)

Traditional Uniswap LP (two-sided):

Initial: 5 ETH + $10,000 USDC
Final: 4.08 ETH + $12,247 USDC
Value: $24,493
Holding value: 5 ETH × $3,000 = $15,000 ETH + $10,000 = $25,000
IL: -2.02%

DODO Base Pool LP (ETH only):

Initial: 10 ETH
Pool rebalances, sells ETH as price rises
Final: ~8.16 ETH (sold more, oracle-guided)
Value: 8.16 × $3,000 = $24,480
Holding value: 10 ETH × $3,000 = $30,000
IL: -18.4%

Wait, that's worse!

Yes, single-sided base pool LPs can suffer MORE IL than two-sided when their asset appreciates. Why?

The asymmetry:

  • Two-sided LP: Rebalances between both assets (sells some ETH, keeps some)
  • Single-sided base LP: Only holds ETH, all rebalancing is selling ETH

When single-sided is better:

For quote pool (USDC) LPs when ETH appreciates:

Initial: $20,000 USDC
Pool rebalances, buys ETH as price rises
Final: ~$24,000 in value (bought ETH low)
Better than holding USDC!

The lesson: Choose your pool based on market view:

  • Bullish on ETH? → Quote pool (USDC) is better
  • Bearish on ETH? → Base pool (ETH) is better
  • Counter-intuitive but mathematically sound!

Crowdpooling: DODO's IDO Mechanism

Extension of single-sided liquidity:

DODO's "Crowdpooling" uses PMM for token launches:

Phase 1: Capital raising
- Project deposits new tokens (base pool)
- Users deposit USDC (quote pool)
- No trading yet

Phase 2: Price discovery
- Pool opens for trading
- PMM manages initial liquidity
- Gradual price discovery

Phase 3: Liquidity provision
- Both pools active
- Normal PMM operation

Benefits:

  • Fair price discovery
  • Lower initial capital needed
  • Gradual transition to open market

Used by: Dozens of projects in 2021-2022 for token launches

Comparing DODO with Traditional AMMs

Capital Efficiency

Scenario: Provide liquidity for 1% slippage on $100k trade

Uniswap V2:

Need: 10% trade = 1% slippage (approximately)
Required liquidity: $1M
Capital efficiency: 10%

Curve (A=2000, stablecoins):

With high A, very efficient
Required liquidity: $120k
Capital efficiency: 83%

DODO (k=0.5, accurate oracle):

PMM with oracle price anchor
Required liquidity: $250k
Capital efficiency: 40%

DODO (k=0.1, accurate oracle):

Very flat curve
Required liquidity: $150k
Capital efficiency: 67%

Ranking:

  1. Curve (stables only): 83%
  2. DODO k=0.1: 67%
  3. DODO k=0.5: 40%
  4. Uniswap V2: 10%

But: DODO works for any asset, Curve only for correlated pairs.

Impermanent Loss Comparison

Test case: ETH $2,000 → $2,400 (+20%) → $2,000 (returns)

Uniswap V2:

At peak: -1% IL
Back to start: 0% IL (price returned)
Round-trip IL: 0%

DODO (k=0.5, perfect oracle):

At peak: -0.3% IL (less rebalancing)
Back to start: -0.4% IL (oracle lag caused trades)
Round-trip IL: -0.4%

Wait, DODO has HIGHER round-trip IL? How?

The issue: Oracle lag

T=0: Price $2,000
T=1: Market → $2,400, oracle still $2,000
Arbitrageurs buy from DODO at $2,000-$2,380
T=2: Oracle updates to $2,400
Pool now depleted and high-priced
T=3: Market → $2,000, oracle still $2,400
Arbitrageurs sell to DODO at $2,020-$2,400
T=4: Oracle updates to $2,000
Pool now excess and low-priced

Oracle lag causes DODO to trade at worse prices than Uniswap might!

With perfect oracle (no lag):

At peak: -0.3% IL
Back to start: 0% IL
Round-trip IL: 0%

Perfect oracle eliminates round-trip IL!

Real-World Performance (2021 data)

ETH/USDC pools comparison:

Metric                  Uniswap V2    DODO        Winner
──────────────────────────────────────────────────────────
TVL $400M $50M Uniswap
Daily Volume $200M $15M Uniswap
Volume/TVL ratio 50% 30% Uniswap
LP APY (estimate) 25% 18% Uniswap
IL (1 month) -2.1% -1.8% DODO (slight)
Slippage (1% trade) 0.25% 0.18% DODO
Oracle dependency None High Uniswap
──────────────────────────────────────────────────────────

Observations:

  1. Lower volume on DODO: Network effects favor Uniswap
  2. Better slippage on DODO: When it has liquidity, more efficient
  3. Slightly lower IL on DODO: Oracle helps somewhat
  4. But lower overall returns: Less volume = fewer fees

Use Case Fit

When to use each AMM:

Uniswap V2:

Assets: Any pair
Liquidity: High (network effects)
Trust: Fully decentralized
Best for: Standard trading, proven reliability

Uniswap V3:

Assets: Any pair
Liquidity: Concentrated, very efficient
Trust: Fully decentralized
Best for: Active LPs, professional market makers

Curve:

Assets: Correlated/pegged pairs
Liquidity: Deep for stables
Trust: Decentralized (some governance risk)
Best for: Stablecoin swaps, wrapped assets

DODO:

Assets: Any pair (with oracle)
Liquidity: Moderate
Trust: Oracle-dependent (centralization)
Best for: Low liquidity pairs, directional LPs, new tokens

Technical Comparison Matrix

FeatureUniswap V2CurveUniswap V3DODO
Formulaxy=kHybridConcentrated xy=kPMM
Oracle neededNoNoNoYes
Price sourcePool ratioPool ratioPool ratioExternal
Capital efficiency1x100x (stables)5-200x3-10x
IL riskMediumLow (pegs)High (narrow)Medium
DecentralizationFullFullFullOracle-dependent
ComplexityLowMediumHighHigh
Single-sided LPNoNoNoYes
Best use caseGeneralStablesActive LPDirectional LP

Limitations and Risks

Oracle Dependency

Critical vulnerability:

DODO's entire value proposition relies on oracle accuracy and timeliness.

Attack scenario 1: Oracle manipulation

1. Attacker manipulates Chainlink data sources
- Flash crashes on multiple exchanges
- Or flash pumps

2. Oracle updates to manipulated price
- DODO adjusts: $2,000 → $1,500

3. Attacker buys DODO ETH at $1,500

4. Price recovers to $2,000

5. Attacker sells at profit

Cost to LPs: $500 per ETH

Real risk? Chainlink is quite robust, but:

  • Smaller assets have less secure oracles
  • Flash crashes have occurred (May 2021 on some CEXes)
  • Cross-chain oracles are more vulnerable

Attack scenario 2: Oracle front-running

1. Oracle update pending: $2,000 → $2,100
Transaction visible in mempool

2. MEV bot sees pending update

3. Bot frontruns: buys at $2,000 before update

4. Oracle updates, pool price now $2,100

5. Bot sells at $2,100

Profit: $100 per ETH (same as classic arbitrage)

This negates DODO's advantage! If updates are frontrunnable, LPs still lose.

Mitigation: Private transaction submission (Flashbots), but not foolproof.

Centralization Concerns

DODO's centralization points:

  1. Oracle selection: Admin controls which oracle to use
  2. Parameter updates: k, i can be changed by admin
  3. Emergency pause: Admin can freeze pools
  4. Upgrade rights: Some contracts upgradeable

DAO governance: DODO token holders vote, but:

  • Low participation typical
  • Whale voters can manipulate
  • Slower than centralized for emergencies

Compare to Uniswap:

  • V2: No admin, no upgrades, no pause
  • V3: No admin for pools, protocol fee switch not active
  • Fully immutable, fully decentralized

Trade-off: Security vs flexibility

Oracle Lag Problem

Even perfect oracles have lag:

Block N:
CEX price: $2,000
Oracle: $2,000
DODO: $2,000

Block N+1:
CEX price: $2,100 (news breaks)
Oracle: $2,000 (not updated yet)
DODO: $2,000 (following oracle)
Arbitrage window: $100

Block N+2:
CEX price: $2,100
Oracle: $2,000 (still pending)
DODO: $2,000
Arbitrage continues

Block N+3:
CEX price: $2,100
Oracle: $2,100 (update arrives)
DODO: $2,095 (adjusts with k parameter)
Arbitrage window: $5

Total arbitrage: ~$50 per ETH on average
Better than Uniswap's $100, but not zero

The fundamental limit: Oracle cannot be faster than market price changes.

During extreme volatility:

  • March 2020 crash: Prices moving 10% per minute
  • Oracle updates: Every 0.5% or 1 hour
  • Lag could be massive
  • DODO advantage minimal or negative

Liquidity Fragmentation

The cold start problem:

New DODO pool: ALT/USDC
Initial liquidity: $10k

Uniswap ALT/USDC: $500k liquidity

Where do traders go? Uniswap (deeper liquidity)

Where do LPs go? Uniswap (more volume = more fees)

Result: DODO pool stays small, can't compete

Network effects favor incumbents:

Even if DODO is theoretically better, Uniswap's liquidity attracts more liquidity.

DODO's attempted solution:

  • Mining rewards (DODO token incentives)
  • Crowdpooling (bootstrap new tokens)
  • Private pools (customized for projects)

Results: Some success for new/small cap tokens, but struggled to compete with Uniswap for established pairs.

Smart Contract Risk

Complexity = risk:

Uniswap V2: ~300 lines of core logic
DODO V2: ~2,000 lines of core logic

More code = more attack surface

Historical exploits:

May 2021: DODO Pool Exploit

Attack: Manipulated init() function
Amount: $3.8M stolen
Cause: Reentrancy in init allowed fake tokens
Lesson: Complexity creates vulnerabilities

Audits help but aren't perfect:

  • DODO audited by PeckShield, CertiK
  • Exploit still occurred
  • More complex code harder to audit

The Economic Sustainability Question

DODO's challenges:

  1. Lower volume than competitors: Network effects matter
  2. Higher complexity: Users prefer simple
  3. Oracle costs: Gas to update oracle
  4. Incentive costs: Token rewards to bootstrap liquidity

Financial performance (2024):

Protocol revenue: ~$5M/year
Token emissions: ~$20M/year (incentives)
Net: -$15M/year (unsustainable)

Compare to Uniswap:

Protocol revenue: $0 (off, but could be ~$300M/year)
Token emissions: $0
Net: Sustainable without token subsidies

The question: Can DODO achieve self-sustaining volume without perpetual token incentives?

Advanced Topics

Multi-Chain Deployment

DODO on multiple chains:

Ethereum: $50M TVL, high gas, established
BSC: $100M TVL, low gas, active
Polygon: $30M TVL, low gas, growing
Arbitrum: $20M TVL, low gas, newer
Others: Various smaller deployments

Cross-chain challenges:

  1. Oracle consistency: Same oracle across chains?
  2. Liquidity fragmentation: Same token, multiple pools
  3. Arbitrage opportunities: Cross-chain price differences
  4. Bridge risk: Moving assets between chains

DODO's approach:

  • Independent pools per chain
  • Rely on cross-chain arbitrage to align prices
  • Some cross-chain liquidity initiatives (limited success)

DODO Private Pools

Customizable pools for projects:

Project creates private pool:
- Custom fee tier (0.1%, 0.3%, 1%)
- Custom k parameter (0.1-1.0)
- Custom oracle (or fixed price)
- Custom access controls (whitelist)

Use cases:

  1. OTC trades: Large trades with custom parameters
  2. Token launches: Controlled initial distribution
  3. Market making: Professional MM with own strategies
  4. Treasury management: Protocol-owned liquidity

Example:

DeFi protocol launches token:
- Creates private pool with fixed price
- Gradual public access (whitelist expands)
- Controls initial price discovery
- Transitions to public pool

Adoption: Moderate, several dozen projects used, but not widespread.

vDODO: Membership and Fee Sharing

DODO's incentive mechanism:

Hold DODO tokens → Stake for vDODO → Earn fee share

Benefits:
- Share of trading fees (0.15% of all trades)
- Reduced trading fees for holders
- Governance rights

Economics:

If 10% of DODO staked:
vDODO holders earn: 10% of 0.15% fees = 0.015% of volume
Annual volume: $5B
Annual fees to vDODO: $750k
Staked value: $5M (at $0.05/DODO, 100M staked)
APY: 15%

Problem: Requires significant volume to make vDODO attractive.

DODO X: Aggregation and Routing

DODO expanded beyond just PMM:

DODO X aggregates:
- DODO pools
- Uniswap V2/V3
- Curve
- Other AMMs

Smart routing finds best price across all sources

This makes DODO:

  • A competitor to 1inch, Paraswap
  • Not just an AMM, but an aggregator
  • Potentially more valuable than just PMM pools

Market share (2024):

  • As aggregator: ~3-5% of DEX aggregation volume
  • As AMM: ~1-2% of direct AMM volume

Lessons and Takeaways

What DODO Got Right

1. Oracle integration can help

  • Reducing IL by 20-40% is real (when oracle is timely)
  • Especially valuable for low liquidity assets
  • Proof of concept for proactive pricing

2. Single-sided liquidity is valuable

  • Directional LPs appreciate it
  • Simpler onboarding (don't need both tokens)
  • Useful for new token launches

3. Flexibility in design

  • Custom k parameters for different assets
  • Private pools for special use cases
  • Not one-size-fits-all like early AMMs

4. Aggregation strategy

  • Pivoting to aggregation (DODO X) was smart
  • Captures value even if pools don't dominate
  • Hedge against AMM competition

What DODO Got Wrong

1. Oracle dependency too strong

  • Single point of failure
  • Centralization concerns
  • Lag still allows arbitrage

2. Couldn't overcome network effects

  • Uniswap's liquidity too strong
  • Hard to bootstrap competing pools
  • Fragmentation hurts

3. Complexity hurts adoption

  • Users prefer simple
  • Developers prefer battle-tested
  • PMM algorithm not intuitive

4. Economic model challenges

  • Unsustainable token emissions
  • Lower volume = lower fees = lower LP returns
  • Vicious cycle vs Uniswap's virtuous cycle

The Future of Proactive Market Making

Will oracle-based AMMs succeed?

Optimistic view:

  • Oracle tech improving (faster, more reliable)
  • More assets need custom AMMs
  • Multi-chain future needs oracle bridges anyway
  • Proactive pricing is theoretically superior

Pessimistic view:

  • Decentralization >> efficiency for crypto ethos
  • Network effects are insurmountable
  • Oracle risk not worth modest IL reduction
  • Complexity kills adoption

Most likely outcome:

  • Niche success for specific use cases:
    • New token launches (crowdpooling)
    • Low liquidity assets (emerging markets)
    • Private/institutional pools (custom terms)
  • Not a Uniswap killer
  • Part of diverse AMM ecosystem

Design Principles for Future AMMs

Lessons from DODO experience:

1. Decentralization matters

  • Users will accept lower efficiency for trustlessness
  • Minimize admin keys and centralization
  • If using oracles, use multiple sources + fallbacks

2. Start with liquidity

  • Solve cold start problem before launching
  • Incentives must be sustainable long-term
  • Consider protocol-owned liquidity

3. Keep it simple

  • Complex ≠ better
  • Users want intuitive UX
  • Developers want auditable code

4. Optimize for specific use case

  • Don't try to be everything
  • Curve for stables, V3 for concentrated, etc.
  • Find your niche

5. Consider composability

  • How does your design integrate with DeFi?
  • Are positions fungible? (easier to build on)
  • Can others build on top?

Practical Implementation

Building a Basic PMM

Simplified PMM contract:

contract SimplePMM {
IERC20 public baseToken; // ETH
IERC20 public quoteToken; // USDC
IOracle public oracle;

uint256 public baseReserve;
uint256 public quoteReserve;
uint256 public baseTarget; // B₀
uint256 public quoteTarget; // Q₀
uint256 public k; // Slippage parameter (scaled by 1e18)

// Calculate price using PMM formula
function getPrice() public view returns (uint256) {
uint256 oraclePrice = oracle.getPrice();

if (baseReserve > baseTarget) {
// Excess base, discount price
uint256 ratio = baseTarget * 1e18 / baseReserve;
uint256 ratio2 = ratio * ratio / 1e18;
uint256 adjustment = 1e18 - k + k * ratio2 / 1e18;
return oraclePrice * adjustment / 1e18;
} else {
// Deficit base, premium price
uint256 ratio = baseReserve * 1e18 / baseTarget;
uint256 ratio2 = ratio * ratio / 1e18;
uint256 adjustment = 1e18 - k + k * ratio2 / 1e18;
return oraclePrice * 1e18 / adjustment;
}
}

// Swap quote tokens for base tokens
function swapQuoteForBase(uint256 quoteAmount) external {
uint256 price = getPrice();
uint256 baseAmount = quoteAmount * 1e18 / price;

require(baseAmount <= baseReserve, "Insufficient base");

quoteToken.transferFrom(msg.sender, address(this), quoteAmount);
baseToken.transfer(msg.sender, baseAmount);

baseReserve -= baseAmount;
quoteReserve += quoteAmount;
}

// Additional functions for reverse swap, LP operations, etc.
}

Note: This is simplified. Production requires:

  • Fee calculations
  • Slippage protection
  • Oracle failure handling
  • LP share tracking
  • Reentrancy guards
  • More...

Choosing Parameters

For a new DODO pool:

Step 1: Oracle selection

High liquidity asset (ETH, BTC): Chainlink (reliable)
Medium liquidity: Chainlink + backup
Low liquidity: Consider if oracle reliable enough

Step 2: k parameter

Stable pair (stETH/ETH): k = 0.1-0.2
Correlated pair (ETH/WBTC): k = 0.3-0.5
Volatile pair (ETH/ALT): k = 0.5-0.8
Unknown/risky: k = 0.8-1.0 (safer)

Step 3: Initial targets

B₀ = Expected base token equilibrium
Q₀ = Expected quote token equilibrium

Should balance at expected trading volume:
- High volume: Larger targets (more depth)
- Low volume: Smaller targets (efficient capital)

Step 4: Fee tier

Competing with Uniswap: 0.3%
Stable pairs: 0.04-0.1%
Low liquidity: 0.5-1.0%

Monitoring and Management

Key metrics to track:

# Pool health metrics
def monitor_pool():
oracle_price = get_oracle_price()
pool_price = get_pool_price()

# Alert if divergence too large
divergence = abs(pool_price - oracle_price) / oracle_price
if divergence > 0.05: # 5%
alert("Price divergence detected")

# Check oracle freshness
last_update = oracle.last_update_time()
if time.now() - last_update > 3600: # 1 hour
alert("Oracle stale")

# Monitor utilization
utilization = (base_target - base_reserve) / base_target
if utilization > 0.8: # 80%
alert("Pool depleting, need more liquidity")

Rebalancing strategies:

# Adjust targets based on trading patterns
def rebalance_targets():
# If consistently imbalanced, adjust targets
avg_base = moving_average(base_reserve, 7 days)

if avg_base > base_target * 1.2:
# Consistently excess base
# Consider increasing base_target
new_target = avg_base

elif avg_base < base_target * 0.8:
# Consistently deficit base
# Consider decreasing base_target
new_target = avg_base

Conclusion: The Oracle-Dependent Future?

DODO represents a bold experiment: can AMMs be improved by incorporating external information? The answer is nuanced.

The core innovation—proactive market making—is sound:

  • Theoretically reduces arbitrage losses
  • Enables more capital-efficient liquidity
  • Allows single-sided provision
  • Flexible design for various use cases

But the execution reveals challenges:

  • Oracle dependency creates centralization
  • Network effects favor established AMMs
  • Oracle lag limits IL reduction
  • Complexity hurts adoption
  • Economic sustainability unclear

DODO's lasting contributions:

  1. Proof that oracles can help: IL reduction of 20-40% is meaningful
  2. Single-sided LP model: Valuable for directional providers
  3. Crowdpooling: Useful token launch mechanism
  4. Design space exploration: Showed alternatives to constant product

DODO's limitations:

  1. Can't overcome Uniswap's network effects: Liquidity begets liquidity
  2. Oracle centralization: Conflicts with crypto ethos
  3. Economic model: Requires perpetual subsidies
  4. Niche adoption: Only specific use cases benefit

The verdict:

DODO will likely remain a specialized tool rather than mainstream AMM:

  • Useful for new tokens (crowdpooling)
  • Valuable for directional LPs (single-sided)
  • Competitive for low-liquidity pairs (capital efficiency)
  • But not a Uniswap or Curve replacement

For the broader AMM design space:

DODO demonstrates that hybrid approaches combining on-chain and off-chain information can work. Future AMMs might:

  • Use oracles more carefully (failsafes, decentralization)
  • Combine reactive and proactive mechanisms
  • Optimize for specific niches
  • Maintain decentralization as priority

The fundamental trade-off remains:

Decentralization ←→ Efficiency
Trustlessness ←→ Optimization
Simplicity ←→ Sophistication

DODO chose efficiency over decentralization. The market has spoken: for now, users prefer the trustlessness of fully on-chain AMMs like Uniswap and Curve.

But as oracle technology improves, proactive market making might see a renaissance. The question is whether it can maintain decentralization while achieving its efficiency gains.


Prerequisites: Lessons 5.1-5.8, understanding of MEV basics, familiarity with DeFi security

Key formulas recap:

PMM price (base excess): P = i × (1 - k + k(B₀/B)²)

PMM price (base deficit): P = i / (1 - k + k(B/B₀)²)

Slippage approximation: S ≈ k × (ΔB/B₀)²

Oracle vs pool price divergence: Δ = |P_oracle - P_pool| / P_oracle

IL reduction: DODO IL ≈ 0.6 × Uniswap IL (with perfect oracle)

Practice problems:

  1. A DODO pool has i=$2,000, k=0.5, B₀=100 ETH, current B=90 ETH. Calculate the pool's marginal price.

  2. Compare slippage for a 10 ETH trade on: (a) Uniswap V2 with $200k liquidity, (b) DODO k=0.5 with same oracle price and B₀=100 ETH.

  3. Oracle updates from $2,000 to $2,100 with 30-second lag. Calculate maximum arbitrage profit on a DODO pool with 100 ETH, k=0.3.

  4. Analyze whether a base pool LP or quote pool LP makes more sense if you expect ETH to appreciate 50% over 6 months. Show calculations.

  5. Design a PMM pool for a new token launch: choose k, initial targets B₀/Q₀, and justify your choices. Consider the token has no price history and initial circulating supply of 10M tokens.

DODO showed that AMM innovation continues. While it didn't dethrone established players, it expanded our understanding of what's possible—and what trade-offs matter most to users. The journey of AMM design continues.