Concepts
Last updated
Last updated
Basics to know when building on Quokka Lend.
Liquidity Protocol
A liquidity pool in Quokka is a market instance where users can supply or borrow assets. Governance-approved parameters, like reserve configurations and collateral thresholds, define each pool. Suppliers deposit liquidity that borrowers can access through overcollateralized loans. Suppliers earn interest, while borrowers gain liquidity against their collateral, all managed via decentralized smart contracts.
Quokka pools run on a blockchain network, governed by parameter decisions that balance liquidity demands with risk management. Smart contracts enforce these parameters and automate borrowing, repaying, and liquidation processes, ensuring transparency, efficiency, and security without intermediaries. Supply
Supplying tokens to the Quokka Lend allows users to earn interest and use their assets as collateral. When supplied, tokens are deposited into Quokka's liquidity pools, managed by smart contracts that enable overcollateralized borrowing. Interest accrues dynamically based on the market supply rate, with balances increasing automatically as rates adjust.
Interest rates are driven by the borrow utilization rate—reflecting the proportion of borrowed assets to total supply—and governance-defined parameters, such as collateral requirements and interest rate models. These factors rely on on-chain inputs like token balances, oracle prices, and utilization ratios. As liquidity flows in and out of the pool, interest rates adjust in real time, ensuring efficient allocation of assets. Borrow Borrowing tokens from the Quokka lend provides users with liquidity by leveraging their supplied tokens as collateral, allowing access to capital without selling assets. However, borrowers risk liquidation if their collateral value falls below the required threshold. Interest rates are dynamic, influenced by utilization rates, protocol parameters, and governance decisions. As utilization increases—reflecting higher borrowing demand—interest rates rise accordingly. Each reserve is designed with specific parameters to balance incentives for borrowers and suppliers.
To avoid liquidation, borrowers should monitor their collateralization levels and maintain a healthy health factor. This ensures borrow positions remain overcollateralized, even as market conditions fluctuate or interest accrues. Repay Repaying borrowed tokens in the Quokka Lend is essential for managing borrow positions. Borrowers can repay using the same tokens they borrowed or with qTokens (collateral tokens) of the same underlying asset. Periphery contracts further simplify the process, enabling repayment with other tokens, such as collateral assets, without the need for manual conversion. This flexibility streamlines position management and closure.
Repayments increase the collateralization ratio, reducing liquidation risk. By boosting collateral relative to borrowed amounts, repayments protect assets from liquidation and allow borrowers to withdraw part of their collateral safely. Withdraw
Quokka Lend allows users to withdraw their supplied tokens, including accrued interest, provided there is sufficient unborrowed liquidity in the reserve. Withdrawal amounts depend on the availability of the underlying assets and the user’s ability to maintain a sufficient collateral ratio for any active borrow positions. Periphery contracts, such as those with “withdraw and switch” features, enable users to redeem their liquidity in a different token, offering greater flexibility in asset management.
When withdrawing with an active borrow position, it is essential to maintain a healthy collateralization ratio to avoid liquidation. Reducing collateral lowers the health factor and increases liquidation risk. To stay safe, users must ensure their account remains above the liquidation threshold after withdrawal. Careful management of borrow positions is key to avoiding unintended liquidations. Liquidations
The health factor is a key metric in the Aave Protocol that measures the safety of a borrow position. It is calculated as:
Health Factor = (Total Collateral Value × Weighted Average Liquidation Threshold) ÷ Total Borrow Value
A health factor below 1 indicates a risk of liquidation. The liquidation threshold, determined by Quokka Governance, defines the maximum percentage of an asset's value that can be borrowed. For instance, if a user supplies $10,000 in ETH with an 80% liquidation threshold and borrows $6,000 in GHO, the health factor would be 1.333.
A health factor above 1 means the position is safe from liquidation, but regular monitoring is critical as the health factor fluctuates with changes in collateral and borrow values. Users can improve their health factor by supplying more collateral or repaying borrowed assets. If collateral value rises, the health factor improves; if it falls, the risk of liquidation increases.
There is no universally "safe" health factor, as it depends on asset volatility and correlation. Lower health factors might be acceptable for correlated assets like stablecoins or assets tied to ETH.
Liquidation occurs when the health factor drops below 1, signaling insufficient collateral to cover the borrowed amount. This can happen if collateral value decreases or the borrowed amount increases. During liquidation, up to 50% of the borrower’s debt is repaid by a liquidator, and a liquidation fee is applied to the collateral. Liquidations are permissionless, allowing any network participant to initiate them.
Liquidation is competitive, requiring deep protocol knowledge and technical skill. Liquidators actively monitor positions, react to market changes, and prioritize transactions to execute liquidations swiftly. Risks
Quokka Lend provides decentralized access to liquidity but is not without risks. To address these, the protocol implements robust risk management measures, including smart contract audits and governance frameworks. Below is an overview of key risks and mitigation efforts:
1. Smart Contract Risk Smart contracts may contain bugs or vulnerabilities in the protocol code or underlying reserve tokens. To mitigate this, Quokka’s code is open-source and has undergone multiple external audits. Proposed changes are reviewed and approved by the community, and a continuous bug bounty program incentivizes developers to identify and report issues for prompt resolution.
2. Oracle Risk Quokka relies on third-party oracles for price feeds and external data, such as redemption ratios for liquid staking tokens. To minimize risks like incorrect valuations, Quokka uses decentralized oracles, such as Pyth, which provide tamper-resistant data feeds with enhanced reliability and security.
3. Collateral Risk Collateral values can fluctuate, creating risks of under-collateralization or bad debt. Quokka mitigates these by setting parameters like loan-to-value (LTV) ratios and liquidation thresholds. These are continuously monitored by risk service providers and can be adjusted by Quokka governance to respond to market conditions.
4. Network and Bridge Risk Operating across multiple blockchains and bridges introduces risks like congestion, censorship, or security vulnerabilities. Quokka Governance addresses this through a rigorous network onboarding framework that thoroughly vets new networks and bridges. Community oversight ensures secure and reliable integrations.
For more information on Quokka Protocol’s risk management, see Security & Audits. Flash Loans
Flash Loans are unique transactions that allow users to borrow assets without collateral for a single block, provided the borrowed amount and a fee are repaid within the same block. Often called "One Block Borrows," Flash Loans leverage the way blockchain state is managed within a block.
Flash Loans enable advanced features such as repaying debt with collateral, switching collateral, and more. Tools like DeFi Saver, Instadapp, and Furucombo integrate Flash Loans, making these features accessible.
Flash Loans let users borrow from a pool’s reserves (if enabled) for one transaction, requiring repayment plus a fee— 0.05% in Quokka V3—or the opening of a borrow position within the same transaction.
Flash Loans are primarily designed for developers due to the technical expertise required. To execute a Flash Loan, users must create a custom contract to request the loan. For more details, see the developers' guide.