Tezos Finance | On-Chain Lending

Decentralized on-chain lending/borrowing for Tezos DeFi

Kevin Mehrabi
Tezos Finance
11 min readJan 26, 2021

--

Tezos Finance (aka ‘Tezfin’)—[EDIT: mainnet beta launched Q3 2022, and mainnet production launched Q1 2024]—is the first decentralized on-chain lending platform (conceptually akin to Compound or Aave) that will operate on Tezos blockchain.

TezFin UI preview published Sept 9 2021

[I first wrote the prelude to this a year ago in an article titled On-Chain Lending — with Tezos. Since then, evolutions of some concepts have been made for implementations on Tezfin, while other aspects are being saved for future iterations of Tezfin.]

Tezfin enables lending and borrowing of fungible Tezos crypto-assets, including tez (XTZ) and Tezos-based tokens built to the FA token standards. Unlike other Automated Interest Rate Maker protocols — that is, those on other blockchains (e.g. Compound, Aave)—Tezfin is designed to work in a compatible manner with Tezos DeFi products that also accommodate the Tezos universal standard FA-standard/TZIP (like ERC-standard on Ethereum) ecosystem and its co-habitants including all currently tradable assets USDtz, tzBTC, STKR, and marketplaces like Dexter and Quipuswap.

Motivation

An automated lending platform is conducive to a self-sustaining Tezos DeFi ecosystem; a ‘Primordial Triad’ or ‘Layer One Trifecta’ if you will; the final major tentpole of machinery needed to complete a model framework for a self-sustaining framework of the Tezos DeFi ecosystem (stablecoins and AMMs having been the other major elements).

Completing the DeFi cycle

By endowing Tezos DeFi participants with the Tezos-based ability to generate yield based on lending, Tezos DeFi participants are far more likely to not merely bring their money into the Tezos DeFi ecosystem (for trading and liquidity supplying), but are also far more likely to keep their money in the Tezos DeFi ecosystem as well. That is, not having to rely on non-Tezos lending/borrowing platforms (e.g. Compound or Aave, which run on Ethereum for Ethereum ERC-standard tokens) to provide yielding opportunities for their holdings.

Market Context

There are 3 types of securities: Equity, Debt, Derivatives.

‘Total Value Locked’ (TVL) has become a standard metric for measuring the size of the overall DeFi market. Around 50% of the tens of billions of dollars locked in Ethereum DeFi, are funds locked in lending pools. Aave’s and Compound’s pools alone comprise approximately 25% of all value locked in DeFi. Though technically a derivative, one may consider Maker/DAI to be a lending system since it’s a stablecoin produced/borrowed based on debt collateral. Combined, lending systems comprise the majority (over 50%) of value locked in DeFi.

Although one day, most of the money locked in DeFi will be derivatives (as is the case in traditional finance markets by far), we nonetheless stand at a formative era for Tezos DeFi in 2021. That which derivatives must derive their basis of value come from the first 2 securities types (equity and debt). In this formative era, we will establish these first two layers.

Once established, derivatives can grow in a strong scalable manner, based on the diversified equity and debt activities of many hives of participants.

Tezos AMM Growth

Liquidity pools on Dexter and Quipuswap themselves will start to expand once a lending system is in place. By giving users the ability to borrow XTZ and Tezos tokens (USDtz, ETHtz, tzBTC, BTCtz, and many more), and to do so by borrowing against collateral they already have and plan to keep, the opportunity cost for the would-be supplier is drastically reduced, encouraging them to begin participating in those automated market-making protocols.

Besides DeFi — Tezos Network Growth

Besides DeFi, the borrowing of XTZ on Tezfin would enable new or existing Tezos node operators to procure the means of providing a larger bond deposit for their baker. Larger bond deposits enable bakers to accept larger delegations, which can lead to more revenue for the baker from their respective fee earnings. Thus, Tezfin borrowing will help expand the Tezos validator network of baking nodes.

A lending system will enable users to borrow the capital required to start Tezos baking nodes that wouldn’t otherwise exist, and even earn a premium through fee revenues of a baking delegation service, so as to pay back their debts, respectively.

Structure and Functionality

The platform and process will be much akin to that of Compound Finance. The system will offer three primary features to the users: borrowing, lending, and collateralization.

Borrowing and the rate of accrued interest for each asset is a function of the utilization ratio for that asset and is in constant algorithmically determined adjustment, measured as a floating rate APY.

  • When borrowing demand is low for an asset and thus low utilization is being exhibited, borrowing rates will be set lower by the algorithm
  • When borrowing demand is high and thus exhibiting a high utilization ratio, the borrowing rates will be set higher by the algorithm

