Mental Models: Different Perspectives for Timeswap

Timeswap
Timeswap
Published in
6 min readMay 23, 2023

What is Timeswap?

Timeswap is an innovative AMM for fixed-term non-liquidatable loans. However, with any innovation comes the resultant confusion over what it is, how it works, why it’s needed and many other questions. These questions need to be answered for users to actually understand what they are getting into and how they can optimally utilise Timeswap!

This is the opening piece of a series we are doing to present Timeswap as a variety of mental models one can adopt to understand how time travelling works.

In this piece, we will lay out the very basic assumptions of how our pools operate, what happens to the tokens and what your assumptions should be throughout the series.

Magic Internet Maths

A Timeswap pool has a few parameters that you have to keep in mind:

  1. Asset pair: X-Y assets that act as debt and collateral assets.
  2. Transition price: The price level which changes the bias of the pool.
  3. APR: The annualised interest rate at which borrows/lends occur.
  4. Maturity date: The date at which the pool expires.

First, let us imagine a pool consisting of X and Y tokens. Let X be the primary asset and Y be the secondary asset, so most terms will be denoted in X. Moving onwards, let’s take X as USDC, and Y as ETH.

Now on to the transition price. This is the price level which determines the expected behaviour of borrowers and thus the expected outcome of lenders (i.e., whether the borrowers will repay the loans or not; which assets the lenders will receive). The parameter is set by the pool creator at the time of pool creation. Moreover, the transition price determines the overcollateralisation ratio (or in simpler terms, collateral factor).

Prices are denoted in ETH/USDC or USDC/ETH. For example, when ETH is trading at 1,000 USD and USDC is trading at 1 USDC. The (spot) value of ETH/USDC is simply 1,000. Vice versa, the (spot) value of USDC/ETH is 0.001 (1/1,000).

The APR is simply set by the supply and demand of the debt asset (X; USDC): if lenders lend more of the debt asset, the APR goes down and if borrowers borrow more of the debt asset, the APR goes up. Read the GitBook to fully comprehend the APR movements. It is important to note that your APR is fixed upon opening a borrowing/lending position, despite the current market rate moving.

Lastly, maturity refers to how long a pool runs for. The maturity date is the latest date borrowers have to repay their debt, else their locked collateral will be forfeited. Lenders will fully receive their locked-in interests at the maturity date.

Thus the four parameters harmonise as follows: for a given asset pair and transition price, the maturity date reflects the latest time at which borrowers decide to repay their debt or forfeit their collateral, thereby determining which assets lenders receive at the maturity date. In the case that borrowers pay their loan, they pay the debt and interest to unlock their collateral; lenders will receive their principal and interest. In the case that borrowers default, borrowers keep their borrowed amount; lenders will receive borrower’s forfeited collateral.

To better visualise the lending/borrowing mechanism of Timeswap, let us examine two scenarios (before maturity):

  1. Upward Expectation
  2. Downward Expectation

For the following cases, we will assume that the spot price (ETH/USDC) of ETH is 1,000.

Upward Expectation

Taking the transition price as 800 (ETH/USDC; units of USDC needed to purchase 1 unit of ETH). Remember, the spot price of ETH is 1,000.

In this scenario,

  • Borrowers borrow USDC by posting ETH as collateral.
  • Lenders deposit USDC to earn interests from the borrowers.

There can be 2 ways this plays out (for simplicity’s sake, we’ll ignore the case when spot price = transition price throughout the series).

At maturity, Spot price > Transition price

This is the ideal scenario, where no defaults are expected to happen. Let’s say the spot price of ETH remains constant (1,000) throughout the duration of the loan!

Now,

  • Borrowers pay back their USDC debt and interest to unlock their ETH collateral.
  • Lenders receive their USDC principal and earned interests.

The present value of borrowers’ USDC debt (borrowed principal and interest) is smaller than the ETH collateral they locked. Thus, they would repay their loans.

At maturity, Spot price < Transition price

This is the invalidation scenario, where defaults are expected to occur. Let’s say the spot price of ETH drops to 600!

Now,

  • Borrowers keep their USDC debt, thus forfeiting their locked ETH collateral.
  • Lenders receive ETH from the borrower’s locked collateral.

The present value of borrowers’ ETH debt (borrowed principal and interest) is larger than the USDC collateral they locked. Thus, they would default their loans.

Downward Expectation

This scenario is simply the reverse of the previous, but let’s read more to grasp the full picture!

Taking the transition price as 1,200 (ETH/USDC). Remember, the spot price of ETH is 1,000.

Here,

  • Borrowers borrow ETH by posting USDC as collateral.
  • Lenders deposit ETH to earn interests from the borrowers.

Again, there can be 2 ways this plays out.

At maturity, Spot price > Transition price

This is the invalidation scenario, where defaults are expected to occur. Let’s say the spot price of ETH increases to 1,200!

Now,

  • Borrowers keep their ETH debt, thus forfeiting their locked USDC collateral.
  • Lenders receive USDC from the borrower’s locked collateral.

The present value of borrowers’ ETH debt (borrowed principal and interest) is larger than the USDC collateral they locked. Thus, they would default their loans.

At maturity, Spot price < Transition price

This is the ideal scenario, where no defaults are expected to happen. Let’s say the spot price of ETH remains constant (1,000) throughout the duration of the loan!

Now,

  • Borrowers pay back their ETH debt and interest to unlock their USDC collateral.
  • Lenders receive their ETH principal and earned interests.

The present value of borrowers’ ETH debt (borrowed principal and interest) is larger than the ETH collateral they locked. Thus, they would repay their loans.

Below is a diagram that summarises the expected outcomes of Timeswap pools based on the relationship between transition price and the spot price at maturity.

Only the start…

So, we went through 4 distinct scenarios today. This was a relatively simple start, but understanding this brings you miles deeper into our product!

For the upcoming series, we will be presenting several concepts familiar to you to even better understand Timeswap! You can use these as an abstraction layer to Timeswap, and even possibly come up with your own product built on top of the Timeswap layer! Spooky, right?

We leave you today here. Don’t forget to tune back in for the next part in the series, Time Traveler!

Here’s a glimpse of some concepts we will be sharing with you:

  • Timeswap as a dual investment product
  • Timeswap as an options market
  • Timeswap as a lending market, as it is

--

--