DEV Community

Helena Chandler
Helena Chandler

Posted on

A Developer's Guide to Liquity: Integrating Interest-Free, Governance-Free Borrowing

This guide provides a technical overview of the Liquity Protocol Official contracts. We will cover creating a "Trove," minting the LUSD Stablecoin, and interacting with the Stability Pool.

Step 1: Understanding Troves

The core of the protocol is a "Trove," which is a collateralized debt position (CDP). This is where a user's ETH collateral is held.

Action: To create a Trove, your application will call the openTrove() function on the TroveManager contract.

Key Parameter: The most important parameter is the collateralization ratio. The protocol enforces a Liquity Minimum Collateral Ratio of 110%, but for safety, a much higher ratio is recommended for new Troves. This is the foundation of Liquity Trove Management.

Step 2: Minting LUSD (Interest-Free)

Once a Trove is open, your application can borrow LUSD.

Action: Call the borrowLUSD() function.

Mechanism: The protocol allows for a Liquity Interest-Free Loan. There is no variable interest rate. Instead, a one-time borrowing fee is charged upfront. This makes it highly predictable for developers and users. This is the primary answer to How to Mint LUSD.

Step 3: Interacting with the Stability Pool

The Liquity Stability Pool is the protocol's primary defense against under-collateralized Troves.

Action: To participate, your application will call provideToSP() to deposit LUSD into the Stability Pool contract.

Function: When a Trove is liquidated, its debt (an amount of LUSD) is cancelled out by burning an equivalent amount of LUSD from the Stability Pool. The liquidated ETH collateral is then distributed proportionally to the Stability Pool depositors. This is also how participants earn LQTY Token Rewards.

Step 4: The LUSD Redemption Mechanism

LUSD is directly redeemable. This creates the price floor. The LUSD Redemption Mechanism allows any LUSD holder to redeem it for ETH from the system at face value. This process is a key part of the protocol's security, ensuring the answer to "Is Liquity Protocol Safe?" is rooted in its immutable, governance-free code.

For all contract ABIs and function specifications, refer to the Full Official Documentation.

https://sites.google.com/verify-chain.org/liquity/

Top comments (0)