diff --git a/contracts/plugins/assets/DemurrageCollateral.sol b/contracts/plugins/assets/DemurrageCollateral.sol index 8745de362..74e4beceb 100644 --- a/contracts/plugins/assets/DemurrageCollateral.sol +++ b/contracts/plugins/assets/DemurrageCollateral.sol @@ -38,7 +38,7 @@ contract DemurrageCollateral is FiatCollateral { using FixLib for uint192; using OracleLib for AggregatorV3Interface; - uint48 public constant t0 = 1704067200; // {s} Jan 1st 2024 00:00:00 GMT+0000 + uint48 public constant T0 = 1704067200; // {s} Jan 1st 2024 00:00:00 GMT+0000 bool internal immutable isFiat; bool internal immutable targetUnitFeed0; // if true: feed0 is {target/tok} @@ -141,7 +141,7 @@ contract DemurrageCollateral is FiatCollateral { function refPerTok() public view override returns (uint192) { // Monotonically increasing due to target unit (and reference unit) deflation - uint192 denominator = FIX_ONE.minus(fee).powu(uint48(block.timestamp - t0)); + uint192 denominator = FIX_ONE.minus(fee).powu(uint48(block.timestamp - T0)); if (denominator == 0) return FIX_MAX; // TODO // up-only diff --git a/docs/demurrage-collateral.md b/docs/demurrage-collateral.md index 952f6a0b7..e10213c25 100644 --- a/docs/demurrage-collateral.md +++ b/docs/demurrage-collateral.md @@ -65,6 +65,8 @@ This is identical to the calculation for the `refPerTok()` function in the [Demu weight = 1 / (1 - fee) ^ seconds; ``` +`fee()` available on DemurrageCollateral contract + ### Implementation [DemurrageCollateral.sol](../contracts/plugins/assets/DemurrageCollateral.sol) implements a generalized demurrage collateral plugin that should support almost all use-cases diff --git a/scripts/verification/collateral-plugins/verify_arb_100.ts b/scripts/verification/collateral-plugins/verify_arb_100.ts index 44b21a904..0c4a4433f 100644 --- a/scripts/verification/collateral-plugins/verify_arb_100.ts +++ b/scripts/verification/collateral-plugins/verify_arb_100.ts @@ -49,7 +49,7 @@ async function main() { await verifyContract( chainId, - assetCollDeployments.collateral.ARB, + assetCollDeployments.collateral.DMR100ARB, [ { erc20: networkConfig[chainId].tokens.ARB, diff --git a/scripts/verification/collateral-plugins/verify_cbbtc_100.ts b/scripts/verification/collateral-plugins/verify_cbbtc_100.ts index 112a85a28..c1809ce3f 100644 --- a/scripts/verification/collateral-plugins/verify_cbbtc_100.ts +++ b/scripts/verification/collateral-plugins/verify_cbbtc_100.ts @@ -46,12 +46,12 @@ async function main() { const collateral = await hre.ethers.getContractAt( 'ICollateral', - assetCollDeployments.collateral.cbBTC! + assetCollDeployments.collateral.DMR100cbBTC! ) await verifyContract( chainId, - assetCollDeployments.collateral.cbBTC, + assetCollDeployments.collateral.DMR100cbBTC, [ { erc20: networkConfig[chainId].tokens.cbBTC, diff --git a/scripts/verification/collateral-plugins/verify_eurc_100.ts b/scripts/verification/collateral-plugins/verify_eurc_100.ts index 759cce433..5886dd3e3 100644 --- a/scripts/verification/collateral-plugins/verify_eurc_100.ts +++ b/scripts/verification/collateral-plugins/verify_eurc_100.ts @@ -46,12 +46,12 @@ async function main() { const collateral = await hre.ethers.getContractAt( 'ICollateral', - assetCollDeployments.collateral.EURC! + assetCollDeployments.collateral.DMR100EURC! ) await verifyContract( chainId, - assetCollDeployments.collateral.EURC, + assetCollDeployments.collateral.DMR100EURC, [ { erc20: networkConfig[chainId].tokens.EURC, diff --git a/scripts/verification/collateral-plugins/verify_paxg_100.ts b/scripts/verification/collateral-plugins/verify_paxg_100.ts index f99deaba2..cbf0a250d 100644 --- a/scripts/verification/collateral-plugins/verify_paxg_100.ts +++ b/scripts/verification/collateral-plugins/verify_paxg_100.ts @@ -47,12 +47,12 @@ async function main() { const collateral = await hre.ethers.getContractAt( 'ICollateral', - assetCollDeployments.collateral.PAXG! + assetCollDeployments.collateral.DMR100PAXG! ) await verifyContract( chainId, - assetCollDeployments.collateral.PAXG, + assetCollDeployments.collateral.DMR100PAXG, [ { erc20: networkConfig[chainId].tokens.PAXG,