Inspiration
Structured products like autocallable notes generate $500B+ in annual issuance in TradFi — yet they remain completely inaccessible to retail investors. They require minimum tickets of $100K+, opaque pricing from investment banks, and weeks of settlement.
We asked ourselves: what if we could bring institutional-grade yield products on-chain, with transparent pricing, $100 minimums, and real-time coupon streaming?
What it does
Phoenix is an on-chain autocallable note protocol built on Ink (Kraken's L2). Users deposit USDC and receive structured notes linked to baskets of tokenized stocks (wQQQx, wSPYx).
The protocol:
- Prices notes using Chainlink CRE: a Monte Carlo simulation (10k paths) runs off-chain via CRE workflows, computing put premiums, knock-in probabilities, and vega. Results are verified on-chain against an analytical approximation before acceptance.
- Streams coupons in real-time: instead of quarterly payments, coupons vest linearly over 30-day periods via a Sablier-like streaming contract. Users withdraw as it accrues.
- Hedges delta-neutrally: the protocol buys xStock tokens on a DEX, deposits them as collateral on Tydro (Aave v3 fork), borrows USDC against them, and manages the position across observation dates.
- Runs autonomously: a keeper service on Railway polls the chain, triggers CRE workflows, and executes all lifecycle operations (pricing, activation, observations, settlement) without manual intervention.
How we built it
- Smart contracts (Solidity, Foundry): 17 contracts — AutocallEngine (12-state machine), XYieldVault (ERC-7540 async deposits), CouponStreamer (linear vesting), HedgeManager (spot + collateral + borrow), and integration adapters for Tydro, Pyth, and Chainlink CRE.
- Chainlink CRE workflows (TypeScript): Two workflows — a Vol Oracle (cron every 2h, fetches realized vols from Twelve Data, computes correlations) and a Pricing workflow (event-driven, runs Monte Carlo with Cholesky-decomposed correlated paths, delivers signed reports to on-chain CREConsumer).
- Infrastructure: Vercel (frontend) + Railway (keeper + CRE orchestrator with pre-compiled WASM for instant execution).
- Deployed on Ink Sepolia with live integrations: Tydro for lending, Pyth for price feeds, official xStock tokens (wQQQx/wSPYx) for real tokenized stock exposure.
Challenges we ran into
- CRE simulation vs production: CRE workflows can't be deployed to the DON yet, so writeReport goes through a simulated forwarder that doesn't write on-chain. We built an onReport fallback where the keeper delivers pricing directly, while still running the full CRE simulation for the Monte Carlo computation.
- Tydro collateral activation: Aave v3 requires an explicit setUserUseReserveAsCollateral call after supplying, just depositing tokens isn't enough. This caused silent failures in the hedge flow until we traced it.
Accomplishments that we're proud of
- Full end-to-end flow on testnet: deposit → CRE Monte Carlo pricing → on-chain verification → hedge execution (swap + Tydro collateral + USDC borrow) → active note. All working on Ink Sepolia.
- CRE-powered quantitative finance: Running a 10,000-path correlated Monte Carlo simulation with Cholesky decomposition through Chainlink's decentralized compute, with on-chain analytical cross-validation.
What we learned
- Chainlink CRE is powerful for off-chain computation with on-chain delivery, but the simulation-to-production gap requires thoughtful fallback design.
- Pre-compiling CRE workflows to WASM at Docker build time is essential for production.
- Structured products have complex state machines, our 12-state autocall engine required careful ordering of pricing, hedging, observations, and settlement.
What's next for Phoenix
- DON deployment: Move CRE workflows from simulation to the live Chainlink DON for fully decentralized pricing.
- More baskets: Expand beyond QQQ/SPY to individual tech stocks (NVDAx, TSLAx, METAx, and more) and cross-asset baskets.
- Secondary market: Enable NoteToken transfers for position trading before maturity.
- Mainnet launch on Ink: Deploy to Ink mainnet with Cow Swap for real DEX swaps, production Tydro pools, delta-neutral & funding-rates on Nado and use of Euler for reserveFund.
Built With
- chainlink-cre
- euler
- goldsky
- ink
- nado
- neondb
- nextjs
- railway
- solidity
- twelvedata
- tydro
- typescript
- vercel
- xstocks
Log in or sign up for Devpost to join the conversation.