Last Updated: December 2025 Status: Testnet MVP - Core functionality complete, ready for testing
| Metric | Value | Notes |
|---|---|---|
| Move Modules | 15 | 95% complete |
| Tests | 101 passing | Good coverage including integration tests |
| Frontend | 70% complete | Full trading UI with settlement |
| Documentation | Excellent | 1,600+ lines |
| Deployment | Devnet | Fully deployed and initialized |
Status: Already existed in collateral.move
credit_collateral()- Workingdebit_collateral()- Workingtransfer_to_insurance()- Working
Status: Implemented in options.move
- Added
buy_options()entry function - Added
close_long_position()entry function - Frontend
BuyOptionsForm.tsxcomponent created - Full buyer flow working
Status: Implemented Series Premium Pool model
Solution: Instead of a full orderbook, implemented a simpler pool-based model:
- Writers add to series open interest when writing
- Buyers pay premium to series pool when buying
- Writers can claim proportional share of premiums
- Added
claim_premium()entry function
This provides writer/buyer matching without full orderbook complexity.
Files: sources/series.move, sources/options.move
Status: Fixed for devnet testing
- Changed
MAX_PRICE_AGEfrom 300s to 86400s (24 hours) - Allows testing without constant price refresh
Files: sources/oracle.move
Priority: P1 - Settlement accuracy
Priority: P1 - Settlement accuracy
Problem: oracle::get_settlement_price() returns current spot price, not historical price at expiry time.
Impact: Settlement not historically accurate.
Fix Required:
- Integrate Pyth historical price lookup
- Or store settlement price when series expires
- Or use TWAP around expiry window
Files: sources/oracle.move, sources/settlement.move
Priority: P1 - Runtime errors possible
Problem: series::get_series() is called by margin.move but may not be properly exposed.
Verify: Ensure all cross-module function calls have correct visibility.
Files: sources/series.move, sources/margin.move
Priority: P1 - Security
Problem: config.move has pause mechanism but it's not checked in all entry functions.
Fix Required:
// Add to ALL entry functions:
assert!(!config::is_paused(), errors::protocol_paused());Files: All entry function files
Priority: P2 - UX limitation
Problem: Users can only hold one position per series (stored as resource at address).
Impact: Cannot add to existing position, must close and reopen.
Options:
- Allow position aggregation (add amounts)
- Use Table for multiple positions per series
- Current model acceptable for MVP
Files: sources/types.move, sources/options.move
Priority: P2 - User experience
Problem: Liquidation happens instantly at maintenance threshold. No margin call period.
Improvement:
- Add margin call event when approaching threshold
- Add grace period before liquidation
- Add partial liquidation option
Files: sources/liquidation.move, sources/events.move
Priority: P2 - Protocol safety
Problem: Insurance fund referenced but not implemented.
Required:
- Create InsuranceFund struct
- Implement fund accumulation from fees
- Implement shortfall coverage
Files: sources/collateral.move (new), sources/config.move
Priority: P1
Missing: Full lifecycle test: create series → write options → wait for expiry → settle
#[test]
fun test_full_settlement_lifecycle() {
// 1. Setup accounts, oracle, series
// 2. Writer deposits collateral
// 3. Writer creates short position
// 4. Buyer creates long position (blocked by bug #2)
// 5. Fast-forward to expiry
// 6. Settle positions
// 7. Verify payouts
}Files: tests/integration_tests.move
Priority: P1
Missing: No liquidation test cases at all.
#[test]
fun test_liquidation_trigger() { ... }
#[test]
fun test_liquidation_payout() { ... }
#[test]
fun test_liquidation_insufficient_collateral() { ... }Files: tests/liquidation_tests.move (new)
Priority: P1
Missing: Deposit, withdraw, lock, unlock not tested.
#[test]
fun test_deposit_collateral() { ... }
#[test]
fun test_withdraw_collateral() { ... }
#[test]
fun test_insufficient_balance_withdraw() { ... }
#[test]
fun test_locked_collateral_cannot_withdraw() { ... }Files: tests/collateral_tests.move (new)
Priority: P2
Missing:
- Max position size limits
- Overflow scenarios in math
- Zero amount operations
- Expired series operations
- Concurrent position operations
Files: Various test files
Priority: P1
Missing: Users cannot see or trigger settlement from UI.
Required:
- Settlement status indicator per series
- "Settle" button for expired positions
- Payout preview before settlement
- Settlement history
Files: frontend/src/components/SettlementPanel.tsx (new)
Priority: P2
Missing: No visibility into liquidation risk.
Required:
- Health factor display per position
- Warning indicator when near liquidation
- Liquidation history
Files: frontend/src/components/PositionsPanel.tsx
Priority: P2
Missing: No price visualization.
Required:
- Oracle price history chart
- Option price chart
- Greeks visualization
Files: frontend/src/components/PriceChart.tsx (new)
Priority: P2
Problem: Basic toast messages only. No transaction tracking.
Required:
- Transaction pending state
- Transaction confirmation with explorer link
- Error message details
Files: All components with transactions
Priority: P1 (after backend)
Missing: No trading interface.
Required:
- Order book visualization (bids/asks)
- Place order form
- Order history
- Cancel order button
Files: frontend/src/components/OrderBook.tsx (new)
Priority: P1
Action: Review all math operations for potential overflow with large values.
Focus Areas:
- Settlement payout calculations
- Collateral requirement calculations
- Position aggregation
Files: sources/math.move, sources/settlement.move, sources/margin.move
Priority: P1
Problem: Admin can set arbitrary prices. No sanity checks.
Mitigations:
- Add max price change per update (e.g., 20%)
- Add confidence interval validation (from Pyth)
- Add multiple oracle sources
Files: sources/oracle.move
Priority: P1
Problem: Single admin address is single point of failure.
Mitigations:
- Implement multisig for admin operations
- Add timelock for critical changes
- Consider governance mechanism
Files: sources/config.move
Priority: P2
Action: Move's resource model prevents classic reentrancy, but review for:
- Cross-module call chains
- External call patterns (when Hyperion integrated)
Files: All modules with external calls
Priority: P0 (before mainnet)
Action: Engage security firm for comprehensive audit.
Scope:
- All Move modules
- Economic model review
- Integration security
Priority: P1
Status: Fully implemented
Completed:
- Added Pyth dependency to Move.toml
- Aligned AptosFramework version with Pyth
- Implemented
update_prices_from_pyth()entry function - Implemented
get_pyth_price()view function - Price format conversion (variable Pyth exponents to 6-decimal fixed-point)
- Add confidence interval checks (TODO: production enhancement)
- Test with real Pyth feeds on testnet (TODO: integration testing)
Files: Move.toml, sources/oracle.move, sources/math.move
Priority: P2
Status: Completely stubbed
Tasks:
- Research Hyperion API/SDK
- Implement market creation for series
- Implement order routing
- Handle fills and settlements
Files: sources/orderbook.move
Priority: P2
Status: Events defined, no indexer
Tasks:
- Set up event indexer (Aptos Indexer or custom)
- Create GraphQL API for queries
- Connect frontend to indexed data
Files: New infrastructure
Question: Should we use AMM for simpler implementation?
Research:
- Study Dopex, Lyra, Premia AMM models
- Evaluate capital efficiency tradeoffs
- Prototype AMM pricing curve
Question: How to implement cross-position margining?
Research:
- Study SPAN margin methodology
- Evaluate correlation-based margin reduction
- Design position netting logic
Question: How to handle early exercise?
Research:
- Study binomial tree pricing for American options
- Design early exercise detection and settlement
- Evaluate gas costs of complex calculations
Question: How to price options at different strikes?
Research:
- Study implied volatility smile/skew
- Design volatility interpolation
- Evaluate oracle solutions for IV
Question: Are current implementations gas-efficient?
Research:
- Profile gas costs of all operations
- Identify optimization opportunities
- Consider storage vs computation tradeoffs
Priority: P2
Missing: Function-level documentation for frontend integration.
Required:
- All view functions with parameters and return types
- All entry functions with required arguments
- Error code reference
Priority: P2
Missing: End-user documentation.
Required:
- How to connect wallet
- How to get test tokens
- How to write options
- How to manage positions
- How settlement works
Priority: P1
Missing: Production deployment checklist.
Required:
- Pre-deployment checklist
- Deployment steps
- Post-deployment verification
- Rollback procedures
- Implement missing collateral functions
- Add long position creation
- Fix oracle staleness for devnet
- Add critical tests
- Integrate Pyth oracle
- Implement orderbook OR AMM
- Complete frontend
- Full E2E testing
- Internal security review
- Third-party audit
- Bug bounty program
- Economic audit
- Mainnet deployment
- Gradual rollout (caps/limits)
- Monitoring setup
- Incident response plan
- Portfolio margin
- American options
- Additional underlyings
- Governance system
- Verified collateral functions already exist (credit/debit/transfer_to_insurance)
- Added
buy_options()entry function in options.move - Added
close_long_position()entry function - Implemented Series Premium Pool for writer/buyer matching
- Added
claim_premium()function for writers - Fixed oracle staleness (300s → 86400s for devnet)
- Created BuyOptionsForm.tsx component
- Added settlement functions to useOptions hook
- Updated PositionsPanel with settlement UI
- Added 3 new pool integration tests (97 total passing)
- Deployed updated contracts to devnet
- Initialized SeriesPool resource
- Mock USDC module created
- 7 mock_usdc tests added
- Deployment scripts created
- TESTNET_GUIDE.md written
- Frontend scaffolded
- Basic UI components built
- Deployed to devnet
- Protocol initialized with 4 series
- Protocol pause enforcement in all entry functions (added to cancel_order)
- Series getter function access verification (already working)
- Added 4 liquidation tests (101 total passing)
- Pyth oracle integration completed:
- Added Pyth dependency to Move.toml
- Aligned AptosFramework version with Pyth's version
- Implemented
update_prices_from_pyth()entry function - Implemented
get_pyth_price()view function - Implemented
convert_pyth_price_to_u64()for price format conversion - Added
pow10()helper to math module
- Settlement price historical lookup (currently uses current spot)
- Position storage model (allow multiple positions)
- Security audit before mainnet
- CLAUDE.md - Project context and conventions
- TESTNET_GUIDE.md - CLI testing guide
- OPTIONS_PROTOCOL_ARCHITECTURE.md - Technical architecture
- PITCH.md - Business case
This document should be updated as work progresses. Use checkboxes to track completion.