Join and earn Bitcoin Cash for participation

Trustless Token Collateralized Bitcoin Cash Loans

9 365 boost
Avatar for im_uname
Written by   88
8 months ago

@im_uname, 20191229, with inputs from @emergentreasons and Jonathan Silverblood

Disclaimer: This writeup is a crude description of the idea, and should not be taken as a complete draft description nor a specification ready to be implemented.

The installment part of this writeup is heavily inspired by Karol Trzeszczkowski's excellent Last Will and Mecenas contracts.

Motivation

Generally speaking, a collateralized loan involves a borrower putting up a valuable, less liquid, less fungible asset to borrow a more liquid, more fungible asset that is easier to use in commerce. In a fiat-denominated mortgage, for example, the borrower puts up a house, a highly valuable yet difficult to liquidate asset, in exchange for dollars. The lender gets interest, and the borrower gets additional utility from capital otherwise locked up in their house.

Failure to repay the loan results in the collateral being seized by the lender. Asset seizure is backed by law enforcement.

In Bitcoin Cash, it is possible to construct smart contract loans collateralized by SimpleLedger (SLP) tokens representing illiquid or less fungible assets, and borrow Bitcoin Cash, which is by far the most liquid and widely accepted asset on the BCH chain. These contracts will retain the basic characteristics of traditional loans, with some key differences. Such a contract can be constructed between any two party who agree without the need for notarization or enforcement by a third party. Enforcement of these contracts is via Bitcoin Script and can be executed by anyone, whether the participating parties or service provider, with no risk of theft.

Components

A basic contract can be constructed between just a borrower and a lender. The borrower should have a valuable asset, tokenized in SLP, that is relatively difficult to liquidate, or provide non-fungible value that is difficult to retain by exchanging into and out of more fungible assets. The lender should have liquid Bitcoin Cash that can be lent for duration of the contract. The amount of BCH lent should be less than the expected value of the collateral, with a difference sufficient to account for expected price volatility of both BCH and the collateral asset.

Contract Description

Two types of contracts are possible.

The simple case is a single-payment contract: The entirety of the loan is repaid and collateral redeemed at or before the end of the contract. Failure to pay in full before the end of the contract results in the tokenized asset becoming seizable by the lender. This is similar to a traditional pawn shop.

A more complex case is a contract that is paid in parts over the contract's lifetime, with the the final transaction returning the tokenized asset to the borrower. Any overdue installments will result in the asset becoming seizable by the lender.

"Pawn shop" Single-payment Contract

The borrower and lender should fund the contract in one transaction to retain atomicity. In the transaction, the lender passes the agreed upon amount of BCH to the borrower. The borrower transfers their tokenized asset to a P2SH address in the same transaction.

Pseudocode of the P2SH script as follows:

contract singleloan()

{
    challenge repayment()
    {
        Verify that an op_return output is present and
        transfers asset to a predetermined borrower address.

        Verify that a repayment output is present and
        transfers sufficient BCH to a predetermined lender address.
    }

    challenge overdue()
    {
        Verify that the transaction has locktime beyond a
        predetermined blockheight or median time past.

        Verify that an op_return output is present and
        transfers asset to a predetermined lender address.
     }
}

"Mortgage" Installment Contract

Initial construction of the loan should be the same as the single-payment case. Rather than a single P2SH address, this uses a series of pre-calculated P2SH addresses, one for each payment. The series of addresses should be pre-constructed with each repayment amount pre-determined. Additionally, seizures due to overdue payments should require the lender to return some amount of equity accumulated thus far, with possible penalties agreed beforehand.

Pseudocode of installment scripts as follows:

contract installment()

{
    challenge repayment()
    {
        Verify that an op_return output is present and
        transfers asset to the predetermined next installment P2SH address.

        Verify that an installment output is present and
        transfers sufficient BCH to a predetermined lender address.
    }

    challenge overdue()
    {
        Verify that the transaction has locktime beyond a
        predetermined blockheight or median time past.

        Verify that an op_return output is present and
        transfers asset to a predetermined lender address.

        Verify that partial repayment output is present and
        transfers sufficient BCH to a predetermined borrower address.
     }

}

