mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-11-22 08:16:47 +01:00
added use case example and small clarifications
This commit is contained in:
parent
ed9d9b3833
commit
99adbef196
31
README.md
31
README.md
@ -1,25 +1,42 @@
|
|||||||
# RedistributedDemurrageToken
|
# RedistributedDemurrageToken
|
||||||
|
|
||||||
|
## Use Case
|
||||||
|
* Network / Basic Income Token
|
||||||
|
* 100 Sarafu is distributed to anyone in Kenya after user validation by the owner of a faucet which mints new Sarafu.
|
||||||
|
* Validated users are those that validate their phone number in Kenya
|
||||||
|
* A monthly Sarafu holding tax (demmurrage) of 2% is recorded as a `demurrageModiifer`.
|
||||||
|
* Supply and user actual balances stay the same but are displayed minus the `demurrageModiifer`.
|
||||||
|
* Each month the total amount of demurage is distributed out to users _active_ and the `demurrageModiifer` for each user is reset to zero.
|
||||||
|
* a single transaction is considered _active_ (heartbeat).
|
||||||
|
* This is meant to result in a disincentivization to hold (hodl) the Sarafu token and increase it's usage as a medium of excahnge rather than a store of value.
|
||||||
|
|
||||||
|
|
||||||
|
## Inputs to Constructor (Set only once during contract deployment)
|
||||||
|
|
||||||
|
* 'Decay amount' (ppm) and period (blocks) is set at deploy time.
|
||||||
|
- Cannot be changed
|
||||||
|
- aka a holding Fee: A percentage of a users balance that will be charged and eventually redistributed to active users
|
||||||
|
* Demmurage Period: The time frame over which a new Holding Fee is applied and redistributed.
|
||||||
|
|
||||||
|
|
||||||
## Ownership
|
## Ownership
|
||||||
|
|
||||||
* Contract creator is owner
|
* Contract creator is owner
|
||||||
* Ownership can be transferred (also to ownership void contract)
|
* Ownership can be transferred (also to ownership void contract to make permissionless)
|
||||||
|
|
||||||
|
|
||||||
## Mint
|
## Mint
|
||||||
|
|
||||||
* Owner can add minters
|
* Owner can add minters
|
||||||
- A faucet contract would be a minter
|
- A faucet contract would be a minter and set the amount of tokens to mint and distribute to new (validated) users.
|
||||||
* Minters can mint any amount
|
* Minters can mint any amount
|
||||||
|
|
||||||
|
|
||||||
## Demurrage
|
## Demurrage
|
||||||
|
|
||||||
* Decay amount (ppm) and period (blocks) is set at deploy time.
|
|
||||||
- Cannot be changed
|
|
||||||
* Tax is applied when a **mint** or **transfer** is triggered for first time in new period;
|
* Tax is applied when a **mint** or **transfer** is triggered for first time in new period;
|
||||||
- Supply _stays the same_.
|
- Supply _stays the same_.
|
||||||
- Updates `demurrageModiifer` which represents an exponential decay step.
|
- Updates `demurrageModiifer` which represents an exponential decay step (of size 'Decay amount' and is a a percentage of user balance)
|
||||||
|
- `demurrageModifier`_(i) = 'Decay amount' x demurrageModifier_(i-1) x user balance
|
||||||
* All client-facing values (_balance output_ , _transfer inputs_) are adjusted with `demurrageModifier`.
|
* All client-facing values (_balance output_ , _transfer inputs_) are adjusted with `demurrageModifier`.
|
||||||
* Edge case: `approve` call, which may be called on either side of a period.
|
* Edge case: `approve` call, which may be called on either side of a period.
|
||||||
|
|
||||||
@ -28,7 +45,7 @@
|
|||||||
|
|
||||||
* One redistribution entry is added to storage for each period;
|
* One redistribution entry is added to storage for each period;
|
||||||
- When `mint` is triggered, the new totalsupply is stored to the entry
|
- When `mint` is triggered, the new totalsupply is stored to the entry
|
||||||
- When `transfer` is triggered, and the account did not yet participate in the period, the entry's participant count is incremented.
|
- When `transfer` is triggered, and the account did not yet participate in the period, the entry's participant count `demurrageModifier` is incremented.
|
||||||
* Account must have "participated" in a period to be redistribution beneficiary.
|
* Account must have "participated" in a period to be redistribution beneficiary.
|
||||||
* Redistribution is applied when an account triggers a **transfer** for the first time in a new period;
|
* Redistribution is applied when an account triggers a **transfer** for the first time in a new period;
|
||||||
- Check if have participated in period.
|
- Check if have participated in period.
|
||||||
|
Loading…
Reference in New Issue
Block a user