Stratus
Stratus borrow/lend pool plus swap AMM. Supply OPN to earn yield, borrow against collateral, or trade OPN <-> mUSDC - all in one dApp
by longvovan · submitted May 29, 2026
Community votes
0
Voting opens when this submission reaches the Top 10 stage.
Overall score
—/ 100
Weighted average across the 5 judging criteria.
Description
01/03
What the builder said.
Written by the team, rendered as the markdown they typed in the submission wizard.
What we built
Stratus: a three-primitive DeFi suite on IOPN testnet, plus a unified dApp that composes them.
- Lending: single-asset borrow/lend pool for native OPN. Fixed 5% APR via a Compound-style global
borrowIndex. 75% LTV, 80% liquidation threshold, 50% close factor, 5% liquidator bonus. - Swap: UniV2-style constant-product AMM for native OPN ↔ mUSDC. 0.30% fee, ERC20 LP token (OSP-LP), MINIMUM_LIQUIDITY locked on first mint, reentrancy-safe native transfers.
- Strategy: Leveraged LP composer that turns four cross-protocol calls into one guided flow. Deposit OPN as collateral, borrow OPN against it, pair the borrowed OPN with mUSDC, add liquidity to the OpenSwap pool. All orchestrated client-side, no router contract.
Why
DeFi on a new chain usually ships as isolated primitives that never talk to each other. Stratus ships the primitives and the composition layer in the same repo, so the value is more useful than the sum: a single panel turns four cross-protocol calls into one guided position open.
The brief also asked for something a builder community could actually fork. Each contract is small (one file, no proxies, no external deps beyond OpenZeppelin v5), verified on the IOPN explorer, and ships with full tests. The frontend lives in its own directory with bundled ABIs and env-var addresses, so it deploys standalone on Vercel with zero modifications, and the IOPN builder community gets a working reference for borrow/lend, AMM, and cross-protocol composition.
How it works
Lending: lazy linear interest accrual against a 1e18-scaled borrowIndex. Each user action touches accrueInterest first, then updates per-user principal at the new index. Health Factor = (collateral × LT) / debt, exposed via view function for the UI.
Swap: classic x * y = k with sqrt bootstrap and uint112 packed reserves. Native OPN handled via msg.value on swapExactOPNForToken / addLiquidity, with payable and explicit refund of dust. sync and skim included.
Strategy (Leveraged LP): client-side state machine drives four signed transactions in sequence. LTV slider clamps at 70%, five points below the protocol's 75% cap, so the user can never accidentally open at the edge. The panel previews resulting Health Factor, required mUSDC, and expected LP shares before the first signature. A per-step status list shows live progress (deposit, borrow, approve mUSDC, addLiquidity) with explorer links on each receipt.
dApp: three sidebar sections (Lending, Trade, Strategy) with eleven flat routes via hash-based navigation. Wallet connect through RainbowKit (MetaMask, OKX, WalletConnect). Disconnected users land on a hero screen with a Connect CTA. The History view reads events through the IOPN explorer API in a single HTTP call, no chunked eth_getLogs spam. Light theme, Lucide icons, mobile drawer.
Stack & status
Solidity 0.8.24, Hardhat, TypeScript, OpenZeppelin v5. Frontend on Next.js 14 (App Router), wagmi v2, viem v2, RainbowKit, TanStack Query, Tailwind. Tests: 73/73 passing, 100% lines on LendingPool, 98% on OpenSwapPair.
Verified on IOPN testnet (chainId 984):
- LendingPool:
0x55E64b4786966219fb1501094472D356046F864F - OpenSwapPair:
0x4A5d5Ea0bE6ac98682D28526F02217e6Fc977B12 - MockUSDC:
0xFFff7761b5e662D26C7C51C9F80f1324F5e43c00
Roadmap
02/03
What ships next.
The builder's own next-quarter plan. Use it to gauge follow-through and ambition.
Next · Q3 2026
Making the Strategy section feel like a real product:
- Close & rebalance Leveraged LP in one click
- Leverage-long looper on OPN, up to 3x with a visual slider
- Pool charts for TVL and utilization, sourced from the explorer event log
- Permit2 to kill the double-popup on Swap and Add Liquidity
- Position dashboard with live Health Factor and a close shortcut
Solo and part-time, so oracle-dependent items ship behind the admin-price fallback if Pyth is not live by Q3.
Later · 2027 and beyond
Multi-asset lending (unlocks true shorts). Multi-pair Swap with factory and router. Kinked interest rate curve. Reserve factor and treasury sink. External security review. Governance with timelock. Flash loans. Cross-chain via IBC.
Tracked publicly via GitHub Issues.
On-chain proof
03/03
1 contract on OPN Chain.
The chain itself confirmed every deployment is valid, signed by the builder's wallet, and inside the season's window.