On-Chain Lending — with Tezos

Lending and borrowing USDtz tokens made fair and easy

Kevin Mehrabi
Sep 9, 2019 · 12 min read

There are many ways for individuals to profit from the USD Tez ecosystem. I’ve previously described an On-Chain Savings account smart-contract that operates like a Savings account that generates returns of 3% APY. This article will present a few new instruments that will be available in Year 1 of USD Tez. First, we’ll take a look at one of the building blocks of many instruments to come — On-Chain Lending.

Soon you’ll be able to take out a loan in USD Tez, either by collateralizing your USD Tez On-Chain Savings position or by collateralizing your Tezos non-fungible tokens (NFTs). You’ll also have a new way to make profits, by buying and flipping seized NFTs from borrowers that had permanently defaulted on their loans.

Scenario: Say you’ve invested in a bunch of non-fungible real-estate tokens (perhaps issued by Elevated Returns), and most of your remaining cash is locked in your crypto-trading portfolio. Your funds are all locked up.

Now let’s say you need some free cash; maybe you need liquid cash to pay your rent or utility bill, or maybe you want to buy more XTZ because you believe it will have a big bull-run this weekend.

How can one borrow money in the Tezos ecosystem? The answer to this is especially important to cryptocurrency traders who spend day and night keeping the veins and arteries of the Tezos financial ecosystem aflow. For traders especially, borrowing in the Tezos ecosystem opens the door to margin trading; enabling traders to take larger positions on their choice investments than they otherwise could with their own available liquid cash alone.

Long-term, these are the building blocks for many other financial instrument possibilities in the Tezos ecosystem. This article will touch on those topics later on as well.

What On-Chain Lending offers are, in principle, are 2 main things:

  1. Lender repayment is guaranteed — By the end of the smart-contract, lenders will get paid the money they are owed one way or another
  2. Borrowers have no need to complete a credit check—The liquid net value of the collateral pledged by the lender is given a formally verified appraisal through a binding on-chain pre-loan auction

In accordance with our values, we want lending to be free and easy, but we want to avoid the tricky-practices of predatory lending that lead to the subprime mortgage crisis and nearly collapsed the global economy, as well as avoid any magnifications of debt through nebulous investment vehicles that leverage debt and speculation to afford more debt that’s covered by more speculation. (Phew!)

Nay, rather we want a healthy Tezos financial ecosystem built on solid ground, in which the terms of lending practices are publicly readable and in which remittance is guaranteed in arithmetic terms that can be formally verified on the blockchain.

One thing we need to make sure never happens is this:

So, how do we do it?

Introducing: On-Chain Lending

On-Chain Lending enables users to borrow money without a central trusted intermediary nor with an invasive underwriting process; all the terms of the loan are covered/collateralized for automated remittance triggered by contingency mechanisms written into the smart-contract, and thus all risks are hedged no matter who the borrower is. This works even better than the traditional bank method since a bank can only presume remittance, not guarantee it, despite their invasive and expensive underwriting processes.

There are two collateralization methods (and thus, two different smart-contract types) enabling ways to borrow USDtz with On-Chain Lending:

  1. Borrower Collateralization
  2. Decentralized Collateralization

Either collateralization method can refer to On-Chain Lending since all end-to-end borrowing and lending contingencies are covered within the smart-contract. Borrower Collateralization is the simpler of the two methods and will probably be the most common; it is simply a smart-contract between two parties — the lender and the borrower.

Type 1: Borrower Collateralization

Alice (the ‘Borrower) needs a loan of USDtz from USD Tez Foundation. USD Tez Foundation (the ‘Lender’) sets the terms of the loan, which requires interest payments to make it worthwhile. The Lender also requires Alice to pledge collateral for the loan, to be included in the smart-contract, in case Alice defaults on the loan.

Alice has a Savings bond with USD Tez

Alice happens to have a USD Tez Savings Bond/smart-contract, which she established the day prior. She decides to pledge the Savings Bond as collateral for her loan.

Borrower proposes a loan and pledges her Savings bond as collateral for that loan

However, for Alice’s loan request to be approved and then issued as a smart-contract, the Savings bond must be large enough (mathematically) to cover Alice’s potential debt in case Alice default’s on her payments — that is, the Savings bond Alice pledges, if seized by the Lender, must be large enough to cover the principal loan amount, plus the maximum interest Alice owes, assuming the worst-case scenario (in which Alice takes the money and runs).

Assuming Alice’s pledged Savings bond is large enough, Alice’s loan request will be accepted and the Lending smart-contract will be issued.

The pledged collateral would cover Alice’s default and so the Loan proposal is accepted

If Alice returns the borrowed sum with interest to the lender, then the smart-contract completes its duration with all desired conditions satisfied; Alice keeping her Savings bond, and everybody wins.

The smart-contract is in effect for the set period of duration

