Skip to content

On-chain settlement on Arbitrum Sepolia #158

@ozpool

Description

@ozpool

Problem

Today every contract (CollateralVault, PositionRegistry, MarketRegistry, OracleAdapter, MockUSDC, MockOracle) deploys to local anvil only. No public testnet presence.

For the next investor cycle and the v1.1 milestone we want a wallet to bridge real testUSDC, sign EIP-712 orders, see positions settle on-chain, and have a block explorer link to point at.

Proposal

  1. Add script/DeploySepolia.s.sol mirroring Deploy.s.sol but pointing at Pyth's real OracleAdapter (no MockOracle — the relayer already speaks Pyth Hermes and produces the VAA bytes via HermesSource).
  2. Faucet path: deploy a testUSDC (or use an existing Sepolia USDC) with a 1k mint per address per 24h.
  3. CI workflow that runs forge build + forge verify against Sepolia on tag pushes.
  4. Edge --rpc-url flag — point it at the Sepolia RPC and the deployed contract addresses instead of anvil.
  5. .env.example template: SEPOLIA_RPC_URL, DEPLOY_PRIVATE_KEY, ARBISCAN_API_KEY.

Acceptance

  • All four contracts verified on arbiscan-sepolia.
  • Demo wallet can deposit testUSDC, place an order, see the position open on-chain (positionRegistry shows the entry), close and confirm USDC returned.
  • One liquidation runs end-to-end on Sepolia (positions opened with thin margin, oracle drops, liquidator process forces close, bonus paid).

Depends on

#151 (liquidator) for the full E2E run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions