Skip to content

Instantly share code, notes, and snippets.

@RobinLinus
Last active November 28, 2022 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobinLinus/bfd64fe598b29d903c67247ee2f330fa to your computer and use it in GitHub Desktop.
Save RobinLinus/bfd64fe598b29d903c67247ee2f330fa to your computer and use it in GitHub Desktop.

Bitcoin-backed Fiat Money

A trust-minimised stablecoin for Bitcoin-backed fiat money. It mimics traditional banking. Dollar tokens (USDx) are created and destroyed based on collaterized loans.

Basic Protocol

  1. Alice sends a collateral of 1 BTC to a bank to receive a loan of e.g. $40000 in USDx tokens created by the bank.
  2. To redeem her collateral Alice has to pay back her loan within 4 years. To "pay back" means Alice destroys 40000 USDx.
  3. If Alice does not pay her loan back on time then the bank sells her collateral to the market. To "sell" means the buyer destroys 40000 USDx.

This protocol requires that within a period of 4 years the BTC price always increases.

Optimisations

  • The bank could be a large threshold group. E.g. a joined signature of 70-of-100 reputable Bitcoiners and Bitcoin businesses distributed all over the world. The protocol tolerates if the bank signs slowly. For example, it could process peg-outs in batches once a month.
  • Of course, users prefer to peg in while BTC is at the highest price possible. The better their BTC price the more USDx they get, but also the higher the risk for the bank. To reduce that risk, the bank can price loans in an average BTC price over the last 3 months. This smoothens the price peaks and thus, reduces the risk. Effectively, if the BTC price is relatively high then loans become over-collateralized and thus, more expensive. This dampens the bank's risk.
  • The price is signed by the bank only once a month. Users have to register their collateral upfront.
  • The contract to lock Alice's collateral is: ( Alice and Bank ) or ( 5yrs and Bank ). This ensures the bank cannot steal the funds before the time lock opens. Even if the bank leaks their keys to an attacker, Alice and the bank together can outvote the attacker. (Assuming the bank members are still honest and have access to their keys).
  • The bank's business model is to take a percentage of the BTC collateral when it is redeemed. This incentivises the bank members to keep the business running and secure their keys for years.
  • To keep the threshold group alive: Each group member splits their secret such that the other members can jointly recover it and thus, "delete" a member if they stop responding to pings. (Revealing a key decreases the threshold to (t-1)-of-(n-1). The group can keep the threshold balanced by not revealing dead keys every time. Deleting the shares of a dead key results in a t-of-(n-1).) Alternatively, members can get replaced by new members by revealing the shares of a key to the new member.
  • In case the bank dies there can be another timeout clause such that Alice can redeem her collateral unilateraly. E.g., after 6 years, which means the bank was dead for a year.

Thanks to Ruben Somsen for his help and comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment