Coming Soon: The Developers section is under active development. Documentation will be available soon.
Overview
Centuari is a fixed-rate lending protocol built on Arbitrum with cross-chain liquidity aggregation.
System Architecture
┌─────────────────────────────────────────────────────────────────┐
│ User Interface │
│ (Web App, Mobile, CLI) │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ SDK / API │
│ (@centuari/sdk, Credit Kit API) │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Cross-Chain Layer │
│ (Bridge Adapters, Message Passing) │
├─────────────────────────────────────────────────────────────────┤
│ Ethereum │ Polygon │ Optimism │ Base │ ... │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Arbitrum (Home Chain) │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │
│ │ Order Book │ │ Vault │ │ Collateral │ │
│ │ Contract │ │ Contract │ │ Manager │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ │
│ │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │
│ │ CBT Token │ │ Yield Router │ │ Oracle │ │
│ │ Factory │ │ Contract │ │ Adapter │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Core Components
Order Book (Hybrid)
Centuari uses a hybrid orderbook architecture:
Off-chain: Order storage, matching, price-time priority
On-chain: Settlement, CBT minting, position management
Off-chain Responsibilities:
- Store and manage lend/borrow orders (gasless)
- Match orders based on price-time priority
- Handle partial fills
On-chain Responsibilities:
- Execute settled trades
- Mint CBT tokens
- Manage positions and redemptions
Key Functions:
function placeLendOrder(
address asset,
uint256 amount,
uint256 rate,
uint256 maturity
) external returns (bytes32 orderId);
function placeBorrowOrder(
address asset,
uint256 amount,
uint256 maxRate,
uint256 maturity
) external returns (bytes32 orderId);
function matchOrders(
bytes32 lendOrderId,
bytes32 borrowOrderId
) external;
CBT Token Factory
Creates and manages Centuari Bond Tokens.
Each CBT:
- ERC-20 compliant
- Specific to asset + maturity
- Redeemable at $1 at maturity
Key Functions:
function createCBT(
address asset,
uint256 maturity
) external returns (address cbtAddress);
function mint(
address cbt,
address to,
uint256 amount
) external;
function redeem(
address cbt,
uint256 amount
) external returns (uint256 underlying);
Collateral Manager
Handles collateral deposits, withdrawals, and liquidations.
Responsibilities:
- Track user collateral balances
- Calculate borrowing power
- Execute liquidations
- Manage multi-asset collateral
Key Functions:
function deposit(
address asset,
uint256 amount
) external;
function withdraw(
address asset,
uint256 amount
) external;
function getBorrowingPower(
address user
) external view returns (uint256);
function liquidate(
address user,
address debtAsset,
uint256 debtAmount
) external;
Vault Contract
Manages curator vaults for pooled strategies.
Responsibilities:
- Accept deposits/withdrawals
- Track share prices
- Enforce allocation rules
- Collect fees
Yield Router
Deploys idle capital to external yield sources.
Responsibilities:
- Monitor idle capital
- Deploy to approved protocols
- Instant recall for matching
- Track interim yields
Oracle Adapter
Aggregates price feeds from multiple sources.
Sources:
- Chainlink (primary)
- TWAP (fallback)
- Custom feeds (RWA)
Data Flow
Lending Flow
Borrowing Flow
Cross-Chain Architecture
Liquidity Aggregation
Source Chains Home Chain (Arbitrum)
───────────── ────────────────────
Ethereum ────┐
│ ┌────────────────┐
Polygon ────┼─────────────│ Order Book │
│ │ │
Optimism ────┤ │ All matching │
│ │ happens here │
Base ────────┘ └────────────────┘
Bridge Integration
Supported bridges:
- LayerZero
- Hyperlane
- Axelar
Flow:
- User deposits on source chain
- Bridge message sent to Arbitrum
- Funds credited on Arbitrum
- Order placed on Arbitrum order book
Gas Fees Explained
Hybrid Architecture Benefits
| Action | Location | Gas Cost |
|---|
| Place order | Off-chain | $0 |
| Cancel order | Off-chain | $0 |
| Modify order | Off-chain | $0 |
| Order matching | Off-chain | $0 |
| Deposit funds | On-chain | Very low (~$0.10 on Arbitrum) |
| Withdraw funds | On-chain | Very low (~$0.10 on Arbitrum) |
| Settlement | On-chain | Very low |
User Relayer Contract
───── ─────── ────────
│ │ │
│──Sign message──────────│ │
│ │──Submit tx with gas───│
│ │ │
│ │◄─────Execute───────────│
│◄───Result──────────────│ │
Implementation:
- EIP-712 typed data signing
- Relayer network submits on-chain transactions
- Protocol treasury covers on-chain gas costs
Security Model
Access Control
┌─────────────────────────────────────────┐
│ Governance │
│ (Protocol Parameters) │
└────────────────────┬────────────────────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Admin │ │ Keeper │ │ Public │
│ (Pause) │ │(Liquidate)│ │(Lend/Borrow)│
└───────────┘ └───────────┘ └───────────┘
Upgrade Pattern
- Transparent proxy pattern
- Timelock on upgrades (48h)
- Multi-sig admin
Integration Points
For Applications
| Integration | Method |
|---|
| Read market data | SDK / Subgraph |
| Execute trades | SDK / Direct contract |
| Monitor positions | SDK events / Webhooks |
For Protocols
| Integration | Method |
|---|
| Liquidity provision | Direct contract |
| Collateral support | Governance proposal |
| Oracle feeds | Adapter integration |
Smart Contract Details
Explore contract interfaces and addresses