v2.0.0-alpha.9 — TradeCpi fix + 13/13 tests passing
Pre-release
Pre-release
·
35 commits
to agent-trading-infra
since this release
What's New
TradeCpi EngineOverflow Fixed (Phase H breakthrough)
Root cause: The vAMM matcher's maxFillAbs was set to 0n, meaning the matcher literally couldn't fill any trade — it returned exec_size = 0 (zero-fill), which the engine rejected as size == 0 → RiskError::Overflow.
Fix: Updated default vAMM params to match the production app (percolator-launch/app/hooks/useVAMM.ts):
maxFillAbs:10^17(effectively unlimited, was0)mode:0(passive, was1/vAMM)tradingFeeBps/baseSpreadBps/maxTotalBps:50/50/200bpsliquidityNotionalE6:10^13($10M notional)
Full Percolator Integration — All 13 devnet tests pass
Complete lifecycle tested end-to-end on Solana devnet:
- Create market (10-step with vAMM matcher) ✅
- Init user (trader account) ✅
- Deposit collateral ✅
- Push oracle price ✅
- Keeper crank ✅
- Open long position ✅ (was failing with EngineOverflow)
- Read market state ✅
- Find my position ✅
- Close position ✅
- Verify flat ✅
- Withdraw collateral ✅
- Close account ✅
- Discover markets ✅
Other changes
- Updated vendored
@percolator/coreaccounts.ts with all account specs - Added
encodeCloseSlab,encodeAdminForceCloseto vendored SDK - 18 adapter methods including teardown, adminForceClose, closeSlab
- Updated README.md and docs/index.html with Percolator section
- Removed debug logging from trade() method
- Withdraw test reads actual remaining capital
npm install outsmart@2.0.0-alpha.9