Introduction

The content below will explain how ThorFi, Thorchain’s new lending system, will work. The key objective is to show an accurate representation of the system’s behavior and provide the necessary technical documentation so that users can understand all risks before the product goes live.

This is not an economic assessment or investment memo of the $RUNE asset. However, given the new growth opportunities that might arise with this product’s expansion, doing an in-depth economic review of $RUNE is not something that we discard for a potential future release… (update: read our dedicated $RUNE insight here)

Overview

Current Price

Current Marketcap

TVL

With ThorFi, Thorchain realizes its vision to enable 3 important financial primitives: swapping, saving, and lending. Users will be able to lend one asset on one chain and borrow another asset on a different chain. 

Insight ThorFi 1

Main Features

Lending allows users to deposit native collateral, and then create a debt position at a collateralization ratio CR (collateralization ratio). 

  • All loans have 0% interest.
  • No liquidations.
  • Loans have no expiration and can be repaid in any asset.
    • A minimum loan period can apply – not currently set

Risk is managed with limits on collateral for each pool, slip-based fees when opening and closing loans, dynamic CR, and a circuit breaker on the $RUNE supply.

This benefits the protocol by increasing:

  • capital efficiency of the pools – which increases the system’s income and real yield.
  • trading volume and fees.
  • the total amount of $RUNE that is bonded, allowing Thorchain to scale.

The debt is always denominated in USD (aka $TOR) regardless of what L1 asset the user receives.

It is worth noting that $TOR is a non-transferable unit of account with a market cap of $0. It is designed to match the value of $1 within Thorchain. All collateral, debit, and repayments are converted to and accounted for in $TOR (more information in the Derived Assets section).

How It Works

Even though the product is presented as a lending product, it functions like an option. For instance, if you give 1 $ETH to the protocol and borrow against it at 50% LTV, then you are able to borrow cash and are given the opportunity to buy 1 $ETH for that amount of cash.  To conceptualize this idea, the borrower is not really borrowing, since their position cannot be liquidated and they never have an obligation to pay off the loan. Because of that, the user has no debt, and calling it a borrower can be a misnomer.

Instead, the user is buying a perpetual call option, and since these are deep-in-the-money, re-strikable options, this makes it resemble an actual loan. The borrower does not have an obligation, but rather an opportunity, whereas ThorFi does have an obligation as the counterparty to the option owner.

When making analogies to traditional lending models in DeFi, like Aave or Compound, we can see that the roles are inverted. In standard DeFi lending protocols, the collateral is locked in a smart contract and can be accessed by either the borrower or a liquidator.

  • In order to retrieve the collateral, the borrower must repay the loan.
  • Liquidators have the possible opportunity to seize the collateral of the borrower and sell it on the market if the borrower defaults on their debt and proves to be insolvent. 

By using a smart contract to lock the assets, the lending protocol is able to switch the opportunity and obligation costs between the parties involved. However, this is not the case in ThorFi. Since there is no smart contract involved in locking the collateral assets, the protocol itself can do whatever it wants with the collateral. 

For instance, when a user deposits 1 $ETH in Thorfi at 50% LTV, ThorFi sells 50% of the deposit and gives the proceeds to the option buyer (or borrower). Hence, selling the collateral is the first thing that occurs, unlike in lending markets like Aave, where the collateral is sold in the last step to liquidate a position. Similarly, when the user repays, they are effectively exercising a call option, and the purchased asset ($ETH in this case) is coming from ThorFi, which is the counterparty. As the user repays their debt, the protocol now can take the capital to buy $ETH and return it. Since the protocol is acting as a counterparty, rather than a vault locking asset, it simply does what it needs and when it needs it (e.g. buy $ETH to return it to the borrower whenever it repays their loan or exercises their option).

From the protocol’s perspective, and given its role of being the counterparty, we can also analyze the scenario of selling deep-in-the-money options. And since these contracts are perpetual, the re-strike pricing makes it so that you can come up with the terms “interest-free”, “unliquidatable” line of credit. In any event, ThorFi receives the sum of the proceeds from the option sale, the return on the option purchase proceeds, and the proceeds from exercising the option. 

  • If the total proceeds exceed the cost of buying 1 $ETH to honor the option exercise, the protocol makes a profit.
  • If the total proceeds exceed the cost of selling 1 $ETH to honor the option exercise, the protocol incurs a loss.

But since the capital is not locked (unlike in Aave or any other lending market smart contracts), ThorFi itself can use the capital to generate returns on the proceeds from the option sale.

