Skip to main content
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:
  1. User deposits on source chain
  2. Bridge message sent to Arbitrum
  3. Funds credited on Arbitrum
  4. Order placed on Arbitrum order book

Gas Fees Explained

Hybrid Architecture Benefits

ActionLocationGas Cost
Place orderOff-chain$0
Cancel orderOff-chain$0
Modify orderOff-chain$0
Order matchingOff-chain$0
Deposit fundsOn-chainVery low (~$0.10 on Arbitrum)
Withdraw fundsOn-chainVery low (~$0.10 on Arbitrum)
SettlementOn-chainVery low

Meta-Transaction Flow (for on-chain operations)

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

IntegrationMethod
Read market dataSDK / Subgraph
Execute tradesSDK / Direct contract
Monitor positionsSDK events / Webhooks

For Protocols

IntegrationMethod
Liquidity provisionDirect contract
Collateral supportGovernance proposal
Oracle feedsAdapter integration

Smart Contract Details

Explore contract interfaces and addresses