> For the complete documentation index, see [llms.txt](https://docs.world.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.world.inc/venue/technical-overview.md).

# Technical Overview

## General

World Markets is fully on-chain. It is deployed on MegaETH, an Ethereum Layer 2.&#x20;

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](https://www.redstone.finance/). [ChainLink](https://chain.link/) 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](/details/perpetual-futures.md), 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](/venue/counterparty-risk.md#smart-contracts).

## SDKs

See [Typescript SDK](/developers/typescript-sdk.md) for Typescript and [Rust SDK](/developers/rust-sdk.md) for Rust. We will have a Python SDK in the future.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.world.inc/venue/technical-overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
