Isolated Modules
Why isolated module architecture was chosen for Tren Finance, and how it works
Last updated
Why isolated module architecture was chosen for Tren Finance, and how it works
Last updated
Any protocol that deals with collateral, whether it be a perp DEX or money market, has to choose between two design options: cross-collateral vs isolated architecture. Some protocols will offer both, but each will be separated within the protocol. We'll explain the pros and cons of both design options, along with why we chose isolated module architecture for Tren Finance.
Cross-collateral pools offer greater capital efficiency, but with generally higher levels of associated risk. With a cross-collateral lending market, for example, a protocol (the lender) could accept a total of 5 tokens (tokens A, B, C, D, E) as collateral, with which users (the borrower) can borrow up to 1 million USD (debt ceiling). A user could deposit tokens A, B, and C for a combined collateral value of tokens A + B + C, and use this to borrow asset(s) offered by the protocol. This offers greater capital efficiency, as the user can use the combined value of tokens A, B, and C as collateral. However, if token B were to suddenly flash crash without recovery for whatever reason, this exposes the protocol to systemic risk. If a significant percentage of the overall collateral pool consisted of token B, then borrowers would not be able to repay their loans, leaving the protocol in bad debt. If Token B made up 50% of the collateral pool, the protocol would face losing half of its debt ceiling (500K USD in this example). Even if Token B made up a lower percentage of the collateral pool, the overall collateral pool value could still be worth less than the loans issued. To cover some of the bad debt, a protocol could make the decision to liquidate or partially liquidate the collateral pool, which could even affect users who hadn't used Token B as collateral.
Isolated modules essentially offer the opposite pros and cons, by sacrificing greater capital efficiency in favor of lower levels of associated risk. On Tren Finance, tokens A, B, C, D, and E would be separate modules based on each asset's unique risk profile, so token B would likely have a lower debt ceiling. But even if each asset had the same debt ceiling of 200K USD, the max loss that the protocol could face in the event token B's flash crash would be token B's debt ceiling amount of 200K USD. Only token B's module would be affected, eliminating the potential for systemic risk.
There is no right or wrong answer in choosing between cross-collateral and isolated module infrastructure. The decision is dependent on a protocol's goals and product market fit. A lending protocol that deals with blue-chip only assets may decide that there is very low systemic risk due to the limited number of collateral assets it offers, and choose a cross-collateral architecture.
Tren Finance, on the other hand, is a new type of protocol that (re)collateralizes assets such as LP tokens, money market deposits, and restaked assets. For a protocol like Tren Finance, isolated modules make the most sense due to the high levels of risk management that it offers. Even if a collateral asset has high levels of liquidity risk, oracle risk, security risk, and centralisation risk (link to all of these risk pages), isolated module infrastructure indirectly helps alleviate these risks simply due to its ability to contain risk and avoid systemic debt.
Isolated modules contain the risk to individual pools, hence protected deposits. If there is an issue with one asset, it only affects that asset and not the protocol. In a cross-collateral pool with Tokens A, B, and C, even if you just deposit Token A, you may still be affected if Token B flash crashes. With isolated modules, this is not the case. Assets on Tren Finance are also not lent out to other borrowers, as is the case with borrowing & lending protocols, and avoids risks of governance attacks. Furthermore, Tren Finance does not have redemptions, so deposits really are protected.
Isolated modules alleviate Liquidity Risk, Oracle Risk, Security Risk, and Centralisation Risk.
All tokens on Tren Finance are paired with XY, creating a single market for every token asset. This approach prevents fractured liquidity and enhances protocol efficiency, contrasting with pure lending pair methods where each new pairing generates a separate lending market.
While some protocols allow the creation of markets for any asset, attracting liquidity is a separate challenge. To entice lenders, these protocols often offer higher interest rates to offset the risks. Instead of this approach, TrenDAO assumes responsibility as the sole lender of the protocol and the protocol incentivizes participants who stake XY and hold veTREN. The protocol, acting as the sole lender by minting XY for each pool, allows the DAO to capture 100% of the supply side interest. This model enables the protocol to adopt a loss leader strategy, offering lower collateral rates than competitors to drive growth, while offsetting losses with interest from other assets. Stakers of XY benefit by gaining a diversified lending position, providing a liquidity backstop in the event of bad debt.
The TrenBox contract acts as a secure container where you can deposit collateral to borrow XY and manage your loan. Each TrenBox is linked to a smart contract address, and each address can have only one XY per collateral type. If you're familiar with Vaults or CDPs from other platforms, TrenBoxes function similarly.
TrenBoxes maintain two balances: one for the collateral asset and another for the debt, which is denominated in XY. You can adjust these balances by adding collateral or repaying debt. As you make these changes, your TrenBox's Loan-to-Value (LTV) ratio will be updated accordingly.
You can close your TrenBox at any time by fully paying off your debt.
LTV represents the ratio of a loan amount to the value of the collateral securing the loan, expressed as a percentage. To calculate the loan to value for a TrenBox the formula below is used
Max LTV represents the maximum amount a user can borrow based on the value of a given collateral. The Max LTV is specific to each collateral asset offered on Tren Finance.
If the market value of the collateral decreases, the LTV ratio increases because the same loan amount is now backed by less valuable collateral. This can cause the LTV to surpass the Max LTV
While it is not recommended to exceed the Max LTV for a TrenBox, the position remains solvent as long as the LTV is below the liquidation threshold (LT).
Max LTV can also be described as the borrowing power of a position, providing a clear indication of how much can be borrowed against a specific collateral. In essence, Max LTV and borrowing power are interchangeable terms for determining the borrowing capacity of a given collateral.
The liquidation threshold is a critical parameter in Tren Finance, determining the maximum value that your loan can reach before your collateral becomes eligible for liquidation. Each asset within the protocol has its own ratio for this threshold, and this ratio is established through governance decisions.
When a position gets liquidated closer to the threshold, liquidators are rewarded with a higher liquidation fee. This incentive structure is in place to encourage quick action in liquidating positions that approach or exceed the Liquidation Threshold. If borrowers were allowed to accumulate debt beyond the value of their collateral, it would lead to a state of under-collateralization. This scenario is problematic because it increases the risk of bad debt accumulating within the pool, which can have adverse consequences for the protocol.
The difference between the LTV ratio and the liquidation threshold acts as a safety margin to protect the borrower. This margin ensures that there is sufficient collateral to cover the outstanding debt even if the value of the collateral declines slightly. It prevents immediate liquidation upon minor market movements.
The Health Factor serves as a visual indicator of your TrenBox, depicted by a spectrum spanning from Red to Green. When your Health Factor reaches the critical threshold of 0%, it triggers the initiation of the liquidation process. This metric is determined in real-time, taking into account your Loan-to-Value (LTV) ratio and the Liquidation Threshold (LT) for the module under which the TrenBox is opened.
Several factors can contribute to your Health Factor approaching the perilous 0% mark, including:
The value of your collateral diminishes.
You withdraw a portion of your collateral.
Additional borrowing activity on your part.
Accumulation of interest on your loan over time.
The closer your Health Factor gets to 0%, the nearer you are to facing liquidation. It's essential to vigilantly monitor the Health Factor of each of your borrow positions to ensure their stability and avoid potential liquidation.
To calculate the liquidation price, use the formula below. Note that the collateral quantity is expressed in the number of collateral tokens, while the loan value is expressed in dollars.
To borrow you must open a TrenBox and deposit a certain amount of collateral along with a minimum debt of 500 XY. The minimum debt ensures that each TrenBox is substantial enough to make transaction costs worthwhile for the user.
When you open a TrenBox and draw a loan, 150 XY is set aside as a way to compensate gas costs for the transaction sender in the event of your TrenBox being liquidated. The Liquidation Reserve is fully refundable if your TrenBox is not liquidated, and is given back to you when you close your TrenBox by repaying your debt. The Liquidation Reserve counts as debt and is taken into account for the calculation of a TrenBox's LTV ratio, slightly increasing the actual collateral requirements.
The collateral and debt of an active TrenBox may increase in the event of a redistribution within an isolated module. A redistribution occurs when the stability pool is empty, or a TrenBox's value is too low to effectively liquidate. Collateral and debt from a liquidated TrenBox is distributed among the active TrenBoxes within the module.
Debt ceilings are one of the most important risk management tools in Tren Finance. The concept of a debt ceiling is used to cap the maximum amount of debt that can be issued against a specific type of collateral. The debt ceiling is shown as the total XY on each module.Comment
Each type of collateral typically has its own debt ceiling. Riskier assets have lower XY and more mature assets enjoy a larger supply of XY to be minted. This limit is set by both governance decisions and the in house risk management team of Tren Finance based on the perceived risk and liquidity of the collateral asset, among other factors.Comment
Without debt ceilings, a protocol could become overly concentrated in a single type of collateral, especially if it becomes popular or seen as highly profitable. This could lead to systemic risks if that particular asset faces issues like regulatory crackdowns, fundamental security flaws, or other problems that could affect its value.Comment
If a CDP protocol allows very high or no limits on debt creation for a particular asset, an attacker might manipulate the price of a low liquidity asset (both the collateral and the borrowed asset). By inflating the price of the collateral artificially through wash trading or other techniques, they could borrow significantly more against it than its actual market value. Once the manipulation stops, the price could collapse, leading to losses for the protocol when the position is liquidated at a value that doesn't cover the debt. A debt ceiling limits the total exposure of the protocol to such price manipulations as we can control the maximum value at risk per module. With full control over the value at risk we are able to set debt ceilings so that the cost of manipulation is higher than the gain from exploiting the protocol, securing the protocol.