The borrowing interest rate assumes a constant as its base interest APY. The constant is the amount the lender would expect to receive at a minimum to compensate for the opportunity cost of keeping their money in a lending pool as opposed to accruing gains in some other fashion. For USD, this constant would be the expected bank rate (e.g. usually no higher than 2.5%). For XTZ, this constant would be the expected XTZ inflation reward, determined by the blockchain in an inverse relationship with the Tezos staking ratio. This percentage is defined by variable Nᵉ. This pressures the borrower to keep their XTZ fully-staked (or else they’d be making it unnecessarily harder on themselves to pay back their own debt).

The floating rate APYs for lending are implicitly determined in the borrowing rate. That is, the borrowing rate multiplied by the utilization rate.

Lending

Suppliers to a lending pool deposit their assets and in exchange receive f-Tokens (e.g. ꜰXTZ, ꜰUSDTZ, ꜰTZBTC). The exchange rate between the given asset f-Pool and the matching f-Token related to that asset, changes with market events.

To avoid confusion with non-pool tokens and wrapped tokens of another sort, for the “F” character used for pool tokens on Tezfin, we are employing Unicode U+A730 symbol (Latin letter small capital F) for this designation: ꜰ.

U-A730 is read by most browsers, even those that do not support U-A729. If a browser cannot yet read Unicode UA-730, then a simple “f” or “F”, is acceptable. (Additional file-format info on U+A730)

The value of an f-Pool (exchangeable for an f-Token type) for each asset includes 3 major parts:

  1. CashTotal (present liquidity that can be borrowed or cashed-out by the supplier),
  2. DebtTotal (the outstanding debt amount owed by borrowers that has not yet been paid), and
  3. Reserve (which is set aside and doesn’t factor into the exchange rate)

When a lender ‘cashes-in’ their f-Tokens (i.e. makes a withdrawal), two things happen: (1) those tokens are burned, and (2) the lender receives their equivalent proportion of the balance. The funds received by the lender are debited from the CashTotal and transferred to the lender’s Tezos wallet.

Borrowing

To borrow an asset, a user must first deposit (lend) another asset of a different type to an f-Pool, and then secondly mark their balance for ‘use as collateral’ for borrowing. By doing this, payback for the lender is assured whether or not the borrower remits payments to pay his/her interest debt that is accrued; in extreme scenarios, a liquidation function can be invoked to sell the collateralizing asset at a market rate.

Conservatively, we will start by limiting the borrower to be able to borrow 25% of their collateralized market value. This ratio will become more favorable to the borrower over time, however, we will set this rate at the beginning in case of sudden extreme volatile changes in the price of the underlying asset (mainly, the price of tez).

The reserve will act as a safety factor that keeps the Debt pool from becoming too large. The reserve is purely a function of outstanding debt by the collective.

In other words, every borrower starts out as a lender, getting f-tokens in exchange for their lent deposit. A lender can opt to use their f-tokens as collateral to borrow another type of asset. Upon opting to use their f-tokens as collateral, and borrowing some amount of another asset, the lender thereby becomes a borrower as well and starts to accrue both: debt (over time, as a borrower), as well as interest rewards from their lending activities.

All users, therefore, have a Net APY equal to their debt outstanding minus rewards earnings for the year. If a user only lends and doesn't borrow, then they can expect their Net APY to always be positive.

A lender-borrower cannot remove their deposited collateral from the lending pool before remitting full-payment on their owed debt first.

Default and Liquidation

All assets are measured in terms of USD, so to keep a consistent baseline. Tezos oracle Harbinger will be used to determine accurate pricing. If a borrower’s debt exceeds their limit threshold (breaks the debt to collateral ratio limit), the borrower will be in a state of default. To prevent this from happening, a portion of the borrowers underlying collateral must be liquidated to pay down the debt and rebalance the borrower.

Any user (another lender in that pool) may call a function to liquidate the borrower’s underlying f-Token collateral.

Default (excess of debt-to-collateral ratio) can occur for any of several reasons:

  1. Borrower’s debt grows by way of interest to breaks the ratio limit
  2. Borrower’s underlying collateral devalues too much and breaks the ratio limit
  3. Borrowed funds increase in value too much, breaking the ratio limit with its underlying collateral. (remember, all assets are measured by their USD value equivalent)

In exchange for calling the liquidation function and thereby rebalancing the borrower’s debt position, the liquidator (i.e. user who calls the liquidation function) collects a fixed fee or discount rate (e.g 8%) from the liquidated amount. Therefore, the amount of the underlying asset f-Tokens to be liquidated is equal to the amount necessary to correct the debt-to-collateral ratio for the borrower, plus the fees that incentivize the liquidator.

3rd party co-signing

Co-signing will enable a lender on the TezFin platform to delegate some or all of their f-Token position as collateral for a borrower other than themselves. This feature will enable the on-chain underwriting of borrowing positions as a market product, which in itself is a building block toward a full-scale on-chain insurance market, as well as many kinds of derivative products that rely on 3rd party underwriting.

