OIG is an open-source market maker gateway that connects liquidity providers to intent-based trading infrastructure. It enables market making across multiple EVM chains by receiving trading requests (RFQs) from the intent platforms, generating and cryptographically signing quotes and submitting them back.
Currently, OIG operates through Liquorice Protocol, which acts as an aggregator connecting market makers to various solvers who compete to find the best execution paths and settle trades in intent-based protocols (CoW, bebop, etc.).
- Docker and Docker Compose installed - for containerized deployment
- Liquorice Credentials - Get
MAKER_SESS_IDandMAKER_SESS_AUTHfrom Liquorice team - Signer Ethereum address (EOA) with hexadecimal private key
SIGNER_PRIV_KEYused for quote signatures. Recommended to have zero balances on it. - SKeeper Contract(s) deployed on target EVM chains
- Permissions Setup:
- Signer MUST have
SIGNER_ROLEgranted on SKeeper contracts forERC-1271signature validation - SKeeper contracts must hold ERC-20 token reserves for market making
- All tokens should have ERC-20 allowances given for Liquorice Balance Managers
0x38E1E461dadA062C202Cb63b1AC8Be09b95340CD
- Signer MUST have
- RPC Endpoints - WebSocket-enabled EVM RPC endpoints for each chain (
***_WS_URLenvironment variables)
- Copy
.env.exampletemplate to.envand replace rpc settings, contract addresses and credentials with your values. - Each active chain requires both
***_WS_URLand***_SKEEPER. Othervise the chain will be inactive. - Set
LOG_LEVELtoINFOto reduce verbose logging if needed
docker compose build
docker compose up -d
docker compose logs -f
┌─────────────────┐ ┌──────────────┐
│ QuoterService │ │ ChainService │
│ │ │ │
│ │ │ │ Transfer Web3 RPC
│ │ │ │ events │
│ │ │ ┌─────────┐◄─┼───────────◄─
│ │ │ │Read │ │ │
│ │ │ │spendable├──┼───────────┼─┐
│ │ │ │balances │ │ multicall │ │
│ │ Balances │ │ │ │ │ │
│ ┌─────────────┼────────────┼─┼─────────┼──┼───────────◄─┘
│ │ │ │ └─────────┘ │ │
│ │ │ │ │Settlement │
│ │ │ │ ┌─────────┐◄─┼───────────◄─
│ │ │ │ │Parse │ │ events │
│ │ │ │ │Settlement──┼───────────┴──┐
│ │ │ │ │Metadata │ │ debug_traceTx│
│ │ │ Trade │ │ │ │ (optional)│ │
│ │ │ ┌──────┼─┼─────────┼──┼───────────◄──┘
│ │ │ │ │ └─────────┘ │ │
│ │ │ │ │ │ │Web3 RPC
Periodic │ │ │ │ └──────────────┘ │
PriceLevels │ ┌─▼───────────┐ │ │
│ Updates │ │ Balances & │ │ │
├──────────────┼►┤ LevelsCache │ │ ▼
│ │ │ │ │ ┌──────────────┐
│ │ │ │ │ │ ┌──┐ │ RFQ │
│ │ │ ┌───────┐ │ │ │ ├──┤◄────┼───────────◄─
│ │ └─┼───────▲───┘ │ │ ├──┤ │ │
│ │ ┌─┼───────┼───┐ │ RFQMessage│ ├──┤ │ │
│ │ │ ▼ └───┼◄┼────────────┼─────┼──┤ │ │
│ │ │ │ Reply with│ │ │ └──┘ │ │
│ │ │ │ Quote or │ │ │ │ │
Maker│ │ │ │ Ignore??? │ │ │ │ │
Client │ └─┼───────────┘ │ │ │ │
│ │ │ │ │ Liquorice │ JSON o. WS│Liquorice
│ │ │ │ │ WS Client │ │maker v2
│ │ ┌─▼───────────┐ │ │ │ │
│ │ │ │ Sign quote│ │ │ │ │
│ │ │ │ w.EIP-712 │ │ │ │ │
│ │ │ │ signature │ │ │ │ │
│ │ │ │ │ │ RFQQuote │ ┌──┐ │ │
│ │ │ └───────────►─┼────────────┼────►├──┤ │ │
│ │ └─────────────┘ │ │ ├──┤ │ │
│ Trade Notifs │ │Trade│ │ ├──┤ │ Quote │
│◄─────────────┤◄────────────────┼─────┘ │ ├──┼─────┼───────────┼►
│ │ │ │ └──┘ │ │
└─────────────────┘ └──────────────┘ │
Contributors:
The code released under permissive MIT License. Contributions are welcome!