# Protocol Due Diligence: [ Liquity ] [ToC] ## Liquity Overview - [Site](https://www.liquity.org/) - No Governance - [Team](https://www.liquity.org/team) - [Docs](https://docs.liquity.org/) - [Audits and due dilligence disclosures](https://docs.liquity.org/documentation/resources#security-audits) Liquity is a decentralized borrowing protocol that allows you to draw interest-free loans against Ether used as collateral. Loans are paid out in LUSD (a USD pegged stablecoin) and need to maintain a minimum collateral ratio of 110%. Liquity as a protocol is non-custodial, immutable, and governance-free. It had $500M TVL on the 17th of January 2023. It's been in production since the 11th of April 2021. Max TVL was $4.52b on the 11th of May 2022. https://defillama.com/protocol/liquity Analytics: https://dune.com/dani/Liquity ## Rug-ability **Multi-sig:** Non-custodial **Upgradable Contracts:** No, all contracts are fully immutable. **Decentralization:** Decentralized from the start. ## Misc Risks - **LUSD price:** Liquity has implicit and explicit mechanisms that ensure that LUSD will closely follow the price of USD. Mechanisms that use direct arbitrage opportunities are called “hard peg mechanisms”, and there are less direct processes “soft peg mechanisms”. Detailed info on price mechanisms: https://www.liquity.org/blog/on-price-stability-of-liquity ![LUSD-price-graph](https://i.imgur.com/jUYRtOF.png) - Hard peg is oriented to keep the price floor at USD 1. LUSD tokens can be returned to the protocol (redeemed) in exchange for an ETH amount worth of returned LUSD. - Hard peg ceiling is at USD 1.10. The minimum collateral ratio of 110% creates a natural price ceiling of USD 1.10. When the LUSD:USD exchange rate exceeds that level, borrowers can make an instant profit by borrowing the maximum amount against their collateral and selling the LUSD on the market for more than USD 1.10. - **Price oracle:** The Liquity contracts rely on the Chainlink for retrieving the ETH price in USD. Under [extreme conditions](https://docs.liquity.org/faq/stability-pool-and-liquidations#what-oracle-are-you-using-to-determine-the-price-of-eth) it falls back to the Tellor oracles. - **Recovery Mode:** When the total collateralization ratio (TCR) falls below 150% the system enters [Recovery Mode](https://docs.liquity.org/faq/recovery-mode). During Recovery Mode, the liquidation threshold is raised from 110% up to the current TCR, and the system blocks borrower transactions that would further decrease the TCR. This must be taken into account to avoid unexpected losses. - **Borrowing Fees** - One-time fee is applied on opening a Trove in the amount of 200 LUSD. It is returned upon repayment of debt or lost if the Trove gets liquidated. - [Borrowing fee](https://docs.liquity.org/faq/borrowing#how-is-the-borrowing-fee-calculated) is added to the debt of the Trove and is given by a base rate. The fee rate is confined to a range between 0.5% and 5% and is multiplied by the amount of liquidity drawn by the borrower. - [**Redemption Fee:**](https://docs.liquity.org/faq/lusd-redemptions#how-is-the-redemption-fee-calculated) is given by the formula `(baseRate + 0.5%) * ETH`. Redemption is not the same process as repaying debt, so this fee won't accrue in the standard flow. Redemption is the process of exchanging LUSD for ETH at face value as if 1 LUSD is exactly worth $1. That is, for x LUSD, you get x Dollars worth of ETH in return. ### Audit Reports Audits are listed here: https://docs.liquity.org/documentation/resources#security-audits Bug bountry: https://docs.liquity.org/documentation/bug-bounty All high risk findings are fixed. ### Anything else Liquity released a new protocol [Chicked Bonds](https://www.chickenbonds.org/), which uses LUSD bonds for enhanced yield than just supplying to Liquity stability pool. Due diligence for this protocol is in [new document](https://hackmd.io/QSgCpQKcTxyHGTEt6u3wAQ). LUSD price can be [shifted for a small amount using Chicken Bonds](https://docs.chickenbonds.org/faq/lusd-peg-stability#_23o3nwmv9ci2), in practice, this is 1 +/- 0.0004. This can be utilized by the strategy if it needs to buy LUSD to repay their Trove may decide first to use Chicken Bonds to shift system funds to Curve before buying their LUSD. After the shift, they can buy LUSD at a better price closer to 1.0. Keep in mind that the shifter has a [countdown period of an hour](https://github.com/liquity/ChickenBond/#shifter-countdown-period-and-shifting-window) after which the funds can be shifted. ## Strategy Details The strategy leverages ETH in Liquity to borrow LUSD. With LUSD, the strategy can supply it to lending protocol like Aave. Another option is to supply LUSD to the stability pool to earn ETH from Trove liquidations and also earn LQTV rewards. Both strategies are in production for LUSD yVault: https://yearn.watch/vault/0x378cb52b00F9D0921cb46dFc099CFf73b42419dC. Liquity charges no interest rate, making it the most cost-effective venue for long term positions. The 0.5% initiation fee is cheaper than 2% borrowing APY as soon as the position is held for more than three months. However, this initiation fee is unfavorable for short-term positions, such as just a few weeks, where an interest rate is preferable to reduce the effective cost of borrowing os the strategy must be planned for a longer term. ## Path-to-Prod - **Suggested position in withdrawQueue?** Near the end to avoid fees. - **Does strategy have any deposit/withdraw fees?** Yes, deposit fee, see Borrowing Fees section: https://hackmd.io/EvPzqDLeTPyv0nLl3-YvEQ#Borrowing-Fees - **Suggested debtRatio?** - **Suggested max debtRatio to scale to?** ### Testing #### Ape.tax - **Will Ape.tax be used?** Yes - **Will Ape.tax vault be same version # as prod vault?** Waiting for new vault, version 0.4.5, for WETH - **What conditions are needed to graduate? (e.g. number of harvest cycles, min funds, etc)** Be profitable, no locked funds at any moment. ### Prod Deployment Plan - **Strategy current APR:** will change based on utilization of LUSD on lending protocol. See current status: https://yearn.watch/vault/0x378cb52b00F9D0921cb46dFc099CFf73b42419dC - **Does Strategy delegate assets?:** No - **BaseStrategy Version:** 0.4.5 - **Target Prod Vault Version:** 0.4.5 ### Emergency Plan - **Shutdown Plan:** Withdraw all LUSD, repay LUSD to Liquity and return WETH - **Things to know:** After closing Trove, 200 LUSD will be returned. - **Scripts / steps needed:** - **Is it safe to...** - call EmergencyShutdown - remove from withdrawQueue - call revoke and then harvest