Smart Contracts
Tydro is built on a modular set of smart contracts, all available on GitHub. Developers can integrate contract addresses directly into Solidity or JavaScript projects using the Tydro Address Book.
The repository is organized into the following categories:
Pool
Configuration
Logic
Tokenization
Helpers
Misc
Pool
Pool
The Pool is the central entry point to Tydro. All core user interactions such as supplying, borrowing, and repaying flow through this contract. Ownership of the Pool is tracked by the PoolAddressesProvider, and admin-level actions (like changing parameters) are routed through the PoolConfigurator.
L2Pool
The L2Pool is an optimized version of the Pool contract, designed specifically for rollups. It enables gas-efficient interactions by accepting compact, byte-encoded calldata. This reduces transaction costs while maintaining the same functionality as the Pool.
PoolConfigurator
The PoolConfigurator manages risk parameters and configuration for the Pool. Only addresses with the appropriate permissions, assigned through the ACLManager, can call its write functions.
Configuration
ACLManager
The ACLManager is the registry of protocol roles and permissions. It defines and enforces access control across the system.
PoolAddressesProvider
The PoolAddressesProvider is a registry of various components of the protocol, including the ACLManager and Pool contracts. It has the ability to update pointers and proxy implementations to support upgrades.
Logic
Libraries that implement the underlying mechanics of protocol operations. These libraries ensure that Pool interactions execute reliably and securely.
Tokenization
aToken
Supplying assets mints aTokens which represent the depositor’s balance and automatically accrue yield. aTokens are burned when assets are withdrawn from the Pool
VariableDebtToken
Borrowing at a variable rate issues VariableDebtTokens. These non-transferable tokens track a borrower’s position and increase automatically as interest accrues.
Helpers
L2Encoder
The L2Encoder is a helper contract to encode calldata that is passed to the L2Pool. It is used to optimize calldata size in L2Pool for transaction cost reduction. It is only intended to help generate calldata for users/frontends.
TydroProtocolDataProvider
The TydroProtocolDataProvider and formats data from the Pool, making it easier for applications to access key protocol information.
Misc
TydroOracle
The TydroOracle manages reserve oracles and provides reference prices for assets. It ensures accurate pricing and updates sources as needed.
DefaultReserveInterestRateStrategy
The DefaultReserveInterestRateStrategy calculates borrowing costs and yields based on the state of each reserve. It defines the parameters and logic used to update interest rates dynamically.
PriceOracleSentinel
The PriceOracleSentinel safeguards the protocol during oracle disruptions. If a price feed becomes unavailable, it restricts operations until recovery and provides users with a grace period to restore healthy positions.
Last updated