COBE - an Order Book Exchange that allows inputs from Ethereum but makes the computation off-chain trustlessly via Cartesi Rollups.
COBE - Cartesi Order Book Exchange App Rollup is an verifiable off-chain CLOB exchange built with Cartesi Rollups. COBE's core processing and matching engine is built with Python but it works on Ethereum 🤯 Thanks to the unique architecture of Cartesi, our exchange can get actions of users from underlying layer, however can process them off-chain with 100% verifiability. COBE reads inputs from L1 smart contract, process transactions, and reports the execution traces. This execution proofs can be verified by anyone.
Why Cartesi? COBE is just a demonstration to show what can be done with Cartesi Linux Runtime. By using Cartesi, we managed to write a complex, but MVP level, matching engine in Python. In current VMs like EVM, it is not easy and not feasible to built a perfect matching engine. Cartesi offers the flexibility of RISC architecture and Linux Runtime which means we can write even more complex processes. We can even write it with Javascript, Rust or C++.
COBE has 4 main components.
Cartesi Rollup This is the part where transactions are processed, which means the order book and the engine lives inside this Rollup. This rollup is coded with Python and uses two main class to manage the Order Book and Portfolio.
Indexer API This indexer API continuously polls the Rollup GraphQL to get the reports (events). By using events, it creates an SQL database in order to serve UI faster and better. Also, indexer has built-in Rest API inside of it which serves the orderbook and balances to the UI.
UI UI shows the ask and bid book and user balances. UI allows people to deposit ERC20s into their portfolio, and add ask or bid orders.
-L1 L1 uses generic Cartesi Rollups Contracts, like InputFacet, portal, and dapp etc.