From 322cba2fc63ae6c77877335fbbb272a91c7e92b5 Mon Sep 17 00:00:00 2001 From: Szymon <38212223+Szymx95@users.noreply.github.com> Date: Fri, 10 May 2024 15:08:39 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=99=20Change=20admin=20default=20value?= =?UTF-8?q?s=20(#15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐙 Change mcr default * Change borrowing fee * Update comments * Use mcr higher precision * Update comments once again * Update mcr comment --- contracts/AdminContract.sol | 4 ++-- test/trinity/AdminContractTest.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/AdminContract.sol b/contracts/AdminContract.sol index ee436e1..0f5b24e 100644 --- a/contracts/AdminContract.sol +++ b/contracts/AdminContract.sol @@ -20,9 +20,9 @@ contract AdminContract is IAdminContract, UUPSUpgradeable, OwnableUpgradeable, A uint256 public constant _100pct = 1 ether; // 1e18 == 100% uint256 private constant DEFAULT_DECIMALS = 18; - uint256 public constant BORROWING_FEE_DEFAULT = 0.005 ether; // 0.5% + uint256 public constant BORROWING_FEE_DEFAULT = 383_561_643_835_616; // 2% * (7 / 365) uint256 public constant CCR_DEFAULT = 0; // 0% - uint256 public constant MCR_DEFAULT = 1.1 ether; // 110% + uint256 public constant MCR_DEFAULT = 1_052_631_578_947_368_421; // 1 / 0.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 REDEMPTION_FEE_FLOOR_DEFAULT = 0; // 0% diff --git a/test/trinity/AdminContractTest.js b/test/trinity/AdminContractTest.js index 0af7693..2996c74 100644 --- a/test/trinity/AdminContractTest.js +++ b/test/trinity/AdminContractTest.js @@ -80,9 +80,9 @@ contract("AdminContract", async accounts => { }) it("Formula Checks: Call every function with default value, Should match default values", async () => { - await adminContract.setBorrowingFee(ZERO_ADDRESS, (0.005e18).toString()) + await adminContract.setBorrowingFee(ZERO_ADDRESS, "383561643835616") await adminContract.setCCR(ZERO_ADDRESS, "0") - await adminContract.setMCR(ZERO_ADDRESS, "1100000000000000000") + 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.setRedemptionFeeFloor(ZERO_ADDRESS, '0')