The final installment enforces return of the asset to the borrower.

Ecosystem Requirements

In order to have widespread impact, two things need to be present in significant amounts on the Bitcoin Cash chain:

1. Bitcoin Cash itself needs to be sufficiently liquid, available, and widely adopted in order to serve as an attractive denomination for loans.

2. Lower-liquidity or less fungible yet sufficiently valuable assets need to be present, tokenized via SLP, and have their value recognized by enough lenders for a viable market. The [NFT1](https://github.com/simpleledger/slp-specifications/blob/master/slp-nft-1.md) standard is ideal for this purpose.

Ecosystem impact

Availability of a trustless loan market is expected to both increase demand and utility of Bitcoin Cash, as well as increase the attractiveness of tokenizing assets with SLP.

1
$ 6.60
$ 2.05 from @Read.Cash
$ 1.00 from @emergent_reasons
+ 9
Avatar for im_uname
Written by   88
8 months ago
Enjoyed this article?  Earn Bitcoin Cash by sharing it! Explain
...and you will also help the author collect more tips.

Comments

Still more moral than the banks taking away your house, and you still owe half million usd.

$ 0.10
8 months ago

I tbh don't see the utility, since unlike when taking out a loan on a house where you can still use the house and live in it while the contract is ongoing, in this the tokens are not "usable" while the loan is occuring meaning you haven't gained from keeping them instead of just selling them. And if you can't sell them, then I wouldn't see why anyone would want to lend you money against them.

I apologise if this is an incorrect analysis and I am missing an important detail/usecase but from your article this is all I could think of.

$ 0.00
8 months ago

Think of jewelry you hand to a pawn store, and you'll likely see the utility. :)

It's why I made "lower liquidity/lower fungibility" assets a requirement; by posting this writeup I hope I can encourage people to tokenize these assets more. Such a tokenization scene unfortunately does not exist yet on BCH.

$ 0.00
8 months ago

Sounds interesting, but how do you tokenize a jewelry item?

$ 0.00
User's avatar Read.Cash Banned
8 months ago

Depends on the level of trust you're willing to endow on a custodian - the more you're willing to give, the more you can tokenize (tokens with less trust are more friendly to smart contracts). There is likely also an axis aside from trust that dictates how "bearer friendly" a token is - the more the better - independent of how much you need to trust the custodian.

So for example, a real estate token will be quite high trust (you have to go to an agent to claim your token) and not very bearer (local governments will be skeptical on property transfers via tokens). A jewelry repository held by a grey market custodian will be high trust but also quite bearer friendly (this likely answers your question; a completely regulated repository will be high trust and not very bearer friendly). Access token for a decentralized sidechain will be low trust and very bearer friendly. A game item token will be high trust, yet quite bearer friendly. A collectible will be low trust, and might or might not be bearer friendly (some may derive value from where they move).

Different kind of trust models of tokens likely warrant a whole writeup on its own, but anyway, my point is that there's a large space we can explore here, and no matter which setup you go, I think there is value in at least removing the need for costly contract enforcement.

$ 0.10
8 months ago

Interesting thoughts! Thanks!

I agree this space seems like it warrants further exploration.

$ 0.00
User's avatar Read.Cash Banned
8 months ago

So basically it makes sense for non fungible collateral that you might want to not lose or sell as it would be difficult to regain.

Makes sense. Although I don't think that applies to any token today but I suppose it could in the future.

$ 0.00
8 months ago

Part of why I published this instead of keeping to myself is to encourage people to tokenize their stuff. Perhaps when they see there's utility beyond the usual "but-but like everything will be like tokenized !!" they'll be more inclined to do so.

$ 0.00
8 months ago

"The amount of BCH lent should be less than the expected value of the collateral, with a difference sufficient to account for expected price volatility of both BCH and the collateral asset"

If I need $1000 USDH to borrow $1000 BCH or less then why would I want the loan in the first place? I get BCH is more liquid but the more liquid it gets the easier it is for me to just sell USDH for BCH and skip loans altogether.

Unless there's some kind of "credit score" that can be gained on the blockchain...

edit: just read your comment about tokenized jewelry

$ 0.00
8 months ago