Protocol Overview

Main Modules

  1. Pool - singleton contract that keeps track of the state of all the pools. It has the context of liquidity, interest rate, and borrowed amount for each pool.

  2. Credit Account (CA) - an isolated smart contract that contains both the user funds and the borrowed funds. This is where your leverage is. After you open an account, all the operations go through this account and the assets stay on it as well. Every user will have 1 credit account per pool.

  3. Credit Manager - A "backend" for all Credit Account operations, which performs collateral checks and facilitates execution of both external and internal (account management) calls.

  4. Credit Facade - A "frontend" contract that CA owners directly interact with. To manage CAs, users submit arrays of MultiCall structs that the Credit Facade parses, orchestrating the requested internal and external actions.

  5. Adapters - A set of contracts that are used as interfaces to interact with external protocols.

  6. Oracle - A set of contracts for each oracle to integrate with.

Last updated