CrediX integrates with multiple DeFi lending and borrowing protocols via a standardized Protocol Adapter system. These adapters abstract away the complexity of different protocol interfaces and enable seamless routing, deposits, and withdrawals — all through a unified backend.
What Is a Protocol Adapter?
A Protocol Adapter is a modular smart contract component that connects CrediX to an external lending/borrowing protocol. It translates the generic actions (e.g., deposit, withdraw, get APY) into the protocol-specific implementation under the hood.
Each adapter conforms to a shared interface and can be added, removed, or upgraded without modifying core logic.
Key Functions of an Adapter
Function
Description
deposit()
Supplies assets into the underlying protocol
withdraw()
Withdraws assets from the protocol and returns them to the StrategyManager
getCurrentAPY()
Returns the current lending or borrowing rate (depending on the mode)
getProtocolName()
Returns a human-readable name for the protocol
These functions allow CrediX to interact with any integrated protocol in a consistent way, no matter how different their underlying smart contracts are.
Adapter Interface
All adapters implement a base interface like the following (Solidity-style):