From acf49ce12ba16f6124ec3220aab1059f52c5343e Mon Sep 17 00:00:00 2001 From: szymx95 Date: Fri, 10 May 2024 14:56:58 +0200 Subject: [PATCH] Use mcr higher precision --- contracts/AdminContract.sol | 2 +- test/trinity/AdminContractTest.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/AdminContract.sol b/contracts/AdminContract.sol index c41d3f0..0879563 100644 --- a/contracts/AdminContract.sol +++ b/contracts/AdminContract.sol @@ -22,7 +22,7 @@ contract AdminContract is IAdminContract, UUPSUpgradeable, OwnableUpgradeable, A uint256 public constant BORROWING_FEE_DEFAULT = 383_561_643_835_616; // 2% / (365 / 7) uint256 public constant CCR_DEFAULT = 0; // 0% - uint256 public constant MCR_DEFAULT = 1_052_631_578_950_000_000; // (100 / 95) % + uint256 public constant MCR_DEFAULT = 1_052_631_578_947_368_421; // (100 / 95) % uint256 public constant MIN_NET_DEBT_DEFAULT = 2_000 ether; uint256 public constant MINT_CAP_DEFAULT = 1_000_000 ether; // 1 million TRI uint256 public constant PERCENT_DIVISOR_DEFAULT = 200; // dividing by 200 yields 0.5% diff --git a/test/trinity/AdminContractTest.js b/test/trinity/AdminContractTest.js index b550cd2..84fc712 100644 --- a/test/trinity/AdminContractTest.js +++ b/test/trinity/AdminContractTest.js @@ -87,7 +87,7 @@ contract("AdminContract", async accounts => { it("Formula Checks: Call every function with default value, Should match default values", async () => { await adminContract.setBorrowingFee(ZERO_ADDRESS, "383561643835616") await adminContract.setCCR(ZERO_ADDRESS, "0") - await adminContract.setMCR(ZERO_ADDRESS, "1052631578950000000") + await adminContract.setMCR(ZERO_ADDRESS, "1052631578947368421") await adminContract.setMinNetDebt(ZERO_ADDRESS, dec(2_000, 18)) await adminContract.setMintCap(ZERO_ADDRESS, dec(1_000_000, 18)) await adminContract.setPercentDivisor(ZERO_ADDRESS, 200)