Barns and Sheds
Last updated
Last updated
Within the LUCIA Protocol, "Barns" serve as the umbrella structure housing an array of collateralized assets, commonly known as "Sheds." Each Shed acts as an individual vault where users can manage their loans and collateral assets. These Sheds are further grouped into different Barns based on the type of collateral, thus minimizing risk by segregating asset classes. In essence, Sheds parallel the concept of Collateralized Debt Positions (CDPs) in traditional DeFi frameworks.
Balances in the Shed
Each Shed encapsulates two primary balances:
The collateral asset (denoted as C, e.g., USDT)
The debt balance (denoted as D, typically denominated in our native stablecoin, LUCI)
We can define the Collateral-to-Debt ratio (CDR) as:
Managing Balances
Users have the ability to actively manage their Sheds by altering these balances. They can deposit or withdraw collateral, as well as repay portions of their debt. Let's denote:
𝛥C as the change in collateral
𝛥D as the change in debt
The new CDR after any changes is calculated as:
Closing Sheds
Users can also opt to liquidate their Sheds, which are essentially their Collateralized Debt Positions (CDPs). When a user decides to liquidate a Shed, the necessary step involves completely repaying their associated LUCI token debt — designated as (D). By repaying the LUCI debt in its entirety and thereby reducing D to zero, the CDR essentially becomes undefined—formally represented as:
The act of making D zero doesn't just render CDR mathematically indeterminate, but also triggers an automatic release of the user's initially staked collateral. This collateral, previously locked to secure the borrowed amount, is fully returned to the user, effectively 'zeroing out' their financial obligations within that particular Shed. The modular and compartmentalized architecture of Barns and Sheds within the LUCIA Protocol offers both flexibility and risk minimization. By providing detailed insights into each Shed's CDR, users are empowered to make informed decisions about their loans and collateral, thereby enriching the overall lending and borrowing experience.