Updates max allowed stake size in economics

pull/1884/head
vzotova 2020-05-01 17:20:34 +03:00
parent 79ef05bbbb
commit a81f8b4edf
4 changed files with 3 additions and 4 deletions

View File

@ -57,7 +57,7 @@ class BaseEconomics:
# Value Constraints
_default_minimum_allowed_locked = NU(15_000, 'NU').to_nunits()
_default_maximum_allowed_locked = NU(4_000_000, 'NU').to_nunits()
_default_maximum_allowed_locked = NU(30_000_000, 'NU').to_nunits()
# Slashing parameters
HASH_ALGORITHM_KECCAK256 = 0

View File

@ -188,7 +188,6 @@ abstract contract Issuer is Upgradeable {
(_totalLockedValue * coefficient);
// rounding the last reward
// TODO optimize
uint256 maxReward = getReservedReward();
if (amount == 0) {
amount = 1;

View File

@ -66,7 +66,7 @@ def test_rapid_deployment(token_economics, test_registry, tmpdir, get_random_che
]
# Pile on the rest
for _ in range(NUMBER_OF_ALLOCATIONS_IN_TESTS - len(allocation_data)):
for _ in range((NUMBER_OF_ALLOCATIONS_IN_TESTS - len(allocation_data)) // 2):
checksum_address = get_random_checksum_address()
amount = random.randint(token_economics.minimum_allowed_locked, token_economics.maximum_allowed_locked)
duration = random.randint(token_economics.minimum_locked_periods, token_economics.maximum_rewarded_periods)

View File

@ -142,7 +142,7 @@ def test_exact_economics():
1002509479452054794520547, # Max possible reward for one period for all stakers in the first phase
30, # Min amount of periods during which tokens can be locked
15000000000000000000000, # min locked NuNits
4000000000000000000000000, # max locked NuNits
30000000000000000000000000, # max locked NuNits
2) # Min worker periods
#
# Token Economics