Skip to content

[Contract] Fix ZapPlotLinkV2: HUNT routing via MCV2 bonding curve, not Uniswap #442

@realproject7

Description

@realproject7

Summary

ZapPlotLinkV2 currently routes ALL non-PLOT tokens through Uniswap V4. This is wrong for HUNT — since PLOT is an MCV2 token backed by HUNT, HUNT should route through the MCV2 bonding curve (HUNT→PLOT), not Uniswap.

This matches MintPad's original ZapUniV4MCV2 pattern where the reserve token (HUNT) skips Uniswap entirely.

Current (broken)

ETH  → Uniswap V4 → PLOT → MCV2_Bond → storyline token  (needs PLOT/WETH pool)
USDC → Uniswap V4 → PLOT → MCV2_Bond → storyline token  (needs PLOT/USDC pool)
HUNT → Uniswap V4 → PLOT → MCV2_Bond → storyline token  (needs PLOT/HUNT pool) ← WRONG

All 3 pools required. HUNT routing through Uniswap is unnecessary since PLOT is already backed by HUNT on MCV2.

Correct routing

ETH  → Uniswap V4 (WETH/PLOT pool) → PLOT → MCV2_Bond → storyline token
USDC → Uniswap V4 (route via WETH)  → PLOT → MCV2_Bond → storyline token
HUNT → MCV2_Bond (HUNT→PLOT bonding curve, no Uniswap) → MCV2_Bond → storyline token
PLOT → MCV2_Bond directly → storyline token

Only 1 Uniswap pool needed: PLOT/WETH. USDC routes via WETH multi-hop (Universal Router supports this).

Changes to ZapPlotLinkV2.sol

HUNT routing

  • When fromToken == HUNT: skip Uniswap, use MCV2_Bond.mint() to swap HUNT→PLOT via the bonding curve
  • HUNT is the reserve token for PLOT on MCV2 — there's already a bonding curve for this
  • For estimates: use MCV2_Bond.getReserveForToken(plotToken, plotRequired) to get HUNT cost
  • Reference: MintPad's ZapUniV4MCV2 skips swap when fromToken is the reserve token

USDC routing

  • Route USDC→WETH→PLOT using Uniswap Universal Router multi-hop (not a direct USDC/PLOT pool)
  • OR keep as single-hop if a USDC/PLOT pool exists, but multi-hop via WETH is more practical (WETH pools have deeper liquidity)

ETH routing

  • Keep as-is: WETH→PLOT via Uniswap V4

Estimate functions

  • estimateMint() and estimateMintReverse() need matching logic for HUNT (use MCV2 view functions instead of Quoter)

Contract References

  • ZapPlotLinkV2: 0xEF6a8640c836b16Eb8cCD8016Ead4C8517aC3033 (will need redeployment)
  • MCV2_Bond: 0xc5a076cad94176c2996B32d8466Be1cE757FAa27
  • PLOT token: 0xF8A2C39111FCEB9C950aAf28A9E34EBaD99b85C1
  • HUNT: 0x37f0c2915CeCC7e977183B8543Fc0864d03E064C
  • MintPad reference: ZapUniV4MCV2 at 0xa2e7BcA51A84Ed635909a8E845d5f66602742A75

Acceptance Criteria

  • HUNT input routes through MCV2 bonding curve (HUNT→PLOT), not Uniswap
  • ETH input routes through Uniswap V4 (WETH→PLOT pool)
  • USDC input routes through Uniswap V4 (via WETH multi-hop or direct)
  • PLOT input remains direct MCV2_Bond.mint
  • Estimate functions return correct values for all input tokens
  • Contract redeployed on Base mainnet
  • Verified on Sourcify + Basescan

Branch

task/442-fix-hunt-routing in plotlink-contracts repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions