Swap / DEX·EVM
Opyn (Squeeth + Gamma options)
Pioneer DeFi options protocol behind Gamma Protocol (oTokens) and Squeeth — the on-chain ETH^2 power perpetual. The Squeeth product (oSQTH, Crab v2, Bull) was wound down on Nov 4, 2024 with redemptions at the settlement price; Gamma Protocol oToken contracts remain on Ethereum mainnet but are no longer the focus of new development.
- 01redeeming legacy oSQTH / Crab v2 / Bull positions
- 02reading Squeeth historical funding for research
- 03minting/exercising legacy ERC-20 oTokens (Gamma Protocol) on mainnet
- 04studying power-perpetual mechanics for new designs
- pnpm add viem ethers @opyn/squeeth-monorepo
- forge install opynfinance/squeeth-monorepo
| Variable | Scope | Description |
|---|---|---|
| NEXT_PUBLIC_ETH_RPC_URL | Client | Ethereum mainnet RPC for reading Squeeth `Controller`, `CrabStrategyV2`, and Gamma `Controller` contracts. |
| OPYN_SQUEETH_CONTROLLER | Client | Address of the Squeeth `Controller` (mainnet `0x64187ae08781B09368e6253F9E94951243A493D5`). Used to redeem post-shutdown. |
Squeeth is shut down — flow is redemption-only. Call `Controller.redeemShort(vaultId)` to close a short position at the settlement index price, or `Controller.redeemLong(amount)` to burn oSQTH for ETH. Crab/Bull strategies expose `flashWithdraw(amount, maxEthToPay)` — query share value via `getVaultEthValue(vaultId)` divided by `totalSupply()`. For Gamma Protocol oTokens, mint via `Controller.operate([{actionType: OPEN_VAULT/MINT_SHORT_OPTION/...}])` against a `MarginPool`; exercise expired ITM oTokens with `redeemAction`. Always check `Controller.isShutdown()` and `oToken.expiryTimestamp` before assuming a market is live.
- ⚑Squeeth (oSQTH) protocol was officially shut down on November 4, 2024 16:00 UTC. New mints and Crab/Bull deposits revert. Any UI that lets users "open" a Squeeth position is wrong — only `redeem*` paths work.
- ⚑Crab Strategy v2 was delta-neutral by selling oSQTH against ETH collateral; in volatile regimes the funding payment + rebalance impact compounded into double-digit drawdowns vs HODL ETH. Backtests that ignore rebalance gas/IL overstate yields.
- ⚑Squeeth pricing relied on an oracle TWAP from the Uniswap V3 oSQTH/ETH pool; once liquidity left after shutdown, the price oracle becomes stale — ALWAYS reference the on-chain `Controller.indexForSettlement()` post-shutdown, not the AMM.
- ⚑Gamma Protocol oTokens are European, cash-settled, and require keepers to call `Controller.redeem` after expiry — exercise does not happen automatically.
- ⚑Vaults are isolated and use a fixed margin requirement (`getNakedMarginRequired`). Cross-margining like Aevo/Derive is NOT available — high-IV regimes can liquidate undercollateralised vaults.
- ⚑Many tutorials reference `@opyn/squeeth.js` — that package is unmaintained. Pin to the in-tree TS helpers in `squeeth-monorepo/packages/sdk` or call ABIs directly.