This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #294 from keep-network/document-optionally-locked-…
…deposits Document optionally locked deposits Begin documenting a two-phase minting process allowing all deposits to be optionally "locked" to the depositor, or redeemable by anyone (as in the current system). This work will have a significant impact on deposit UX, allowing dApps to let a depositor to more easily walk away while work accumulates on their Bitcoin transaction.
- Loading branch information
Showing
11 changed files
with
320 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
= Deposit economics | ||
|
||
Signers aren't altruists -- they're paid for the service they provide. | ||
|
||
Signer fees should always be paid or escrowed up front. To achieve this, signer | ||
fees must be <<{root-prefix}/minting/index#,guaranteed by minting>>, and | ||
deposits must have predictable lifetimes. | ||
|
||
A detailed treatment of signer fees can be found in | ||
<<{root-prefix}/signer-fees/index#,their own section>>. | ||
|
||
|
||
== Terms | ||
|
||
:term-length: 6 months | ||
|
||
Fixed-term deposits mean signer fees can easily be calculated per deposit. A | ||
standard term of {term-length} means depositors can budget for fees, and | ||
signers will know how long their bonds will be inaccessible. | ||
|
||
Depositors that don't need future access to their deposit might prefer to pass | ||
the costs of the system to eventual redeemers. These depositors can opt to | ||
receive a non-fungible deposit beneficiary token which pays a fee rebate at the | ||
deposit's redemption. The rebate mechanism is <<{root-prefix}/minting/index#, | ||
explained further in the discussion around minting>>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
= Mistakes making a deposit | ||
|
||
The system is designed to function with a predefined lot size for all _Deposits_ | ||
which is given as a system parameter. **Depositors should send the exact lot | ||
amount of BTC in the funding transaction, or expect loss of funds.** | ||
Since it is not possible for the system to force users into sending any specific | ||
amount, the system must gracefully handle overpayment and underpayment. The | ||
primary impact of overpayment and underpayment is on the ``Deposit``'s collateralization | ||
ratio. We treat overpayment and underpayment as faulty depositor behavior, | ||
and pass on the associated costs to the depositor. | ||
== Underpayment | ||
Allowing underpayment on `Deposit` would result in over-bonded signers. To | ||
prevent this, the system will not accept funding proofs of less than the lot | ||
size (`1.0 BTC` initially). This implies that the a user that sends less than `1.0 | ||
BTC` in the funding transaction does not receive any TBTC, and forfeits the BTC | ||
locked in the funding transactions to the Signers. The Signers can unlock and | ||
evenly split the funds in the transaction after the _Deposit_ is resolved on-chain (see | ||
<<Multiple UTXOs>> for a full discussion). | ||
== Overpayment | ||
Overpayment, in contrast, would result in under-bonded signers. When overfunding | ||
occurs, the system accepts the funding proof, but mints TBTC according to the | ||
regular lot size. | ||
In an efficient market, this _Deposit_ will be immediately redeemed, | ||
as the redeemer expects to take the overfunded amount as arbitrage. | ||
Example: A user providing a funding proof for `1.6 BTC` in a system | ||
with lot size of `1 BTC` mints only `1.0 TBTC`. Any user that burns `1.0 TBTC` | ||
is able to claim the `1.6 BTC` _Deposit_. | ||
A depositor should notice this and immediately try to burn their TBTC to reclaim | ||
the amount. If not, the depositor effectively forfeits the overfunded value to | ||
other participants. | ||
== Multiple UTXOs | ||
A faulty depositor may send multiple UTXOs to the signer group address. This | ||
may be the result of human or software error. Unfortunately, returning the | ||
funds to the depositor would impose significant on-chain complexity and gas | ||
fees, as each UTXO would need to be proven via SPV, and a signature on it | ||
explicitly authorized. In addition, we would have to develop mechanisms to | ||
economically compel signers to sign each transaction despite the fact that the | ||
total value of the UTXOs is not known. As such, the system accepts only the | ||
first UTXO greater than the deposit lot size. All other BTC sent to the signing | ||
group is forfeit. Therefore it is imperative that depositors send only a single | ||
UTXO of an appropriate size. | ||
As a particularly damaging example, consider a naive human depositor. If she | ||
mistakenly sends half the lot size in one transaction and half in another, both | ||
UTXOs would be forfeit. **This represents a serious pitfall for depositors that | ||
must be carefully addressed by the user interface since significant loss of | ||
funds can occur.** |
Oops, something went wrong.