Split LotSize to btc and tbtc
Instead of using the multiplier for converisons, we can use LOT_SIZE_BTC for logic requiring satoshi units and LOT_SIZE_TBTC for ERC20
@@ -6,9 +6,10 @@ library TBTCConstants {
// During testing swap this out with another constats contract
// System Parameters
- uint256 public constant LOT_SIZE = 1000; // satoshi TODO: decreased for testing, set it back original value `10 ** 8`
- uint256 public constant SATOSHI_MULTIPLIER = 10 ** 10; // multiplier to convert satoshi to TBTC token units
+ uint256 public constant LOT_SIZE_BTC = 1000; // satoshi TODO: decreased for testing, set it back original value `10 ** 8`
+ uint256 public constant LOT_SIZE_TBTC = 1000 * 10 ** 10; // TBTC TODO: decreased for testing, set it back original value `10 ** 18`
uint256 public constant BENEFICIARY_FEE_DIVISOR = 1000; // 1/1000 = 10 bps = 0.1% = 0.001
+
uint256 public constant FUNDING_FRAUD_PARTIAL_SLASH_DIVISOR = 2; // 1/2 = 5000bps = 50% = 0.5
uint256 public constant DEPOSIT_TERM_LENGTH = 180 * 24 * 60 * 60; // 180 days in seconds
uint256 public constant UNDERCOLLATERALIZED_THRESHOLD_PERCENT = 140; // percent
@@ -34,8 +35,8 @@ library TBTCConstants {
uint256 public constant PERMITTED_FEE_BUMPS = 5; // number of times the fee can be increased
// Getters for easy access
- function getLotSize() public pure returns (uint256) { return LOT_SIZE; }
- function getSatoshiMultiplier() public pure returns (uint256) { return SATOSHI_MULTIPLIER; }
+ function getLotSizeBtc() public pure returns (uint256) { return LOT_SIZE_BTC; }
+ function getLotSizeTbtc() public pure returns (uint256) { return LOT_SIZE_TBTC; }
function getBeneficiaryRewardDivisor() public pure returns (uint256) { return BENEFICIARY_FEE_DIVISOR; }
function getFundingFraudPartialSlashDivisor() public pure returns (uint256) { return FUNDING_FRAUD_PARTIAL_SLASH_DIVISOR; }
function getDepositTerm() public pure returns (uint256) { return DEPOSIT_TERM_LENGTH; }
