Perpetual futures DEX built on Robinhood Chain Testnet for the hackathon.
Trade synthetic stocks (TSLA, AMZN, PLTR, AMD, NFLX) and ETH with leverage, using USDC as collateral.
- Open long/short positions on stock synthetics with up to 10x leverage
- Deposit USDC collateral, track PnL in real-time
- Prices simulated via GBM, pushed to an on-chain oracle every 15s
- Liquidations and funding rate settlement built into the core contract
- Admin page for live demo price updates
contracts/
src/
MockUSDC.sol — Faucet token (mint 100K USDC per call)
MockOracle.sol — Owner-updatable price feed (18 decimals)
LongbowCore.sol — Main perp engine: deposit/withdraw/open/close/liquidate
frontend/
src/app/
page.tsx — Landing page
app/page.tsx — Trading UI (charts, positions, order panel)
admin/ — Price control panel for demo
| Contract | Address |
|---|---|
| MockUSDC | 0x21ceBFDCd8268E430c7F71fE684f7943d0dF875d |
| MockOracle | 0x216D6A6cC1798BDb63e1b946FeBd710252A854B1 |
| LongbowCore | 0x6b1040c15eE2685370310C79C00B43910b6Db946 |
Explorer: https://explorer.testnet.chain.robinhood.com
# Contracts
cd contracts
forge test # 26/26 tests pass
forge build
# Frontend
cd frontend
cp .env.example .env.local # fill in contract addresses
npm install
npm run dev # http://localhost:3000- Contracts: Foundry / Solidity 0.8.24
- Frontend: Next.js 15, Tailwind, wagmi v2, Privy, lightweight-charts