The Liqwid protocol is a set of interconnected smart contracts that function as a decentralized money market for loans, on the Cardano blockchain.
In a previous article I explained the basics of the project, now I will tell you how the protocol works.
How Does it Work?
Once the asset type and amount are selected, the borrowed assets are transferred from the market directly to the borrower’s wallet, connected. The maximum loan amount is determined by the guarantee factor, established by the system for the type of asset that the user provides as collateral. ADA has a factor of 70%.
There is no commission to open a loan in the protocol. Interest is paid at the particular market rate on the amount loaned.
During the life of a loan, the liquidity buffer could reach zero, or the account liquidity could drop to negative. This occurs when the value of the collateral decreases relative to the value of the loaned asset plus accrued interest.
To actively eliminate the credit risk of the protocol, materialized by exposure to loans at risk of default, a liquidation incentive is implemented. The mechanism is that any user (liquidator) can bring assets to a settlement pool, whose assets will be used to exchange against the collateral seized from a defaulting user, and thus the original asset that was borrowed is reimbursed.
Settlers can supply assets to settlement pools. Once a wallet is liquidated, the seized collateral is exchanged for the assets of the corresponding liquidation pool. The discounted collateral price used for settlement allows the liquidator to directly seize the collateral at a 10% discount. The reward is claimed pro rata among all vendors in a settlement group during a settlement event.
Like a corporation where shareholders can vote, earn dividends, and suffer losses, LQ holders can vote, receive a reward for delegating the token, and expose themselves to “loss”, while depositing their LQ tokens in the platform in the insurance pool. When a settlement pool is empty, or not large enough to settle a defaulting borrower, the participants who delegate their LQ are responsible for this settlement event.
In such a case, the LQ tokens are traded pro rata with a 10% discount on the collateral seized. The LQ tokens are transferred to the providers of the loaned assets on a pro-rata basis in the qTokens delegation pools.
The interest paid by the borrowers is distributed to the providers who provided the assets to the Liqwid markets (lenders). The accrued interest accrues directly to the value of your qToken. The part of the value created that is not distributed to suppliers is called “net margin”.
Reserves act as a liquidity cushion and insurance mechanism, to ensure that providers have sufficient liquidity to exit a market at any time. The collateral factor, plus these market reserves, give the protocol a significant cushion so that it can always pay the interest owed to the lenders.
The delegation reward represents the percentage of the captured value distributed to the LQ stakers, who deposited their LQ tokens in the protocol to use as reserve assets in settlement events.
The Liqwid developers have created an Oracle mechanism. It combines a Plutus contract with an off-chain reporting Oracle, which sends transactions to update price sources with data from an exchange’s API, signed with a public key. Price sources use a Time Weighted Average Price method (TWAP) and average all off-chain prices before updating on-chain.
All work done off-chain can be fully verifiable by on-chain users.
How are Tokens Deposited?
By using Liqwid, providers do not lend assets directly to the borrower, but instead deposit their assets in a smart market contract, which a posteriori determines the value of the deposited assets, and mints the equivalent value worth of qTokens within the user’s wallet. When borrowing with assets provided as collateral, the smart contract will determine the LTV (Loan-to-Value) benchmark, that is, the percentage that the debt represents over the value of the collateral, to borrow based on the asset provided.
Users supply assets to the protocol when they call the minting function in the market contract, and confirm the transfer of assets in their connected wallet. After the successful transfer of certain assets to the market contract, the qTokens for those assets (for example, qADA) are minted in the user’s wallet. Interest is not distributed to qToken holders, but interest is directly integrated into the qToken at the exchange rate of the underlying asset. As a result, any user who has qTokens is earning interest.
The qTokens accrue interest through the increase in their exchange rate with the underlying asset. As the total interest on the repaid loan increases, the qToken becomes an increasing amount of the underlying market asset, even while the number of qTokens in the user’s wallet remains constant.
Let’s Talk About Yield
The interest rate (the cost of money) should increase as a direct function of the demand, when the demand for loans for an asset is low, the interest rate should be low, and vice versa.
The interest rate on the loans will vary depending on the Liqwid market and will also be updated through governance mechanisms as needed in the future.
The interest rate, APY (annual percentage yield) obtained by the providers is unique for each Liqwid market.
4x ADA Yield Streams
Liqwid lets you put your ADA to work to generate multiple yield streams in the most secure, easily accessible user interface. The sources of yield you can capture supplying to the ADA market are:
ADA staking 5% yield,
qADA interest yield,
staked qADA yields LQ,
staked LQ yields % of borrower interest repaid.
ADA providers can delegate their coins and receive rewards in their delegated wallet while depositing ADA in the Liqwid marketplace.
The value of the ADA deposited by the provider will increase over time due to accrued interest.
This example only covers ADA lenders, with borrowers earning 50% of LQ distribution in effect there will be additional revenue streams generated from borrowing strategies (eg borrow asset, LP on DEX, stake LP tokens in secondary DeFi protocol), and it assumes majority of supplied ADA is not being borrowed to capture staking 5% yield (low utilization rate).
The risk-free rate represents the interest that an investor expects from an investment, without the fluctuation in the price of the underlying asset, during a specific period of time.
Stablecoins have a risk-free rate of 0%, because they do not have a limited supply and can be printed at any time. Cryptocurrencies with a limited offering have a risk-free rate of 2%. This risk-free rate is also used by leading DeFi lending protocols such as AAVE or Compound.
For each asset, an interest rate is calculated based on the supply / demand for that asset. The arbitrage between assets and interest rates is performed by users by supplying different assets, where a user can supply any asset supported by the protocol.
Liqwid’s interest rate models include a utilization rate defined as the twist point. Above this point, the slope of the interest curve steepens, to discourage new loans and incentivize borrowers to repay existing loans, and providers to deposit assets and capture the increased APY.
Once the system reaches the maximum utilization rate threshold on a selected asset, users cannot make any more new loans from the selected assets. The system blocks any new loan, if the supply of specific assets does not increase. Loans can still be repaid, and providers can still deposit assets in this market.
The max utilization rate threshold will default to 90-95% for most supported assets.
Governance: Liqwid DAO
A DAO is a Decentralized Autonomous Organization. It functions as a general meeting, where all the shareholders of a corporation can present proposals, and vote on changes. Each LQ token unlocks 1 voting power in the DAO, but only LQ tokens delegated to the Safety Pool during a full epoch can use their voting power to cast a vote.
DAO collects reserves to further develop the protocol, and fund developers who create products that scale adoption across the Liqwid ecosystem.
The topics of the proposals can vary, from the inclusion of new assets, to changes in the parameters of the interest rate model of a market (or any other parameter of the protocol). Also included are protocol code updates. The DAO also determines how the DAO treasury is used, to fund the improvement of the protocol or the community ecosystem.
The Liqwid Improvement Proposals (LIPs) are a way to change the operating code, decided by the LQ voting community.
The use of the DAO is decided by the members of the Liqwid community, who together form a “borderless corporate entity”. Community members have the power to submit LIPs to improve protocol, or grant proposals to create products and integrations, for users of the Liqwid ecosystem.
A governance forum has been created for the LQ community to express governance ideas, and collectively decide the future of Liqwid.
The Liqwid protocol contracts will be implemented on a public and decentralized blockchain, which means that they are not controlled by any person, group or organization. Therefore, there are no exclusive administrators of the Liqwid protocol, who have keys that access administrator functions in contracts, such as interest rate settings. All changes must be made by a vote of the LQ holders in the protocol governance contracts.
As the DAO will be responsible for deciding the future of Liqwid, each user can support the protocol by delegating LQ, participating in governance processes and voting on proposals.
The Core Team will continue to build products on top of the protocol, leveraging the SDK, and developing composable products with other DeFi protocols on Plutus. The Core Team will also remain active in the governance processes of Liqwid DAO.
Decisions are made based on a weighted vote by the LQ delegation. System changes are made whenever:
- the quorum (the minimum required number of votes) reaches 10% of LQ circulating supply, and
- positive votes reach 50,0001%.
The total voting rights correspond to the total supply of the LQ token in circulation, deducting the LQ tokens in the DAO treasury, at the moment of the voting snapshot.