Interest Rates

While interest rates are often used to collect income on collateral, this increases the propensity of users to pay back their loans. In the case of ThorFi, the system is designed so that it scales most when users elect to have very long-term loans, or never pay them back.

From the point of view of ThorFi, the loan facilitator, 0% interest rates are the most desirable way to ensure that users are least likely to pay back. The reason for that is because their principal is never eroded. 

Despite the absence of interest payments, users will pay slip-based fees when they enter or exit their position, which both increases yield for LPs/nodes as well as burn $RUNE permanently.

Potential Adoption

The goal of introducing lending is to attract fresh new capital to the ecosystem for new users to scale liquidity, which will improve both the TVL and the security of the network. This has a positive side effect for the network as well since it will drive up the pools’ capital efficiency, increasing the protocol’s income and real yield.

Scaling Liquidity

The economic reasoning is that ThorFi will help the network to further scale its liquidity. Up until now, due to PoL and Savers, the network is likely to max out pooled $RUNE and send all yield to nodes. Because of that, the protocol stops scaling until it can recruit new nodes, but this takes time. 

Lending is a faster mechanism to scale security (and TVL) as a way to attract new capital, buy out the $RUNE from the pools, and open up caps again. 

This is enforced by the lending design itself: whilst loans are opened, a net reduction in the availability of $RUNE in the pools is created, allowing more TVL to enter. At the same time, the system implicitly is placing bids on $RUNE, allowing not only the security of the network to increase but also to boost the value of block rewards. 

Contracting Safely

On the other hand, as borrowers start paying back their loans, this reverses the above sequence of events, and the system contracts. $RUNE is then minted and sold, causing sell pressure on the asset and increasing the $RUNE supply.

However, the CR will start dropping for new loans, until a new equilibrium point is hit and new loans are opened under favorable CR terms. This stops a runaway bank run on loans.

Derived Assets

The system works through the implementation of derived assets. Derived assets, such as thor.btc, thor.eth, or thor.tor are algorithmic tokens backed by the liquidity of $RUNE, which is based on the liquidity available for the $RUNE-ASSET pair. This makes it possible to swap derived assets to and from the underlying L1 assets via $RUNE, using Thorchain’s derived asset pools, which are based on the equivalent L1 pools. 

Unlike synthetic assets, derived assets are independent of liquidity pools and all swap fees are burnt. They are intended to be used for accounting purposes only and cannot be transferred or held by users themselves.

$TOR Accounting

Debt is accounted for in $TOR, a non-transferable unit of account within Thorchain that is designed to match the value of $1USD, and that has been in use since ADR-003. Like derived assets, it cannot be transferred or held by users. 

  • $TOR always has a market cap of $0.
  • $TOR is valued by taking the median price of the active $USD pools. 

Loans

Loans can be partially paid back. However, the collateral of loans is not returned until the loan is fully repaid. 

  • When a loan is opened, $RUNE is burned – collateral is swapped into $RUNE and burned.
  • When a loan is closed, $RUNE is minted – $RUNE is minted and then swapped into the collateral. 

Note that the amount of $RUNE burned is not the same as the amount of $RUNE minted – it can be more or less. Lending activity is intended to burn more $RUNE than it mints, thereby reducing the circulating supply and increasing the demand for $RUNE.

Opening Loans

In order to open a loan, users deposit a native asset as collateral and take on debt in any other native asset. Internally, all debt is accounted for in $TOR.

Example to borrow $ETH using $BTC as collateral:

  1. User deposits $BTC as collateral (BTC.BTC -> $RUNE, $RUNE -> thor.btc).
  2. thor.btc is held as collateral in the Lending module.
  3. The value of thor.btc held as collateral is accounted for in $TOR terms. 
  4. The debt in $TOR is based on CR and collateral $TOR value.
  5. The system mints $TOR.
  6. $TOR -> $RUNE, $RUNE -> L1 asset (e.g. – $ETH)

Insight ThorFi 2

Closing and Repaying Loans

Loans can be repaid at any time with any asset, and partial repayments are allowed. However, note that the collateral can only be fully claimed after full loan repayment.

  1. The L1 native asset used to repay is converted to $RUNE (optional, since users can also pay back in $RUNE).
  2. $RUNE is used to mint $TOR.
  3. $TOR is burned and the corresponding amount is deducted from the loan’s debt.
  4. The derived asset (thor.btc) is burned to mint RUNE – the burned amount is the same percentage of the collateral as a percentage of the loan debt that has been paid.
  5. $RUNE is swapped for the layer-1 native asset that was used as collateral ($BTC in the example above)
  6. The collateral is returned to the loan originator. 

