Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Spec Updates (all in one) #397

Merged
merged 23 commits into from
Jan 19, 2020
Merged

Spec Updates (all in one) #397

merged 23 commits into from
Jan 19, 2020

Conversation

Shadowfiend
Copy link
Contributor

@Shadowfiend Shadowfiend commented Dec 30, 2019

This pulls together several pending spec updates. In particular:

  • TDTs are now fully described and named as such.
  • FRTs are now fully described and named as such.
  • Liquidation is now fully described in the TDT model.
  • Redemption is now fully described in the TDT model.
  • The implications of deposit term are now fully described.
  • A variety of other punctuation, wrapping, whitespace, and other minor issues are fixed.
  • The spec consistently references signer fees throughout.
  • All spec constants are pulled to a commonly-referenced constants.adoc file.

The spec has also gained a new appendix that describes the repayment amounts in various TDT/FRT/redeemer combinations for pre- and at-term deposits.

See #293.
Closes #301.

@mhluongo mhluongo added the tbtc label Dec 31, 2019
Copy link
Contributor

@liamzebedee liamzebedee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All I want for Christmas 🎵

One minor thing re: FRT's, else the rest is looking good.

Copy link
Member

@mhluongo mhluongo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits. This is looking reasonable so far, but no ready to approve until I can get this table another look


Bonding is described in more detail in
<<{root-prefix}bonding/index#bonding,its own section>>.

==== Distributed key generation

:threshold-signature: footnote:[Threshold signatures allow a group of N \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might deserve a link to the signing section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to rewrite it, but then that's probably the right move.

[#deposit-payment-flow,%header,cols="1,1,1,1,1,1a"]
.Deposit payment flow
|===
| Deposit state | TDT holder | FRT holder | Redeemer | Repayment Amount | Disbursal Amounts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a better way to show this. It's difficult to review- leaving this comment here for myself to come back to

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could probably add a diagram, but the table is valuable IMO. It basically summarizes the entire redemption section… And would be a great target for generating automated spec tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Within the context of the table, a couple of other approaches I considered but hit pause on so I could get something out the door:

  • Separating pre- and at-term redemption into distinct tables.
  • Listing out the parties in separate columns.

Some more ideas that could be helpful:

  • Doing two sub-rows in the TDT/FRT/Redeemer columns indicating disbursal amounts. That is, the second, third, and fourth column would have the party in the top half and how much they receive during redemption in the second half.
  • Using something different for A, B, and C that would make them more visually distinctive, so it's easier to map between the 2/3/4 columns and the disbursal listings.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the amounts to the top rather than eg ref'ing "50 basis points" everywhere, replacing "BTC lot" with an amount; and replacing any math with the final amount and the math as a parenthetical would go a long way to making this digestible

Copy link
Contributor Author

@Shadowfiend Shadowfiend Jan 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@NicholasDotSol NicholasDotSol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick one, will give it a deeper look soon

@Shadowfiend
Copy link
Contributor Author

Pushed a commit that addresses most of the notes.

Copy link
Member

@mhluongo mhluongo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple small comments, but 👍

It'd also be nice to see the governable bonus to FRT holders in the spec, but that might be outside the PR

[#deposit-payment-flow,%header,cols="1,1,1,1,1,1a"]
.Deposit payment flow
|===
| Deposit state | TDT holder | FRT holder | Redeemer | Repayment Amount | Disbursal Amounts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the amounts to the top rather than eg ref'ing "50 basis points" everywhere, replacing "BTC lot" with an amount; and replacing any math with the final amount and the math as a parenthetical would go a long way to making this digestible

Emdashes and semicolons as relevant.
In a few places, it pays to clarify specific details that apply to tBTC
v1, and how they could change in future versions.
Some had no anchors and now do, while others had labels that were
half-words partialized with no particular rhyme or reason, and are now
full words or terms for clarity.
None of these add materially new information, but they do provide some
targeted clarification in places where interconnections between various
bits of the mechanism are less clear.
Since the spec now calls for using Maker's medianizer, updating the feed
is something that is handled external to the system.
This includes a new table that clearly outlines repayment amounts in
various scenarios. It also includes a clear articulation of pre- and
at-term redemption flows, and the meaning of "term".
Thank everything for spellcheck!
The appendix also provides some additional context.
Constants are now uniformly referenced from constants.adoc, so they can
be managed and updated from a central location. In several cases, the
constant names have also been clarified to reflect the fact that they
are global across the spec.
Clarify the amounts by doing the math ahead of time rather than writing
it out in line in the table.
This is the at-term scenario where the FRT holder and redeemer are the
same, but the TDT holder is different.
Rational signers will maintain honest behavior, but signers in practice
may not be rational. Still, they should maintain honest behavior.
Extra slashes and missing /indexes begone!
v1 will not allow for topping up collateral. Also, tweak pre-liquidation
link anchor while we're in there.
@Shadowfiend Shadowfiend marked this pull request as ready for review January 19, 2020 21:17
@Shadowfiend
Copy link
Contributor Author

Okayyyy I've cleaned up commit history, updated the PR description, and marked this ready for merge.

Copy link
Member

@mhluongo mhluongo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🎉🎉

Excited to make this official.

@mhluongo mhluongo merged commit 3c86c62 into master Jan 19, 2020
@mhluongo mhluongo deleted the spec-updates branch January 19, 2020 22:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document all fees / rebates in the system
4 participants