Contract Addresses
Every Openfish contract is deployed on Polygon mainnet (Chain ID: 137). This page is the single source of truth for addresses used throughout the platform.
Core Trading Contracts
Section titled “Core Trading Contracts”| Contract | Address | Description |
|---|---|---|
| CTF Exchange | 0xA642f9165D192Ff13b1D43a0Ef56B3BD074614bB | Order matching and settlement for standard binary markets |
| Neg Risk CTF Exchange | 0x700eaF3f3FEb1D3f2aE67000e1A4FA41a6E35DF1 | Order matching for negative risk (multi-outcome) markets |
| Neg Risk Adapter | 0x0d8FA66CFe5D5EF96D6be9C4e808BD4279527d6e | Converts NO tokens between outcomes in neg risk events |
| Conditional Tokens (CTF) | 0x4D97DCd97eC945f40cF65F87097ACe5EA0476045 | ERC1155 token contract for split, merge, and redeem operations |
Token Contracts
Section titled “Token Contracts”| Contract | Address | Description |
|---|---|---|
| USDC.e (Bridged USDC) | 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 | Collateral token for all Openfish trading (6 decimals) |
Wallet Factory Contracts
Section titled “Wallet Factory Contracts”| Contract | Address | Description |
|---|---|---|
| Proxy Wallet Factory | 0xaB45c5A4B0c941a2F231C04C3f49182e1A254052 | Deploys EIP-1167 minimal proxy wallets for email/Magic users |
| Gnosis Safe Factory | 0xaacFeEa03eb1561C4e67d661e40682Bd20E3541b | Deploys 1-of-1 Gnosis Safe wallets for browser wallet users |
Dispute Arbitration (UMA)
Section titled “Dispute Arbitration (UMA)”Openfish uses agent-submitted resolutions backed by a 24-hour cooldown. When a resolution is challenged, the dispute is escalated on-chain to the UMA Optimistic Oracle. These contracts only participate in the dispute flow, not in the normal resolution path.
| Contract | Address | Description |
|---|---|---|
| UMA Optimistic Oracle v2 | 0x255483434aba5a75dc60c1391bB162BCd9DE2882 | Price-based dispute arbitration (legacy markets) |
| UMA Optimistic Oracle v3 | 0xfb55F43fB9F48F63f9269DB7DEDE3644eB6d4D1d | Assertion-based dispute arbitration (most markets) |
Testnet Contracts (Amoy — Chain ID: 80002)
Section titled “Testnet Contracts (Amoy — Chain ID: 80002)”| Contract | Address | Description |
|---|---|---|
| CTF Exchange | 0xdFE02Eb6733538f8Ea35D585af8DE5958AD99E40 | Standard market exchange on Amoy testnet |
| Neg Risk Exchange | 0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296 | Neg risk exchange on Amoy testnet |
| Conditional Tokens (CTF) | 0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB | ERC1155 token contract on Amoy testnet |
| USDC (testnet) | 0x9c4e1703476e875070ee25b56a58b008cfb8fa78 | Testnet collateral token |
| Gnosis Safe Factory | 0xaacFeEa03eb1561C4e67d661e40682Bd20E3541b | Safe wallet factory on Amoy testnet |
Note: The Proxy Wallet Factory is not available on the Amoy testnet.
Usage in Rust
Section titled “Usage in Rust”The Openfish SDK ships with all contract addresses baked in. There is no need to hardcode them yourself.
use openfish_client_sdk::{POLYGON, AMOY, contract_config, wallet_contract_config};
// Standard market config (Polygon mainnet)let config = contract_config(POLYGON, false).expect("polygon config");assert_eq!(format!("{:#x}", config.exchange), "0xa642f9165d192ff13b1d43a0ef56b3bd074614bb");assert_eq!(format!("{:#x}", config.collateral), "0x2791bca1f2de4661ed88a30c99a7a9449aa84174");assert_eq!(format!("{:#x}", config.conditional_tokens), "0x4d97dcd97ec945f40cf65f87097ace5ea0476045");
// Neg risk config (Polygon mainnet)let neg = contract_config(POLYGON, true).expect("neg risk config");assert_eq!(format!("{:#x}", neg.exchange), "0x700eaf3f3feb1d3f2ae67000e1a4fa41a6e35df1");assert_eq!(neg.neg_risk_adapter.map(|a| format!("{:#x}", a)), Some("0x0d8fa66cfe5d5ef96d6be9c4e808bd4279527d6e".to_owned()));
// Wallet factorieslet wallets = wallet_contract_config(POLYGON).expect("wallet config");assert_eq!(format!("{:#x}", wallets.safe_factory), "0xaacfeea03eb1561c4e67d661e40682bd20e3541b");assert_eq!(wallets.proxy_factory.map(|a| format!("{:#x}", a)), Some("0xab45c5a4b0c941a2f231c04c3f49182e1a254052".to_owned()));Wallet Address Derivation
Section titled “Wallet Address Derivation”The SDK can deterministically compute wallet addresses from an EOA using CREATE2:
use openfish_client_sdk::{POLYGON, derive_safe_wallet, derive_proxy_wallet};use openfish_client_sdk::types::address;
let eoa = address!("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266");
// Derive the Safe wallet addresslet safe_addr = derive_safe_wallet(eoa, POLYGON) .expect("derivation failed");
// Derive the Proxy wallet addresslet proxy_addr = derive_proxy_wallet(eoa, POLYGON) .expect("derivation failed");Required Approvals
Section titled “Required Approvals”Before you can trade, the exchange contracts need permission to transfer tokens on your behalf. The following approval matrix applies:
| Token | Spender | Purpose |
|---|---|---|
| USDC.e | CTF (Conditional Tokens) | Split USDC.e into outcome tokens |
| CTF (ERC1155) | CTF Exchange | Trade on standard binary markets |
| CTF (ERC1155) | Neg Risk CTF Exchange | Trade on negative risk markets |
| CTF (ERC1155) | Neg Risk Adapter | Convert positions in neg risk events |
Source Code
Section titled “Source Code”Next Steps
Section titled “Next Steps”- Getting Started — Token approvals and wallet setup.
- Negative Risk Markets — How multi-outcome markets work.
- Error Codes — Complete error reference for the CLOB API.