Insight ThorFi 3

Derived Pools

A derived pool is created for each derived asset, including $TOR. This enables swapping between L1 assets and derived assets going through $RUNE. 

The liquidity depth of derived pools expands and contracts to throttle the amount of slippage users pay when swapping from an L1 asset to a derived asset. For instance, when there is high volatility, the pool depth contracts in order to increase the slippage on swaps during this period of time. This incentivizes users to wait until volatility decreases and they can enter/exit their lending positions at a better price. This mechanism also protects the system against pool manipulation. 

Insight ThorFi 4

$TOR Derived Pool

The $TOR pool is a derived asset pool that operates like other derived asset pools except that the $TOR price is determined as the median of the system’s $USD pools ($BUSD, $USDC, $USDT) instead of one L1 asset pool.

Insight ThorFi 5

Risk Parameters

The anchor pool depth for a given asset is primarily controlled by two parameters – the “Anchor Blocks” and “Max Anchor Slip” parameters. This helps to protect the system against potential short-term price manipulations.

Insight ThorFi 6

Insight ThorFi 7

Other considerations:

  • Derived Asset Pool depth ranges from derivedMinDepthto 100% of L1 asset but is reduced by totalSlip. 
    • Target is 90% – 100%.
  • Derived Asset Pool spawn as required within a block and derived asset swaps are processed after all L1 swaps within the swap queue.
Example

Consider a scenario with 10 anchor blocks and the max anchor slip being 50%:

  1. If the price increases by 5% per block on an L1 pool over 10 blocks, then the slip is 50% and the depth of the derived asset pool approaches 0.
  2. If the price oscillates by 5% (up 5% then down 5%) on an L1 pool over 10 blocks the price is the same, but since we slipped 50% in aggregate, the depth of the derived asset pool still approaches 0.
  3. If the price oscillates by 1% (up 1% then down 1%) on an L1 pool over 10 blocks the price is the same, but since we slipped 10% in aggregate, the depth of the derived asset pool is 80% of the depth of the L1 (100% – 10/50).

The Anchor Pool depths apply to all swaps in loans opened and closed for all L1-derived assets and $TOR. The $TOR asset is like any other derived asset, except that it uses the median (not the average)  price across all stablecoins and the total RUNE depth across all stablecoin pools.

If the price is manipulated, and no trades are made for that full anchor block window, then the derived asset pool will be as deep as the L1 and a malicious actor could successfully attack the protocol and profit. Thus, the anchor block window should be set high enough such that no attacker could prevent other actors from making trades for the full window. 

Once that window is determined, it is possible to look at periods of low, normal, and high volatility to determine the max anchor slip, which effectively acts as a damper on sensitivity.

Lending Controls

Lending is capped by limiting the collateral that can be received by the protocol. This is a way for the system to protect itself against situations where $RUNE underperforms the collateral.

Collateral Limits

The system throttles the amount of RUNE available for lending, in basis points. This is called the lendingLever.

Insight ThorFi 8

totalAvailableRuneForProtocol is distributed among pools available for lending based on their RUNE depth.

For example, if the lendingLever is 33%, then that means that 33% of the burned $RUNE can be used as collateral in the protocol as a whole.

Insight ThorFi 9

For each lending pool, the amount of totalAvailableRuneForProtocol (tarfp) is:

Insight ThorFi 16

For each asset pool, the $RUNE value is converted to the asset’s terms. This imposes a collateral holding limit for each pool so that a new loan cannot be opened if the new gross collateral exceeds this amount.

Collateralization Ratios (CR)

The CR is dynamic and increases as loans are opened within a pool and reduces as the loans are repaid.

Insight ThorFi 11

The CR is adjusted based on how many loans are taken out.

Insight ThorFi 12

As more loans are taken out, the collateral limits are increased and so does the CR. The higher the collateralization ratio, the safer the system becomes.

The network can adjust the MinCR and MaxCR to change how much can be taken out in debt given the same collateral.

Insight ThorFi 15

Debit

Debit is calculated based on the collateral provided and the CR of the pool.

Insight ThorFi 13

Insight ThorFi 14

The $TOR Debt is swapped to the requested L1 asset and then transferred to the user (slip fees apply).

Loan Repayment Maturity

