erc20-demurrage-token

ERC20 token with redistributed continual demurrage
Log | Files | Refs | README

commit cf1e716b5a68234714426742235a157e0c489fe4
parent fab1b2d4b844048bcfcf9fb17cd210a78331bc7a
Author: lash <dev@holbrook.no>
Date:   Sun, 12 Feb 2023 13:53:36 +0000

Fix bogus demurrage calculation in publish script

Diffstat:
Mpython/erc20_demurrage_token/runnable/publish.py | 3++-
Mpython/setup.cfg | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/python/erc20_demurrage_token/runnable/publish.py b/python/erc20_demurrage_token/runnable/publish.py @@ -68,10 +68,11 @@ def process_config_local(config, arg, args, flags): config.add(sink_address, 'TOKEN_SINK_ADDRESS') config.add(args.redistribution_period, 'TOKEN_REDISTRIBUTION_PERIOD') - v = args.demurrage_level / 1000000 + v = (1 - (args.demurrage_level / 1000000)) ** (1 / config.get('TOKEN_REDISTRIBUTION_PERIOD')) if v >= 1.0: raise ValueError('demurrage level must be less than 100%') demurrage_level = to_fixed(v) + logg.info('v {} demurrage level {}'.format(v, demurrage_level)) config.add(demurrage_level, 'TOKEN_DEMURRAGE_LEVEL') return config diff --git a/python/setup.cfg b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = erc20-demurrage-token -version = 0.3.3 +version = 0.3.4 description = ERC20 token with redistributed continual demurrage author = Louis Holbrook author_email = dev@holbrook.no