Add rounding to Vault invariants - #6217
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## tapanito/lending-fix-amendment #6217 +/- ##
==============================================================
Coverage 79.8% 79.8%
==============================================================
Files 858 858
Lines 67768 67847 +79
Branches 7570 7554 -16
==============================================================
+ Hits 54064 54152 +88
+ Misses 13704 13695 -9
🚀 New features to boost your workflow:
|
a7e80dd to
6b5618e
Compare
6b5618e to
9235ec4
Compare
- Requires a template for STAmount and Asset. - Update tests and computeMinScale from #6217 to use scale. - Convert a few other places to use "scale" correctly.
6f9b206 to
c6821ab
Compare
|
@ximinez apologies for the forced push, I haven't seen your review! |
|
@ximinez as we discussed, I rewrote the Invariant to check relative distance between values within some tolerance. For IOU the tolerance is 1 * 10^-13, for MPT/XRP the tolerance is zero. The IOU tolerance is the smallest tolerance that would cause the unit test to pass. If the tolerance was -14, the unit-test would fail. |
Replaces `Number::scale<STAmount>(Asset const&)` with `scale(Number const&, Asset const&)`
Co-authored-by: Ed Hennis <ed@ripple.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com> Co-authored-by: Ed Hennis <ed@ripple.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com> Co-authored-by: Ed Hennis <ed@ripple.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com> Co-authored-by: Ed Hennis <ed@ripple.com>
This PR relaxes Vault Deposit, Withdraw and Clawback invariants for IOUs to allow minimal discrepancy between various balance changes.
High Level Overview of Change
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)