01-31, 09:00–09:20 (Europe/Zurich), Sepolia Stage
Liquity V2 allows borrowers to set their own interest rate in exchange for a certain risk level (loss of exposure upon stablecoin redemption). To facilitate the ongoing rate management for passive users, we built an automation system on the ICP that adjusts interest rates efficiently in a decentralized way.
The system makes use of the ICP's Ethereum integration and timers to continuously monitor the user's redemption risk, submitting interest rate update transactions as needed. By charging a small management fee, the system covers its own operational costs (ICP cycles and Ethereum gas costs) and is thus self-sustaining.
Liquity V2:
Running on Ethereum mainnet, Liquity V2 is a decentralized protocol that allows users to borrow its native stablecoin BOLD against collateral (ETH, wstETH and rETH). One of its key innovations is the ability of borrowers to set and adjust their own interest rates.
Borrowers with the lowest interest rates have the highest risk of being affected by redemptions: when BOLD is trading below $1, arbitrageurs have an incentive to buy BOLD and redeem it at face value for collateral, which is taken from the borrowers in ascending order of interest rate. Given that their debt is reduced equally, low-rate borrowers thus face losing exposure to ETH and are incentivized to keep their rates sufficiently high depending on the market conditions.
As the deducted interests are paid out to BOLD depositors, Liquity V2 creates a market between borrowers and stablecoin holders, stabilizing the peg at $1 without relying on governance or complex algorithms.
Borrowers can delegate their interest rate management to third parties or smart contracts. The presented autonomous rate management system offers a single conservative interest rate strategy for each collateral asset (ETH, wstETH and RETH) to minimize redemption risk. A strategy takes several metrics into account for triggering interest rate adjustments, including the current "debt in front", redemption fee and the time since the last adjustment.
Internet Computer:
The Internet Computer Protocol, ICP for short, provides a tamper-proof general purpose compute platform with minimal trust assumptions. On ICP, anyone can create and run online services without relying on big companies' servers. ICP coordinates a network of servers in independent data centers, free from corporate clouds and other costly or insecure intermediaries. The goal of ICP is to create a new, open internet that offers users more control and better security. This vision is often described as a "World Computer," where everything runs on a decentralized network.
In more technical terms, ICP brings the concept of serverless cloud services to the public internet. ICP hosts canisters, an evolution of smart contracts that hold both the code and the data (state) of application programs. Canisters can interact with web browsers, mobile apps, and other canisters. Today, 860,000 canisters storing 6.5 TB of data and executing more than 90,000 millions of instructions per seconds run on ICP.
In addition to the low latency (~1-2 seconds) and high real time throughput (3000 tps over the last 30 days), ICP offers the ability to canisters to execute code after a specified time interval without an external trigger via timers. To interact with Ethereum, as well as other chains using the Ethereum Virtual Machine (EVM), canisters can send transactions to EVM chains nodes and get EVM chain data from several EVM chains.
With a threshold ECDSA protocol, ICP nodes collaboratively produce signatures on transactions which are verifiable by Ethereum, despite malicious nodes and even under adverse networking conditions. This is used by the EVM RPC canister which serves as a gateway for communication between canisters and EVM-compatible blockchains, by sending requests to RPC providers and achieving consensus on their responses to ensure reliable and decentralized interaction with EVM chains on other canisters’ behalf.
Autonomous rate management system:
Due to Ethereum’s limited performance and gas constraints, running extensive calculations on Ethereum Mainnet would be prohibitively expensive, if not impossible. As a consequence, a decentralized and autonomous interest rate management system has been built. It consists of batch manager contracts on Ethereum Mainnet and an interest rate management canister hosted on the Internet Computer.
Each batch manager contract has a pre-registered externally owned account (EOA) as its owner which is the only address authorized to perform interest rate adjustments on behalf of the delegating loans. The EOAs have been generated in a safe manner via ICP’s threshold ECDSA signature generation scheme described above. This means that no entity knows the EOA’s private key and only a qualified majority of the ECDSA nodes can collectively sign transactions for the respective address.
The IR canister is triggered by a timer periodically to check whether the conditions for an interest rate adjustment are satisfied. To this end, the IR canister fetches data from the Liquity v2 core contracts via ICP’s Ethereum Integration. If the rate changing conditions are satisfied, the IR canisters crafts an Ethereum transaction, obtains a threshold-signature on the transaction for the respective EOA and then submits the transaction to the Ethereum network.
The IR canister has a built-in fault tolerance mechanism that may resubmit transactions that fail for various reasons.
To cover the cost of the resources consumed to manage a user’s interest rate, the batch management contracts charge a fee. A part of this fee is used to increase the EOA’s ETH balance. On ICP each canister has a cycle balance, which is decreased based on the resources a canister uses, analogously to a pre-pay model. To keep the IR canister’s cycle balance above a predefined threshold, a part of the fees accumulated by the batch management contracts is converted to cycles. In essence, the fees collected replenish the balances needed on both Ethereum and ICP in a sustainable and autonomous manner.
Robert Lauko is the Founder and Head of Research at Liquity. Holding a Ph.D. in Law from the University of Zurich, Robert served as a law clerk at the Swiss Federal Administrative Court and in various other legal roles, before turning into a Blockchain researcher at DFINITY (Internet Computer). In late 2019 Robert decided to found his own stablecoin and borrowing project Liquity.
Yvonne-Anne’s research is centered around distributed systems, ranging from the design and analysis of algorithms for reliable and efficient distributed systems despite failures and malicious behavior to complex network analysis.
After 10 years of working in industrial research labs, Yvonne-Anne joined DFINITY, where she leads teams of researchers and engineers building and improving the Internet Computer.
The Internet Computer allows you to build powerful, decentralized apps, 100% onchain, incl the frontend, at web speed.