Introduction
Three weeks ago, I finalized the design described here. The reasoning behind it requires only a foundational understanding of Bitcoin’s contract-oriented programming. I have no doubt that similar mechanisms have been invented before or could be independently devised by others without reading this proposal.
Note: While this proposal uses "NFT-collateralized lending" as the primary example, the same design applies to other collateral types (e.g., BTC) and loan assets (e.g., stablecoins).
1. Implementing Collateralization
To protect lender Bob’s interests, borrower Alice must relinquish exclusive control over her NFT (represented as a UTXO, though transferable via protocols like RGB). This is achieved by locking the NFT in a 2-of-2 multisignature output controlled by Alice and Bob.
Key Steps:
- The multisignature output should be created after all commitment transactions are signed.
- The same transaction disburses the borrowed BTC to Alice.
2. Single-Payment Redemption Clause
Assume Alice borrows amount M with agreed interest rate and duration (described by function f(i, t)
). Two commitment transactions ensure:
Redemption Transaction:
Spends the 2-of-2 NFT output, creating two outputs:
- Repayment of principal + interest (
M * f(i, T)
) to Bob. - NFT returned to Alice.
- Repayment of principal + interest (
- Bob signs with
SIGHASH_ALL_ANYONECANPAY
, allowing Alice to add inputs to cover the repayment. - Invalid initially (output value > input), but becomes valid with sufficient inputs.
Expiration Transaction:
- Spends the 2-of-2 output, transferring the NFT to Bob after timelock
T + t
. - Signed by Alice and held by Bob.
- Spends the 2-of-2 output, transferring the NFT to Bob after timelock
Guarantees:
- Alice reclaims NFT if she repays on time.
- Bob claims NFT if Alice defaults after
T + t
.
3. Multi-Payment Interest Arrangements
For staggered repayments (e.g., three installments):
- Sign multiple interest-expiration transaction pairs.
Each interest transaction:
- Requires additional input to cover the installment.
- Locks the NFT in a new 2-of-2 output.
- Expiration transactions remain the same (NFT to Bob).
- Sign in reverse order (e.g., third installment first).
4. Dynamic Liquidation
Critical for protecting lenders when collateral value fluctuates. Key mechanism:
Liquidation Trigger Transaction:
Spends the 2-of-2 output, creating an NFT output with two spend paths:
- 2-of-2 multisig.
- Alice’s signature + timelock (
T2 + t
).
- Signed by Alice and held by Bob.
Repayment Transaction:
- Pays Bob the discounted debt value:
[M * f(i, T) - repaid] * f'(i', T') - A
(penalty factor A included). - Bob signs with
SIGHASH_ALL_ANYONECANPAY
.
- Pays Bob the discounted debt value:
Liquidation Transaction:
- Transfers NFT to Bob after relative timelock
t
. - Signed by Alice and held by Bob.
- Transfers NFT to Bob after relative timelock
Advantages:
- Prevents lender abuse via penalty factor (A) and timelock (
t
). - Allows flexible discount rates negotiated upfront.
5. Early Repayment & Alternatives
Alice and Bob can cooperatively:
- Negotiate early repayment with adjusted interest.
- Use advanced scripts (e.g., HTLCs) for off-chain repayment options.
6. Conclusion
This design demonstrates Bitcoin’s untapped potential for financial applications using basic modules: commitment transactions, timelocks, and SIGHASH
flags. As asset issuance protocols evolve, such mechanisms will enable broader financialization of digital assets.
👉 Explore more Bitcoin financial tools
FAQ
Q1: Can this design work with non-NFT collateral?
A1: Yes—replace the NFT with BTC or other UTXO-based assets.
Q2: How is the discount rate determined?
A2: Negotiated upfront by both parties, like traditional loans.
Q3: What if Bob falsely triggers liquidation?
A3: Penalty factor (A) and timelock (t
) disincentivize misuse.