If, however, Alice defaults on her loan beyond repair, then the lender (USD Tez Foundation) would seize the Savings Bond that Alice pledged as collateral, thereby getting repaid in another way. Pretty simple.

Type 2: Decentralized Collateralization

The simpler form of decentralized collateralization is for the borrower to get the agreement of a 3rd party (friend, or family member) to underwrite the loan in a formal fashion — that is, to lock-in a collateralizing deposit in the same smart-contract; that is, a smart-contract guarantor. The 3rd party would do this based on trust and could end up losing money in the process.

Assuming the borrower does not have a Savings Bond to pledge as collateral (or doesn’t have one that’s large enough to cover the requested loan terms), and has no one to formally underwrite them based on personal trust, a loan can still be issued from the lender to the borrower, through a process requiring another form of on-chain collateral (e.g. a non-fungible-token).

This is where on-chain lending truly starts to demonstrate a revolutionary improvement over prior off-chain practices, which stretch back through the entire history of banking.

The lender still needs assurance from the smart-contract that the lent amount plus interest will be paid in full.

If the lender were to follow traditional (off-chain) banking practices, they would be setting themselves up for an attack. Under a mere ‘blockchain-ified’ version of the old system, to profitably attack the lender, all a borrower would need to do is coordinate an inflated price for an NFT, collateralize that NFT, borrow against it, and intentionally default on their loan. Even though the lender would end up seizing the NFT, the NFT may sell on the open market for even less than the amount lent (and lost). Under this open-ended method, recovery for the lender is not certain, let alone formally-verifiable.

For this reason, even if the lender accepts the NFT of the would-be borrower, the lender must not be the one to collateralize the NFT, because the lender cannot trust the face value of that NFT.

Rather, the borrower would turn to a decentralized collateralization method, in which the NFT is given a formal appraisal, and contingency purchase agreement; free-market-competing 3rd parties collateralize the presumed future seizure of a non-fungible-token. Here’s how it works:

  1. 3rd party participants would compete with one another as bidders in a pre-loan auction of the NFT.
  2. The winner of the pre-loan auction becomes the Guarantor and commits to purchasing the NFT at the winning price, but only if and when the borrower irreparably defaults on the terms of their loan. This way, not only is the NFT given a fair appraisal, but the lender can have formal verification of their exact amount and timing of repayment before the loan smart-contract is issued.
  3. The 3rd party Guarantor is paid a small yet incentivizing monthly fee for their services, even if the Borrower never defaults.

Couldn’t an attacker just scam the 3rd parties? An attacker could try to do so. However, the free-market competitive nature of these auctions will foster an ecosystem of support, resources, and knowledge that will appraise NFT values far more accurately and discerningly than a single party (the lender) ever could. The bidders are financially incentivized to accurately determine good collateralized NFT assets from bad ones, protecting themselves and the ecosystem along with it. In fact, the Guarantor activities of Decentralized Collateralization of on-chain-loans will likely become a large industry sub-sector in and of itself, which will spur capital resources and talented professionals to innovate an ever more competitive arsenal NFT evaluation.

Consider this example: Gary owns a tokenized piece of real estate worth $200,000 and wants to borrow $100,000 in USDtz. Gary needs the $100,000 USDtz for a period of 6-months. USD Tez Foundation would be Gary’s lender.

Earlier that day, Bob locked up his $100,000 USDtz tokens in a USD Tez Savings position smart-contract for a 3% APY for 12-months. (Bob is not the 3rd party in this situation and has nothing to do with the smart-contract; Bob is just an example of someone to whom the Lender has fiduciary obligations.)

USD Tez Foundation knows that Bob won’t be using his $100,000 USDtz USD Tez for 12-months, meaning that that amount can be made available for lending, under the condition that the borrower’s debt is repaid with interest, to be made available to Bob upon the block-time that his Savings smart-contract ends.

The terms of Gary’s Lending smart-contract stipulates that he could borrow the $100,000 USDtz for a 6-month term at a rate of 6% APR. That is, by the end of the 6-month term, Gary would need to have paid at minimum (assuming timely payments and no debt compounded) the initial borrowed sum of $100,000 USDtz, plus interest of $3,000 USDtz, for a total of $103,000 USDtz.

Before the smart-contract is set, Gary would need to provide collateral that is formally verifiable in its ability to cover the terms of his would-be debt. Since Bary has a real-estate token worth $200,000, he could offer the token as collateral on the loan in case of default. This reflects a common practice by banks and homeowners but in smart-contract form. When banks seize collateral assets from borrowers who defaulted on their loans, despite the asset having undergone a pre-loan appraisal in the underwriting process, those seized assets are sold or auctioned off to interested buyers after-the-fact.

For a smart-contract however, a post-seizure auction would introduce many off-chain conditionals. In particular, the value of the NFT could go down to the point that the lender would not recover owed assets, and would perhaps even lose money. On-chain lending precludes this possibility of loss for the lender by staging a pre-loan auction of the asset and integrating the potential for utilization of the results in the smart-contract (this will be clearer soon).

