Documentation Index
Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt
Use this file to discover all available pages before exploring further.
Bot Overview
You are building a machine to make predictions about the future. The machine will be wrong. But it will be wrong faster than you, and that is enough. A Vision bot joins prediction batches, submits sealed bitmaps, and claims rewards without human intervention. Registration is free, requires no collateral. The full lifecycle reduces to a few API calls and on-chain transactions — an almost insulting simplicity for a task of such metaphysical ambition.Architecture
What a Vision Bot Does
The lifecycle of a bot is the lifecycle of hope, compressed into code:- Registers on the Vision contract (one-time, free, no collateral).
- Polls the oracle API for active batches.
- Generates predictions — UP or DOWN for each market in a batch.
- Encodes predictions into a packed bitmap and hashes it with keccak256.
- Joins the batch on-chain with a USDC deposit and the sealed bitmap hash.
- Reveals the actual bitmap bytes to oracle nodes off-chain.
- Claims rewards periodically using BLS-signed balance proofs from oracles.
- Withdraws remaining balance when exiting a batch.
Registration is free. Calling
registerBot() costs only gas. No staking, no collateral. You deposit USDC only when joining a batch — the moment you decide your machine’s opinions are worth money.Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
RPC_URL | Yes | — | Index L3 RPC endpoint (https://rpc.generalmarket.io/) |
VISION_API_URL | No | https://generalmarket.io/api/vision | Oracle Vision API base URL |
BOT_PRIVATE_KEY | Yes | — | Wallet private key (controls USDC deposits) |
VISION_ADDRESS | No | 0x4F1BDD073932828bf2822F6dCAD1121Da41ED1Ef | Vision contract address |
DEPOSIT_AMOUNT | No | 10 | USDC to deposit per batch (whole tokens) |
STAKE_PER_TICK | No | 1 | USDC to stake per tick (whole tokens) |
POLL_INTERVAL | No | 30 | Seconds between batch polling cycles |
Contract Details
| Property | Value |
|---|---|
| Contract | Vision.sol at 0x4F1BDD073932828bf2822F6dCAD1121Da41ED1Ef |
| Network | Index L3 (Arbitrum Orbit, chain ID 111222333) |
| Collateral | WUSDC (18 decimals) |
| Protocol fee | 0.05% on profits only |
| Min stake per tick | 0.1 USDC (100_000_000_000_000_000 raw, 1e17) |
Bot Registration
Registration stores a public metadata struct on-chain. The blockchain remembers your bot existed. Whether that is a comfort or an indictment depends on performance:registerBot(endpoint, pubkeyHash) once. Call deregisterBot() to remove your registration.
Next Steps
Quickstart
Register, fund, and unleash your first bot in under 10 minutes.
Bot Lifecycle
Poll. Predict. Join. Monitor. Claim. The full anatomy of automated hope.
Bitmap Encoding
Bits. The smallest possible opinion. The full encoding spec.
Example Strategies
Three theories about the future expressed in code. All wrong. Some useful.