Even though loans have no expiration, there is a protocol setting, LoanRepaymentMaturity that defines the number of blocks before a loan can be repaid/closed. 

Economic Impact

Lending activity is intended to burn more $RUNE than it mints, thereby reducing the circulating supply and increasing the demand for $RUNE.

  • Opening new loans creates a deflationary effect on $RUNE.
  • Closing loans creates an inflationary effect on $RUNE.

Therefore, assuming a loan taken out with $BTC as collateral, if the value of $RUNE relative to $BTC is the same when the loan is opened and closed, there is no net inflationary effect on $RUNE (same amount burned as minted minus the swap fee). 

However, the lending activity could also mint more $RUNE than it is burned. If the value of the collateral asset increases relative to $RUNE between the time the loan is opened and closed, there will be net inflation of $RUNE supply. 

Lending controls are in place to address these concerns.

Risks

The primary risk comes when more $RUNE is minted than it is burned. This increases the native $RUNE supply. This concern arises in two scenarios where external parties directly or indirectly extract value from the system:

  • Long-term market conditions, where $RUNE under-performs the collateral.
  • Short-term manipulation of asset prices.

To mitigate this problem, the following measures are in place:

  • The lendingLever controls the amount of collateral that the network can accept.
  • The protocol keeps track of a CR to control the amount of debt that can be taken out of the system for a given collateral asset (by setting a MinCR and MaxCR). 
  • Each pool has its own risk profile (i.e. $BTC and $ETH have different risk parameters than other assets).

The CR and lendingLever are two sides of the same coin, where one is a counterbalance to the other. While the lendingLever controls how much collateral can be accepted by the network, the CR controls how much debt can be taken out from the network.

  • The lendingLever parameter is intended to protect against the scenario where $RUNE under-performs the collateral over an extended duration of time. Effectively this is a global cap on the amount of loan collateral allowed as a percentage of the difference between the current supply and the max supply (500M RUNE). 
  • A dynamic anchor pool depth for derived assets is the primary protection against short-term price manipulation. Since a fixed trade size in a shallower pool will pay a higher fee, the system can protect against price manipulation by decreasing the pool depth of swaps that mint or burn $RUNE for derived assets when there is price volatility on the corresponding L1 pool(s).

As another mechanism for risk contingency, in case the above measures don’t work, there is a circuit breaker that will be fired. If a loan repayment were to cause the total $RUNE supply to exceed the maximum supply of $500M, then the required $RUNE to release the collateral will be taken from the Reserve and not minted. Next, loans can be redeemed/closed but not opened.

The network enforces that the total supply of 500M $RUNE cannot be exceeded. 

More specifically, if the $RUNE price drops drastically against the majority of its collateral assets (L1 gas assets), then net inflation of $RUNE will occur when users start paying back their loans, causing the system to exceed the margin of $RUNE that has already been burned. This inflation could hit the breaker limit. 

At this point, the system pauses the system to prevent the creation of new loans while still allowing the rest of the Thorchain features to keep functioning. Consequently, no further inflation of $RUNE can occur and the Reserve will cover the remaining collateral payouts.

Undesirable System States That Must Be Avoided

  • Creating conditions, even with the protections outlined above, where closing loans creates the potential to inflate $RUNE.
  • Creating conditions where $TOR loses its peg to anchor pools.
  • Creating conditions where derived asset pools fail to throttle volume appropriately.

Key Takeaways

  • With ThorFi, Thorchain expands its operations to enable three significant financial primitives: swapping, saving, and lending.
  • The key features of ThorFi lending include 0% interest rates, no liquidations, loans without expiration, and the ability to repay loans in any asset. 
  • Lending activity increases the capital efficiency of existing pools, leading to higher income and real yield. It also attracts fresh capital to the ecosystem, scaling liquidity, improving Total Value Locked, and enhancing the network’s security.
  • Risks are present, primarily related to the potential net inflation of $RUNE when its value under-performs collateral assets or during short-term price manipulations. 
  • Risk management is achieved through limits on collateral, slip-based fees, dynamic CR, and a circuit breaker on the $RUNE supply.

Links

Revelo Links

Disclosures 

Revelo Intel has never had a commercial relationship with Thorchain and this report was not paid for or commissioned in any way.

Members of the Revelo Intel team, including those directly involved in the analysis above, may have positions in the tokens discussed.

This content is provided for educational purposes only and does not constitute financial or investment advice. You should do your own research and only invest what you can afford to lose. Revelo Intel is a research platform and not an investment or financial advisor.