This repository has been archived by the owner on Jan 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PROTOTECH-42 (continuation): Update rounding in pool calculations to …
…favour pool (#851) * Wide precision collateral * Adding improved accuracy to quotetokentolps, updated some baselines * Updated baselines - testAddRemoveQuoteTokenBucketExchangeRateInvariantDifferentActor has some bad behavior it seems * Use OZ mulDiv, fix more tests * Add PROTOTECH invariant exchane rate regression tests * used mulDiv in redeem quote token/deposit * Rounding changes etc, and baseline updates. Two tests failing * Code style * Add natspec for new param rounding_ * Used mulDiv instead of exchange rates in liquidations * Apply style to auction changes. Add Bucket.lpToCollateral. PoolHelper LP to asset conversion use now Buckets conversion functions instead calcualting based on rate Improved Natspec * Prototech r9 fix continuation (#842) * Use rounding flag for collateralToLP when no deposit and no bucket collateral * Account case when deposit or collateral in bucket but no LP to cover * Restructure if clauses * Introduce Maths.ceilWmul * Round to nearest when bucket empty or assets not covered by LP * Apply same logic for LP to assets functions * Round down when calculating deposit to kick with * Remove extra spacing * Fix merged test * Use LP to assets and assets to LP helpers when remove max quote token. (#847) Last place where exchange rate was used to calculate amounts. * Proper fix for test_prototech_collateral_draining test now * Use _assertBucket in draining test * Group Prototech regression tests * Update calculations to favour pool * Fix some unit tests * Fix unit tests * Changes after review: comments, revert the change that is not needed in test helper _addInitialLiquidity * remove unused import in DSTestPlus * Fix tests * Update settleAuction handler * Fix bucket exchange rate calculation, reuse lpToQuoteToken helper Set optimizer runs to 0 to fit in deployment size * Narrow Exchange rate invariant deviation to 1e8 * Fix comment, remove TODO --------- Co-authored-by: mwc <matt@ajna.finance> Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com> Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
- Loading branch information
1 parent
c7f3d94
commit 3b79712
Showing
42 changed files
with
469 additions
and
457 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
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
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
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
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
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
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
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
Oops, something went wrong.