So far we’ve identified 2 parties in this smart-contract — the lender (USD Tez Foundation) and the defaulting borrower (Chuck). There is, however, a 3rd-party included in an On-Chain Lending smart-contract; a party that acts as a Guarantor of sorts who commits money to buy Chuck’s collateral in case Chuck defaults on his loan. The lender is not interested in owning a non-fungible token, let alone the piece of real-estate that the NFT represents. Rather, this type of lender (USD Tez Foundation) much like a bank is only concerned with settling its owed returns of the currency in which it is dealing (namely, USDtz tokens). That’s where Charlie comes in.

The lender (USD Tez Foundation) needs to make sure that the hypothetical future-seized asset can be liquidated for the USDtz-token returns necessary to satisfy Gary’s debt and for that the repayment to be automated and triggered at the point of default. To accomplish this, USD Tez stages a preliminary appraisal auction for the collateral asset that determines both: a would-be buyer and the amount they will pay (with a reserve-price that must cover default). After the auction, the On-Chain Lending smart-contract adds the collateralized asset’s future-buyer as well. To reiterate, all of this happens before Gary’s loan is issued; before the smart-contract is complete, let alone deployed.

If that’s unclear, let’s continue with our example. Charlie has $1,000,000 locked in a USD Tez Savings smart-contract for 2-years (3% APY). Charlie gets an alert inviting him to participate in a pre-loan auction. Charlie is intrigued and decides to participate. Charlie figures that by participating in this auction, he could get a great deal on some non-fungible tokens and then flip those non-fungible tokens for a profit (assuming the current owner irreparably defaults on their loan). Even if the borrower never defaults, as the winning bidder Charlie would earn 1% APY of the loaned amount in addition to the 3% APY he would already continue to be earning as a holder of a USD Tez Savings bond.

This particular auction is for Gary’s real-estate property NFT (owner names and other sensitive info is kept hidden from Charlie and other bidders though). Gary claims the liquid price is of the NFT he’s offering is $200,000, (which is about the price at which he bought it) and he may be correct, but the auction bidders like Charlie are seeking profit. Bidding will likely be competitive but will not bid so high that the venture becomes not worth their time.

All bidding participants agree that if they win the auction with the highest bid, the according transaction will commence as soon as the loan-default mechanism is triggered in the smart-contract. That is, if and only if Gary defaults on his loan, that then and only then will the winning bidder be purchasing Gary’s NFT; it’s all a contingency.

Charlie wins the auction by offering a high-bid of $130,000. That is, Charlie pays nothing now but if after month-6 of the loan, Gary defaults on his loan beyond recovery after a specified date and time (in this case, 30 days from term-expiry), the smart-contract then and only then transacts a change in possession of his collateralized non-fungible real-estate token, from Gary to Charlie.

If that default event occurs, then simultaneously, $130,000 USDtz tokens held by Charlie in his USD Tez Savings smart-contract are to be transferred to the Lender (USD Tez Foundation). However, if Gary does not default on his loan, then he keeps his NFT, and Charlie continues to earn on his USDtz Savings bond smart-contract. This 3-way set-up and series of contingencies are configured in a single on-chain-lending smart-contract.

Bottom line: On-Chain Lending assures fair and equitable Lender/borrower transactions for any agreement, without the need for a personal credit check nor an invasive underwriting process. A smart-contract can only be referred to as “on-chain-lending” if and only if all terms of contingencies of liquid payment are settled for both lender and borrower by the terms of the smart-contract (end-to-end on-chain).

Future Vision of On-Chain Lending

These basic practices also open the door to many other downstream ecosystems that will emerge, each with their own place for entrepreneurial initiatives, each offering the potential for lucrative returns.

These smart-contracts can become tiered with multiple levels of participants decentralizing yet another aspect of the lending process.

Insurance coverage would be one potential area of extension for the Tezos and Tezos stablecoin ecosystem. There are even companies already entering that space (e.g. Tezsure).

Real estate mortgages are the most frequent and obvious extension of basic monetary lending practices. This is an economic area YES Tez Foundation will probably stimulate as well, directly, and through grants for entrepreneurs.

Payday advances are loans in the form of small short-term loans but are issued with much greater volume than conventional loans.


Continue to follow USDtz as we ready our launch

Go to USDtz.com to sign up for the USD Tez mailing list. You can also follow us on various social media channels, including:

USD Tez (USDtz)

USDtz is a Tezos-based stablecoin pegged to the US dollar

Kevin Mehrabi

Written by

I have some thoughts. Founder/CEO, doing creative product things with #Tezos and #DeFi — oh and I like TV…a lot #Bahai #TzFi

USD Tez (USDtz)

USDtz is a Tezos-based stablecoin pegged to the US dollar

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade