Rain Chain / Developers
Build on native outcome primitives.
Sign typed actions to trade on RainCore, or deploy contracts to RainEVM that read books, outcomes and randomness. Public networks are not live yet — this page will carry real endpoints as they launch.
Networks
Network endpoints
| Network | Status | Phase | Chain ID | EVM RPC | WebSocket | REST | Explorer | Faucet |
|---|---|---|---|---|---|---|---|---|
| Devnet | Coming soon | Phase 0 | TBA | TBA | TBA | TBA | TBA | TBA |
| Testnet | Coming soon | Phase 1 | TBA | TBA | TBA | TBA | TBA | TBA |
| Mainnet | Coming soon | Phase 2 (beta) | TBA | TBA | TBA | TBA | TBA | — |
Planned interfaces: REST and WebSocket APIs for books (L2 depth and order-level L3), fills and user state; EVM JSON-RPC; an indexer streaming every fill and event; a Blockscout explorer for RainEVM and a RainCore explorer for markets, books, fills, validators and the bridge queue. A public status page will show block production, validator uptime and the bridge queue.
Accounts & signing
One key, two engines
- Accounts are secp256k1 addresses — the same key controls RainCore and RainEVM balances. Existing EVM wallets work.
- RainCore actions are EIP-712 typed messages, not EVM transactions. Trading is gasless.
- Each action carries a nonce: signers keep their 100 highest nonces; a new nonce must exceed the smallest, be unused, and lie within (T − 2 days, T + 1 day) of block time in ms. A millisecond timestamp works well.
- Optional
expiresAfter: the action is rejected if included after this time. - Agent keys let bots trade without holding withdrawal rights: up to 10 per account, scoped
tradeorcancel-only, expiring in ≤ 180 days. They share the master's rate-limit budget.
EIP-712 domain, chain id and type definitions: TBA with devnet.
API
Action types
Every action is classified by the in-block ordering rule (class 1 = non-taking, 2 = cancel, 3 = taker). Names below are descriptive; final wire names ship with the SDK.
| Action | What it does | Class |
|---|---|---|
order | Place GTC / IOC / FOK / ALO / GTD, with reduce-only, cloid, STP mode and optional builder | 1 if ALO, else 3 |
batch | Up to 50 place / cancel / modify operations, atomic per operation | By content |
modify | Replace an order (by id or cloid) | By new order |
cancel / cancelByCloid / cancelAll | Remove resting orders | 2 |
scheduleCancel | Dead-man switch, t ≥ 5 s ahead, ≤ 10 triggers/day | 2 when it fires |
convert | Multi-outcome negRisk conversion; basket mint / merge | 1 |
transfer | Between accounts, sub-accounts, RainCore ↔ RainEVM | 1 |
approveAgent / approveBuilder | Authorise an agent key or a builder fee cap | 1 |
stake / delegate / undelegate | Staking | 1 |
leverageOpen / leverageClose / repay | Isolated leveraged positions | 3 / 3 / 1 |
withdraw | Bridge withdrawal to Arbitrum One | 1 |
Rate limits: 10,000-request initial buffer plus 1 request per $1 of filled volume; cancels get min(limit + 100,000, 2 × limit). Batches count as n requests.
Examples
What integration will look like
// Illustrative only — not a published SDK. import { RainClient } from "@rain/sdk"; // placeholder package const rain = new RainClient({ rpc: process.env.RAIN_REST_URL, // TBA — no public network yet signer: agentKey, // scope: "trade", expires ≤ 180 days }); // Every action is an EIP-712 typed message, gasless on RainCore. await rain.batch([ { type: "cancelByCloid", market, cloid: "0x…01" }, { type: "order", market, side: "buyYes", price: 0.412, size: 5_000, tif: "ALO", cloid: "0x…02" }, // post-only: class 1 { type: "order", market, side: "buyNo", price: 0.586, size: 5_000, tif: "ALO", cloid: "0x…03" }, // stored as sell YES @ 0.414 ]); // Dead-man switch: cancel everything if we go quiet for 10 s. await rain.scheduleCancel({ at: Date.now() + 10_000 });
// Illustrative only. rain.ws.subscribe({ channel: "l2Book", market }, (book) => { // Prices are YES prices on one merged book; NO = 1 − YES. render(book.bids, book.asks); });
// Illustrative only — precompile address and interface TBA. interface IRandom { function request(uint64 k) external returns (uint256 id); // k ≥ 2, default 3 function get(uint256 id) external view returns (bytes32); // reverts until round final } contract Dice { IRandom constant RNG = IRandom(RANDOM_PRECOMPILE); // TBA function roll() external returns (uint256 id) { id = RNG.request(3); } function settle(uint256 id) external { uint256 r = uint256(RNG.get(id)) % 6 + 1; // commit-then-reveal // … pay out, capped at a fraction of vault equity } }
RainEVM
Contracts with access to RainCore
EVM-equivalent (Cancun-level, revm), gas in RAIN with EIP-1559 (base fee burned), ERC-4337 EntryPoint and paymasters at genesis. Precompiles: CoreRead, CoreWrite (queued to the next block in class order), Random, Resolve and Stake. Block gas target 15M, limit 30M per 200 ms block (target). See Technology → RainEVM.
Open-source, audited templates are planned: House Vault, dice, scheduled lottery and a crash-style game. Operators deploy and run their own instances; Rain provides infrastructure.
SDK
SDK & tooling
TypeScript SDK
Signing, actions, WebSocket feeds. Ships with the public testnet.
MM & agent clients
Reference market-maker and AI-agent clients using agent keys and batches.
Explorers & indexer
RainCore explorer, Blockscout for RainEVM and a fill/event stream.
Bridge
Moving assets from Arbitrum One
| Asset | Mechanism | Use on Rain Chain |
|---|---|---|
| RAIN | Burn-and-mint (native on Rain Chain), mint capped at 0.1% S0/h and 0.5%/24 h | Gas, staking, bonds, RAIN markets |
| USDT (USD₮0) | Lockbox | Settlement and margin |
| USDC (native) | Lockbox | Settlement and margin (separate quote asset) |
Deposits
Credited when more than 2/3 of validator power attest to the Arbitrum event, using Arbitrum's "safe" head (typically under a minute), with a $250k per-deposit fast-path cap. Beta total stablecoin cap: $25M.
Withdrawals
| Size (USD) | Delay |
|---|---|
| < $10k | 3 min |
| $10k–$250k | 30 min |
| $250k–$2M | 4 h |
| > $2M | 24 h |
Withdrawals need signatures from ≥ 2/3 of stake and stay under outflow caps of 5% of the lockbox per hour (20% per day). Validators and independent guardians can lock the bridge if a withdrawal doesn't match chain state; unlocking needs a quorum of validator cold keys, and guardians can never move funds. Two independent audits and formal verification of the signature logic are required before mainnet. Contract addresses: TBA
Reference
Read the specification
The Layer 1 specification v0.2 is the source of truth for every parameter on this site.