Structs§
- ACCUMULATED_
INTEREST_ RATE_ SCALE - This is the scale factor for accumulated interest rate:
BLOCKS_PER_YEAR * 2 ^ 80
. The actual accumulate interest rate stored will beaccumulate_interest_rate / INTEREST_RATE_SCALE
. - COLLATERAL_
DRIPS_ PER_ STORAGE_ KEY - The collaterals in drips for one key/value pair in storage.
- DRIPS_
PER_ STORAGE_ COLLATERAL_ UNIT - This is the unit of storage collateral to deposit
- INITIAL_
INTEREST_ RATE_ PER_ BLOCK - This is the initial interest rate per block with scale:
4% / BLOCKS_PER_YEAR * INTEREST_RATE_PER_BLOCK_SCALE
. - INTEREST_
RATE_ PER_ BLOCK_ SCALE - The initial annual interest is 4%, which means the initial interest
rate per block will be
4% / BLOCKS_PER_YEAR
. We will multiply it with scale factor and store it as an integer. This is the scale factor of initial interest rate per block. - POS_
VOTE_ PRICE - This controls the tokens required for one PoS vote
- SERVICE_
CHARGE_ RATE - This is the service charge rate for withdraw,
SERVICE_CHARGE_RATE / SERVICE_CHARGE_RATE_SCALE = 0.05%
- SERVICE_
CHARGE_ RATE_ SCALE
Constants§
- BLOCKS_
PER_ DAY - This is the number of blocks per day.
- BLOCKS_
PER_ HOUR - This is the number of blocks per hour.
- BLOCKS_
PER_ SECOND - This is the number of blocks per second.
- BLOCKS_
PER_ YEAR - This is the number of blocks per year.
- CODE_
COLLATERAL_ UNITS_ PER_ KI_ BYTES - This is the storage collateral units for each KiB of code, amount in COLLATERAL_UNITs. Code collateral is calculated by each whole KiB rounding upwards.
- COLLATERAL_
UNITS_ PER_ STORAGE_ KEY - This is the storage collateral units to deposit for one key/value pair in storage. 1 CFX for 16 key value entries.
- INVERSE_
INTEREST_ RATE - The inverse of interest rate