Contract Architecture
This page provides an overview of the Osito Protocol's smart contract architecture, highlighting the key contracts and their relationships.
Core Contracts
OsitoLending
The central contract of the protocol that handles borrowing, lending, and liquidations. It manages all positions and calculates borrowing limits.
OsitoToken
The token contract that implements verification and qualification logic for tokens used as collateral in the protocol.
OsitoInterestRateModel
Implements the interest rate calculations based on utilization rates.
Contract Interactions
The Osito Protocol's contracts interact in the following ways:
- OsitoLending calls OsitoToken to verify collateral tokens and calculate borrowing limits
- OsitoLending uses OsitoInterestRateModel to determine the current interest rate based on utilization
- OsitoToken interacts with external token contracts to verify their properties
Libraries and Helper Contracts
BorrowingPowerCalculator
A library that implements the mathematical formulas for calculating borrowing limits based on token properties and liquidity pool state.
OsitoOracle
Not an oracle in the traditional sense, but a helper contract that fetches on-chain liquidity data directly from DEX pairs.