Welcome to Rubicon guides and developer documentation


New to Rubicon? Visit our Frequently Asked Questions


Learn how to Trade, Swap, Bridge, and provide liquidity on the Rubicon App!


Documentation for the order book contract.


Query market data with Subgraphs or interact with Rubicon using Python and Rust SDKs

What is Rubicon? Rubicon is an order book protocol for Ethereum. Use it to trade ERC-20 tokens with Swaps, Limit Orders, and Market Orders or provide liquidity in Pools.

Rubicon is built on Optimism, a low-cost and lightning-fast Ethereum L2 chain.

Protocol Overview RubiconMarket.sol is the limit order book smart contract. It implements a matching engine and order books for peer-to-peer trading of ERC-20 tokens.

Rubicon Pools is a system of smart contracts that enables passive liquidity providers (LPs) to deposit tokens in a pool, where active market makers (strategists) use the pool assets on the order books. Yield from market-making goes to LPs, and strategists earn a performance fee.

Rubicon v1 Architecture

Developers: Start Rubicon Protocol Locally

$ git clone   
$ cd rubicon_protocol && npm i
$ npm i --save-dev openzeppelin-solidity@2.5.1
$ truffle init
$ 'n' for overwriting contracts
$ 'n' for overwriting migrations
$ (in separate terminal) ganache-cli

Also make sure that you comment out the lines in truffle-config.js that say 'development: ' and include localhost under networks so that you can connect to Ganache.

$ truffle migrate -- deploys contracts to development network, i.e. localhost
$ truffle test -- run the set of tests provided in the test folder of repo