Protocol Overview
Last updated
Last updated
The role of an oracle is to provide Silo with the correct price of an asset. SiloOracleRepository is the entry point of token prices for a Silo and manages oracle modules and price request routing. It can support many protocols and sources.
BalancerV2Oracle is an oracle module that is responsible for pulling the correct prices of a given asset from BalanecerV2 pools. It performs security checks and returns TWAP prices when requested.
UniswapV3Oracle is an oracle module that is responsible for pulling the correct prices of a given asset from UniswapV3 pools. It performs security checks and returns TWAP prices when requested.
ChainlinkV2 Oracle is an oracle module that is responsible for pulling the correct prices of a given asset from Chainlink Price Feeds.
Silo is the main component of the protocol. It implements lending logic, manages and isolates risk, acts as a vault for assets, and performs liquidations. Each Silo is composed of the unique asset for which it was created (ie. UNI) and bridge assets (ie. ETH and SiloDollar). There may be multiple bridge assets at any given time.
Repository handles the creation and configuration of Silos.
Stores configuration for each asset in each Silo: Each asset in each Silo starts with a default config that later on can be changed by the contract owner
Stores registry of Factory contracts that deploy different versions of Silos: It is possible to have multiple versions/implementations of Silo and use different versions for different tokens. For example, one version can be used for UNI (ERC20) and the other can be used for UniV3LP tokens (ERC721)
Manages bridge assets: Each Silo can have 1 or more bridge assets. New Silos are created with all currently active bridge assets. Silos that are already developed must synchronize bridge assets. Sync can be done by anyone since the function has public access.
Is a single source of truth for other contract addresses
Factory contract performs deployment of each Silo. Many Factory contracts can be registered with the Repository contract.
Interest Rate Model calculates the dynamic interest rate for each asset in each Silo at any given time. It calculates two values:
1.Current Interest Rate: Used to display the current interest rate for the user in UI.
2.Compound Interest Rate: Returns the interest rate for a given time range compounded every second.
Silo Router is a utility contract that aims to improve UX. It can batch any number or combination of actions (Deposit, Withdraw, Borrow, Repay) and execute them in a single transaction.