Design Liquidity Mining

Medium45 min
1 / 30
understanding7 min read

Problem Statement: Incentivizing Liquidity with On-Chain Emissions

Problem Statement: Incentivizing Liquidity with On-Chain Emissions — liquidity mining interview depth

Problem Statement: Incentivizing Liquidity with On-Chain Emissions

Uniswap/Sushi/Curve-class liquidity mining platform that stakes LP tokens into emission gauges, accrues reward tokens per block, supports boost multipliers and optional lockups, and exposes honest APR after fees and dilution. This section covers problem statement during the understanding phase.

Mechanism

  • LP providers deposit Uniswap V2-style LP tokens into a MasterChef-style staking contract that tracks reward debt per share
  • Emission schedule mints governance/reward tokens per block across weighted pools; accrual uses accumulated rewards per share (accRewardPerShare)
  • Boost contracts (Convex-style) can multiply effective stake without moving underlying LP until withdraw

Farm invariants

On-chain accRewardPerShare and rewardDebt settle claims; off-chain APR tiles are trailing projections tied to a block number.

Failure modes

  • Reward token hyperinflation when emissions outpace real liquidity utility
  • Double-claim if reward debt is not updated before balance changes

Interview checkpoint (sec-01)

Quote $2.5B staked LP reference, 120 active farms, and accRewardPerShare monotonicity except emergency pause when a Uniswap/Sushi/Curve interviewer probes depth—not generic Web3 hand-waving.

Staff+ talking point

Frame liquidity mining as capital allocation: emissions buy depth; APR billboards must subtract dilution when TVL spikes

javaOne Dark Pro
1public final class FarmState { public final BigInteger accRewardPerShare; public final long lastRewardBlock; }
pythonOne Dark Pro
1TVL_USD = 2_500_000_000
2ACTIVE_FARMS = 120
typescriptOne Dark Pro
1export function pendingReward(staked: bigint, debt: bigint, acc: bigint): bigint {
2 return (staked * acc) / 10n ** 12n - debt;
3}

Why interviewers care

Liquidity Mining interviews reward crisp scope, explicit trade-offs, and failure stories—not generic microservice diagrams.

Interview checkpoint

Name one failure story for Problem Statement: Incentivizing Liquidity with On-Chain Emissions that proves you understand real outages, not happy-path diagrams.

Key Highlights

  • LP providers deposit Uniswap V2-style LP tokens into a MasterChef-style staking contract that tracks reward debt per share.
  • Emission schedule mints governance/reward tokens per block across weighted pools; accrual uses accumulated rewards per share (accRewardPerShare).
  • Boost contracts (Convex-style) can multiply effective stake without moving underlying LP until withdraw.
Mention this
Tie problem statement to accRewardPerShare debt math and honest net APR.
Pro tip
Quantify dilution and claim gas before naming problem statement SKUs.

Section Rescue Kit

Buzzwords to use:

accRewardPerShareallocPoint

Safe statements:

  • "For Problem Statement: Incentivizing Liquidity with On-Chain Emissions, I'll anchor on-chain rewardDebt before discussing cloud SKUs."
  • "I'll walk stake → accrue → claim when stuck."
Design Liquidity Mining - System Design | WinJob | WinJob