Create demurrage calc from contract

This commit is contained in:
nolash
2021-07-04 12:10:01 +02:00
parent 00bb87e3ec
commit 98c460dc2f
17 changed files with 103 additions and 13 deletions

View File

@@ -61,6 +61,9 @@ contract DemurrageTokenMultiCap {
// (this constant x 1000000 is contained within 128 bits)
uint256 constant ppmDivider = 100000000000000000000000000000000;
// demurrage decimal width; 38 places
uint256 public immutable resolutionFactor = ppmDivider * 1000000;
// Timestamp of start of periods (time which contract constructor was called)
uint256 public immutable periodStart;

View File

@@ -56,6 +56,9 @@ contract DemurrageTokenMultiNocap {
// (this constant x 1000000 is contained within 128 bits)
uint256 constant ppmDivider = 100000000000000000000000000000000;
// demurrage decimal width; 38 places
uint256 public immutable resolutionFactor = ppmDivider * 1000000;
// Timestamp of start of periods (time which contract constructor was called)
uint256 public immutable periodStart;

View File

@@ -56,7 +56,7 @@ contract DemurrageTokenSingleCap {
uint256 constant growthResolutionFactor = 1000000000000;
// demurrage decimal width; 38 places
uint256 immutable resolutionFactor = nanoDivider * growthResolutionFactor;
uint256 public immutable resolutionFactor = nanoDivider * growthResolutionFactor;
// Timestamp of start of periods (time which contract constructor was called)
uint256 public immutable periodStart;

View File

@@ -53,7 +53,7 @@ contract DemurrageTokenSingleCap {
uint256 constant growthResolutionFactor = 1000000000000;
// demurrage decimal width; 38 places
uint256 immutable resolutionFactor = nanoDivider * growthResolutionFactor;
uint256 public immutable resolutionFactor = nanoDivider * growthResolutionFactor;
// Timestamp of start of periods (time which contract constructor was called)
uint256 public immutable periodStart;