Use MiniMe token instead of ERC20 token #170
Closed
opened 2019-08-26 16:12:31 +00:00 by haythem96
·
4 comments
No Branch/Tag Specified
master
new-final-deploy
new-final-deploy-2
reimbursement-export
staging
legacy
addresses/rsk-testnet-raucao-1
ipfs-defaults
deletemewhendone
feature/184-improve_withdrawal
tests/contracts-contribution
tests/contracts-kit
kit/add-vault-app
feature/ipfs_hash_in_add_response
chore/bootstrap-on-travis
chore/remove-direct-aragon-cli-dependency
chore/update-dependencies-1
fix/ipfs-config
apm-hack
wtf/package-lock
feature/contributor-balance
feature/constructor-options
v7.5.0
v7.4.0
v7.3.0
v7.2.0
v7.1.0
v7.0.0
v7.0.1
v7.0.0-beta.0
v6.0.0
v5.5.0
v5.4.0
v5.3.0
v5.2.0
v5.1.1
v5.1.0
v5.0.0
v4.0.2
v4.0.1
v4.0.0
v3.0.2
v3.0.1
v3.0.0
Labels
Clear labels
good first issue
ipfs
rsk
scaling
bug
dev environment
docs
duplicate
enhancement
feature
idea
invalid
kredits-1
kredits-2
kredits-3
question
security
ui/ux
wontfix
Good for newcomers
Something is not working
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Looking for an answer
release
major
release
minor
release
patch
All your base are belong to us
User interface, process design, etc.
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kredits/contracts#170
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The MiniMe token is a cloneable ERC20 token, It is designed to easily spawn tokens that have the same balance distribution as the parent token at any given block number. This gives any developer the ability to give extra functionality to token holders while leaving the original token unaffected.
More details: https://medium.com/giveth/the-minime-token-open-sourced-by-giveth-2710c0210787
Can you document some of the advantage here on which we then can decide if/how/when to do this.
The MiniMe Token is created by the Giveth team that maintains a history of balances and is easily cloned to create independent tokens with unique functionality.
Advantages:
MiniMe is an ERC20 compatible token implementation, that allows querying token balances of holders at any block height (as the vanilla ERC20 specification only provides the current balance). MiniMe tokens allow for a fairly simple solution to the double voting problem, a problem which can be exploited by an account voting with their tokens, then transferring them to another account and then voting again with this different account. If using a MiniMe token, when a vote is created, a past block number is selected as the snapshot block for the vote. When someone votes, their balance is checked at the snapshot block number, and because the same token can't be in two accounts at the same time at the end of a block, the double voting problem is prevented.
Downsides:
MiniMe transfers are costly (transfers are at least 50k gas more expensive): every transfer needs to add a checkpoint to both accounts involved in the transfer. This results in at least one fresh SSTORE (for a non-zero slot) and modifying the checkpoints array length (1 SSTORE with a 15k refund if it is not the first transfer) per account. Balance checks are also more expensive, the best case (checking the current balance) resulting in at least two additional SLOAD.
Interesting solution!
However, we do not plan on voting using the ERC20 tokens, but only the ERC271 tokens, which cannot be transferred between accounts. Our contribution tokens are always tied to a contributor profile.
So it would seem to me that the costly transfers are not worth the benefit in this case.
Closing due to inactivity. Feel free to re-open.