๐งฉIntegrating Ekubo
The different ways to integrate Ekubo Protocol, and production integrations you can use as reference implementations
Last updated
Was this helpful?
The different ways to integrate Ekubo Protocol, and production integrations you can use as reference implementations
There are several ways to integrate Ekubo, depending on what you're building.
Every interaction with Ekubo goes through the Core singleton's lock callback pattern: call lock, receive a callback, perform swaps and settle net token amounts at the end. See Swapping for the flow. On EVM, production swaps go through the gas-optimized Yul Router with routes encoded by @ekubo/yul-router-sdk; the Router contracts (Starknet, EVM) are reference implementations for building your own.
To route trades through Ekubo pools you need to simulate swaps off-chain. The easiest path is the Quoter API, which returns block-pinned split routes ready to execute. To compute quotes yourself, use the SDKs โ the Rust SDK implements every pool type and extension โ or see Price representation and Pool math to implement the math directly. Remember that pools with extensions can modify swap behavior; see the Aggregators guide for how to handle them safely.
The open source indexer ingests Ekubo events on any supported chain into Postgres โ it is the same code that powers the Ekubo API. Run your own instance for low-latency or high-volume needs.
The public MCP server at mcp.ekubo.org exposes quoting, pool and position data, and unsigned execution plans to any MCP-capable agent.
Market makers can run RFQ-style pools where each swap is signed off-chain with its own fee and bounds, while still settling in Ekubo Core โ see Signed exclusive swaps.
ekubo_sdk (Rust) computes quotes across every pool type; @ekubo/sdk provides pool math in TypeScript; @ekubo/yul-router-sdk encodes swap routes for EVM execution. See SDKs.
Production integrations of Ekubo you can use as working examples:
Go
Aggregator pool discovery, state tracking, and swap simulation
TypeScript
Aggregator integration with on-chain quoting and event-based state
Rust
Substreams-based indexing and off-chain swap simulation of Ekubo V3
Questions about an integration? Ask in the Ekubo Discord.
Last updated
Was this helpful?
Was this helpful?

