Inspired by Mike Hearn's
https://en.bitcoin.it/wiki/Ripple_currency_exchangeand
https://bitcointalk.org/index.php?topic=106373.0Let’s say there 3 people – person A, B and C. All of them have BTC addresses – address A, B and C. There is also address D – this is multi signature 5-of-9 (n-of-(2n - 1) type).
Events:
Person A owes person B 51.3 BTC and must repay it during next 123 days.To store this event person A transfers from address A to address B - 0.00513123BTC. Where last 3 digits – number of days from the day transaction was sent (0.00000123). And other digits – amount BTC owed / 10000. (0.00513000)
Person A pays person B 51.3 BTC – nothing fancy here, just plain transfer from address A to B OR he can send same transaction from address A to address B, making total sum of debts = 0.
Person C wants to insure person’s A debts (part of it, let’s say 23 BTC) – person C takes address A and uses as a private key to make address A(p). Person C makes multi signature 2-of-2 address out of A(p) and address C. Sends there 0.00000023 BTC.
Person C wants to cancel insurance of person’s A debts – person C removes all the money from multi signature 2-of-2 address out of A(p) and address C.
These rules alone will create basic framework on but we can take it even further.
How to enforce loan repayments?Let’s say person A made 100 BTC deposit into address D – trust account. Trust rules say that person A can withdraw maximum amount in BTC = 100 – (total of his liabilities).
Person A owes 100 BTC and defaults but was insured by person C for 50 BTC– now person C can take out of trust amount x less 50 BTC, where X – amount in BTC he deposited into trust.
Person A can be insured by person C, person C by person N, person N by person M etc…
Here are more suggestions what rules trust can employ:
Creditors are repaid in FIFO order (First in first out)
If insurance is cancelled – it still applies to any loans made before and during the day it was cancelled.
What is missing here?