freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #53 of 90

derivatives · perps · options on-chain

BlockyVSDouble-Spend Dan
Blocky saysOn-chain derivatives — perpetual futures and options — let you trade leverage and hedge.

DeFi recreates derivatives without intermediaries. Perpetual futures ("perps", e.g. dYdX/GMX) track an asset's price with no expiry, using a funding rate to tether the contract price to spot, and offer leverage. On-chain options grant the right to buy/sell at a strike. These enable hedging and speculation — and amplify both gains and liquidation risk.

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleExplain what the funding rate does in a perpetual future.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>perp price &gt; spot → longs pay shorts (funding)
→ nudges perp back toward spot
leverage magnifies gains AND liquidation</pre></body></html>
▶ Open the interactive comic issue
‹ Algorithmic Stables · The Terra PostmortemYield Farming · Liquidity Mining ›