Truth.Farm Documentation
Build with the collateral-weighted oracle on BNB Chain. Start with the Quickstart, then dive into JS or Solidity as needed.
Start here
- Quickstart
- Optimistic Oracle — Fast, low-cost oracle with dispute mechanism
JavaScript/TypeScript (ethers v6)
- Setup
- Core actions: Create • Vote • Resolve • Claim
- Edge cases: Ties & slashing • Pagination
- Copy‑paste: Snippets
Solidity
- Complete Interface Reference — Full interfaces for all contracts
- Minimal interface — Quick integration guide
- Approvals & token handling
- Core actions: Create • Vote • Resolve
- End‑to‑end flows
- Optimistic Oracle Integration — Solidity examples
How it works
- Create — Post a question with start block and options (requires deposit)
- Vote — Stake tokens on answers; highest collateral wins
- Resolve — After the window ends; ties auto‑extend and revert until resolved
- Claim — Winners share the pot proportionally