Technical Overview
General
World Markets is fully on-chain. It is deployed on MegaETH, an Ethereum Layer 2.
It is entirely a set of smart contracts hyper-optimized to reduce gas costs. It has no backend. The UI talks directly to the blockchain, it can be downloaded and run locally on any computer. Anyone can build an alternative UI to trade on World.
The smart contract source code will be published after World has achieved sufficient liquidity. Our goal is to offer users the functionality of a CEX, combined with the transparency and permissionless access of Uniswap.
World uses RedStone as its primary oracle on MegaETH. It will likely use Chainlink as its secondary oracle within a month after launch. The oracle is used to settle perps and trigger liquidations.
Smart Contracts
The exchange is implemented as a single interface at a single address. The single interface fronts multiple deployed contracts on the blockchain. The exchange itself is broken up into three contracts (due to size limitations) and each order book is also its own contract. Each book can handle more than a billion live orders on each side. Insertion is O(1).
Oracles
All tokens in World must have a price source. The exchange is configured to read from Redstone. ChainLink will likely be added in the future. World transactions do not attempt to update these oracles. Oracle updates are either run externally by the exchange operator or sponsored. The core financial innovation in World, risk based portfolio valuation, depends critically on good prices.
Oracles set the mark price for the perps market. World additionally uses the oracle prices as inputs to trigger liquidation; it does not use the asset prices from its local order books to trigger liquidation.
Funding rates are calculated based on trading activity as described in Perpetual Futures, they are not an input from an oracle.
World performs due diligence on all oracle providers it uses and only works with those which pass internal checks. That said, it is possible for oracles to be manipulated or experience technical failures. This is one of the largest sources of risk for world.
Security
See Counterparty Risk.
SDKs
See Typescript SDK for Typescript and Rust SDK for Rust. We will have a Python SDK in the future.
Last updated
Was this helpful?