The co-signor acts as a guarantor for the borrower who does not have enough collateral to borrow what they need. The co-signer inherits some risk, and in exchange earns debt from a for their added services. Cosigning was also originally described in On-Chain Lending as “decentralized collateralization.”

Tezfin Governance & TFIN tokens

A more detailed governance document will be released subsequent to this piece. Briefly, Tezos Finance will become more decentralized over time, ultimately be governed by a consensus-driven ‘DAO’ which will attempt to learn from Tezos on-chain governance and adapt its proven principles. The participants of Tezfin on-chain governance will operate through the instrumentation of TFIN tokens.

TFIN Distribution

The majority of TFIN tokens will be awarded to Tezfin participants, particularly lending pool suppliers. The total supply of TFIN tokens will be decided by Tezfin governance who will take into account in this decision: maximizing the economics for all participants, incentivizing growth of participation, increasing decentralization, while keeping current token-holders content.

TFIN Insignia

In respect and honor of our Tezos heritage of appropriating Unicode symbols, we suggest that TFIN tokens be represented by U-A799 (/ua799, “Latin Small Letter F with Stroke”).

Tezos Finance governance token (TFIN) Unicode /ua799

U-A799 is stylistically in the same family as the Tezos ‘tz’ symbol to U-A729 (/ua729 “Latin small letter tz”) and hails from the same Unicode block (Latin-D Extended). The ascendent terminal of U-A799 ‘f’ is similar to the decedent tail at the end of the U-A729's ‘z’.

The double horizontal stroke is a neo-classical homage to classic finance industry iconography.

It has also been suggested that one can observe an abstraction of the individual T-F-I-N letters embedded within the single character’s layered elements.

To reiterate our use of Unicode symbols:

Tezos (a public-open source technology project not specific to Tezos Finance):
U-A729 = Tezos native ‘tz’/tez symbol described in the Tezos Whitepaper

Tezos Finance (the project described in this document):
U-A730 = the letter ꜰ; ‘F’ prefixed to pool tokens to avoid confusion with non-pooled tokens (e.g ꜰXTZz, ꜰUSDtz, ꜰtzBTC, ꜰSTKR)
U-A799 = Tezos Finance ‘TFIN’ governance token (SVG version).

About

Tezos Finance is an open-source project, built by contributions of talent and resources from multiple firms in the Tezos ecosystem including Wealthchain, Cryptonomic, and TokenSoft — contributions are coordinated and contracted by Tezos Stable Technologies, Ltd (StableTech), a wholly-owned subsidiary of Tezos Stablecoin Foundation — a non-profit non-shareholder foundation dedicated to the advancement of Tezos DeFi.

Tezos Finance along with all StableTech projects are venture-backed by Draper Goren Holm LLC.

To keep up to date with TezFin, see:

Website https://tezos.finance

Twitter https://twitter.com/TezosFinance

Discord https://discord.gg/ccWRCu2Dht

Telegram Announcements https://t.me/TezosFinance

Telegram Discussion https://t.me/TezFin

Reddit https://reddit.com/r/TezosFinance

About StableTech (Tezos Stable Technologies, Ltd.)

The aforementioned projects are developed by multiple participants in the Tezos DeFi ecosystem, including Wealthchain, Inc., Cryptonomic, Inc., and TokenSoft, Inc. These institutions as well as their respective labor and resource contributions are coordinated by StableTech (Tezos Stable Technologies, Ltd.)

StableTech addresses 3 key matters of infrastructure for Tezos DeFi, also described earlier in this document as the “primordial triad” :

  1. Assets (Stablecoins) stabletez.com
  2. Trading (Liquidity exchange — interchain + intrachain) tezex.io
  3. Lending (Tezfin) tezos.finance

Website: https://stable.tech

Twitter: https://twitter.com/StableTech

StableTech itself is a wholly-owned subsidiary of the Tezos Stablecoin Foundation — which is a non-profit, non-shareholder foundation.

About Tezos Stablecoin Foundation

Tezos Stablecoin Foundation (TSF)is a non-profit and non-shareholder foundation serving the cause of advancing DeFi on Tezos.

TSF’s seeks to achieve its mission goal in two ways:

  1. Building the primordial elements of Tezos DeFi technologies that will enable the infrastructural functions and facilities of a larger Tezos DeFi ecosystem. This is done through its aforementioned operative arm, StableTech, and is executed by StableTech’s coordinated independent entities.
  2. Providing grant opportunities to Tezos developers and entrepreneurs seeking support and resources to innovate the Tezos DeFi ecosystem through independent initiatives.

TSF Website: https://tezosdefi.org

TSF Twitter: https://twitter.com/TezosStablecoin

--

--

Kevin Mehrabi
Tezos Finance

Founder @ StableTech, building DeFi projects on Tezos blockchain #Tezos