Centuari Labs
  • Welcome to the Official Documentation of Centuari V1
  • Getting Started
    • Quickstart
    • Problems
  • Solutions
  • Primitive Lending
    • Flash Loan
    • Oracle
    • Liquidation
  • Currator
  • Basics
    • CLOB(deCentralized Lending Order Book)
    • Matching Transaction
    • Bond Token
    • Vault
  • Uncollateralized
    • Restaking
    • Underwriting
    • Assets Standardization
    • Slashing Mechanism
  • Resources
    • Contracts
    • Community
    • Further Update
  • Conclusion
    • Conclusion
Powered by GitBook
On this page
  • Centuari Protocol Documentation
  • Overview
  • Centuari Vault System
  • CentuariPrime Vault System
  • Interaction Between Centuari and CentuariPrime
  • Security Considerations
  • Benefits of the Dual Vault System
  • Conclusion
  1. Basics

Vault

Centuari Protocol Documentation

Overview

The Centuari Protocol is a sophisticated decentralized lending and borrowing platform that implements two distinct vault systems:

  1. Centuari Vault: The core lending and borrowing system that enables direct borrowing against collateral with tokenized lending positions.

  2. CentuariPrime Vault: A curator-managed vault system that allows for coordinated lending strategies and liquidity provision.

This documentation provides a comprehensive overview of both systems, their interactions, and their key features.

Centuari Vault System

Core Concepts

Bond Tokens

Bond Tokens are ERC20-compliant tokens that represent lending positions within the Centuari Protocol. These tokens have several important properties:

  • They are fully liquid and can be freely traded on secondary markets

  • Each token represents a claim on the underlying collateral

  • If a borrower fails to repay their loan by the maturity date, the collateral can be liquidated

  • The token naming convention includes the loan/collateral pair and interest rate information

When a lender provides funds to a borrower:

  1. The borrower's collateral is stored in the vault

  2. Loan funds are transferred from the order book to the borrower

  3. The vault mints Bond Tokens and sends them to the lender

This mechanism creates a tradable asset from what would normally be an illiquid lending position, providing significant advantages for portfolio management and capital efficiency.

Lending and Borrowing Process

Supplying Funds

Lenders supply funds to the protocol and receive Bond Tokens in return. These tokens represent their claim on both the principal and interest of the loan. The amount of Bond Tokens received is proportional to the amount supplied and existing shares/assets ratio.

Borrowing Funds

Borrowers provide collateral and then can borrow funds up to a certain percentage of their collateral value (determined by the LLTV - Loan-to-Liquidation-Threshold-Value). The system tracks borrowers' positions using borrow shares, which represent the proportion of the total debt they owe.

Interest Accrual

Interest accrues continuously based on the specified rate for the market. The accrueInterest function calculates the interest earned since the last accrue event and updates the total supply and borrow assets.

Repayment

Borrowers can repay their loans by calling the repay function, which returns collateral proportional to the repaid amount.

Liquidation

If a borrower's position becomes unhealthy (loan value exceeding the allowed percentage of collateral value) or they fail to repay by the maturity date, their position can be liquidated. Liquidators repay the debt and receive the borrower's collateral in return.

Key Components of Centuari

Markets

Each market in Centuari is defined by:

  • A loan token (the asset being lent)

  • A collateral token (the asset securing the loan)

  • A maturity date (when the loan expires)

Rates

Each market can have multiple interest rates, each with its own Bond Token. This allows for a diverse range of lending opportunities within the same collateral/loan pair.

BondToken Contract

The BondToken contract implements ERC20 functionality with specialized features for the Centuari protocol:

  • Dynamic naming based on the debt/collateral pair and rate

  • Automatic inclusion of maturity information in the token name

  • Minting and burning functions that can only be called by the protocol

Health Factor

The system continuously monitors borrowers' positions to ensure they remain overcollateralized. The _isHealthy function checks if the borrowed value is less than or equal to the maximum allowed borrowed value based on the collateral.

CentuariPrime Vault System

Core Concepts

CentuariPrime provides a vault mechanism designed for both lending and curation purposes. It enables users to deposit and withdraw assets while allowing curators to manage vault configurations, including supply and withdrawal queues in collaboration with the Centuari protocol.

Curator Role

The curator is the vault's manager who can:

  • Adjust configurations such as the vault's supply queue (markets where funds are lent)

  • Set withdrawal queue (markets from which funds are withdrawn)

  • Determine allocation strategies for the vault's assets

Curators enable coordinated lending strategies that optimize for yield, risk, or other objectives across multiple markets.

Vault Operation

Creation

Vaults are created by specifying:

  • A curator address

  • The token used for deposits

  • A vault name

Each vault receives a unique ID and maintains its own configuration.

Deposits

Users deposit tokens into the vault and receive vault shares (CentuariPrimeToken) in return. The number of shares minted is proportional to the amount deposited and the vault's current total assets. After accepting deposits, the vault automatically allocates funds to markets according to the supply queue set by the curator.

Withdrawals

When users want to withdraw their funds, they burn their vault shares and receive the corresponding assets. The withdrawal amount includes both principal and accrued interest. The system follows the withdrawal queue specified by the curator to retrieve funds from various markets.

Asset Allocation

Supply Queue

The supply queue determines how funds are allocated across different markets. Each entry in the queue specifies:

  • The market configuration (loan token, collateral token, maturity)

  • The interest rate

  • A cap (maximum amount to allocate to this market)

When deposits are made, funds are allocated according to this queue until either all funds are allocated or all caps are reached.

Withdrawal Queue

Similar to the supply queue, the withdrawal queue specifies the order in which markets are accessed when processing withdrawals. This ensures orderly liquidation of positions when users request withdrawals.

Interest Accrual

The vault periodically accrues interest by querying all markets where it has allocated funds. The accrued interest increases the total assets of the vault, benefiting all depositors proportionally.

Interaction Between Centuari and CentuariPrime

The two systems work together seamlessly:

  1. CentuariPrime as a Lender: CentuariPrime vaults act as lenders in the Centuari system, receiving Bond Tokens when allocating funds to markets.

  2. Order Placement: When CentuariPrime allocates funds, it places lending orders on the CentuariCLOB (Central Limit Order Book) contract.

  3. Withdrawal Process: When users withdraw from CentuariPrime, the vault withdraws from Centuari markets according to its withdrawal queue.

  4. Interest Flow: Interest earned in Centuari markets flows back to CentuariPrime vaults and then to the vault's depositors.

Security Considerations

Access Control

  • Only authorized addresses can perform sensitive operations

  • The onlyOwner, onlyActiveMarket, onlyActiveRate, and similar modifiers restrict access to functions

  • For CentuariPrime, the onlyVaultOwner modifier ensures only curators can modify their vaults

Reentrancy Protection

Both Centuari and CentuariPrime use the nonReentrant modifier to prevent reentrancy attacks on critical functions.

Error Handling

Custom error libraries (CentuariErrorsLib and CentuariPrimeErrorsLib) provide clear error messages for various failure conditions.

Market Validation

When setting supply and withdrawal queues, CentuariPrime validates that all specified markets are active and compatible.

Benefits of the Dual Vault System

  1. Portfolio Management: Lenders can diversify or consolidate their lending positions across markets

  2. Capital Efficiency: Bond Tokens enable lenders to exit positions without waiting for loan maturity

  3. Coordinated Strategies: Curators can implement sophisticated lending strategies across multiple markets

  4. Liquidity: The system provides liquidity for what would normally be locked capital

  5. Risk Management: Curators can adjust strategies based on market conditions and risk assessments

Conclusion

The Centuari Protocol combines traditional lending and borrowing mechanics with innovative tokenized positions and curator-managed vaults. This dual structure provides significant advantages in terms of capital efficiency, liquidity, and strategic flexibility while maintaining the security and transparency expected in decentralized finance.

PreviousBond TokenNextRestaking

Last updated 26 days ago