Skip to content

bokkypoobah/RAREPeperiumToken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RARE Peperium Token

RARE Peperium Token

The owner of the RARE Peperium contract asked why the TokenTraderFactory contract was now working with their supposedly ERC20-compliant token.

I had a quick scan of the emailed token contract code and found some bugs in the RARE Peperium contract deployed to 0x584AA8297eDfCB7d8853a426bb0f5252C4aF9437.

One of the issues was that totalSupply is reported as 115792089237316195423570985008687907853269984665640564039457583907913129639936 . The intended total supply is 100,000,000.

Following are alternative block explorer views of this contract:

I have offered to fix, test and audit the code, so here is the repository with the fix, tests and security audit.

I have also offered to help him migrate the token balances from the old RARE token contract to the new RARE token contract.

The new token contract has now been deployed to 0x5ddab66da218fb05dfeda07f1afc4ea0738ee234.

A snapshot of the old token contract account balances was taken at block #3834349 with the timestamp 1496833201 Wed, 07 Jun 2017 11:00:01 UTC .

These balances were transferred to the new token contract, reconciled (see scripts/reconcileBalances.txt) and the contract sealed.

Ownership of the contract is in the process of being transferred to Michael C.



Conversation with Michael C Apr 24 2017

  • Hardcoded the initial supply of 100 million units with 8 decimals, symbol R$, name RARE

Conversation with Michael C May 11 2017

  • The missing 1,000,000 is due to the burning of this amount of tokens to signify the RARE release date.
  • The total supply will have to be adjusted for this burning events


Actions



Deployment Steps

  • MC to inform users to halt transfers of the old tokens after a specified block in the near future
  • BK to extract the token balances for all accounts at the specified block - snapshot at block=3834349 time=1496833201 Wed, 07 Jun 2017 11:00:01 UTC
  • BK to deploy new token contract - address 0x5ddab66da218fb05dfeda07f1afc4ea0738ee234
  • BK to fill the new token contract with the token balances for all accounts
  • BK to seal the new token contract
  • BK to reconcile the token numbers between the old and new token contracts - see scripts/reconcile.sh and scripts/reconcileBalances.txt
  • BK to call token.transferOwnership(...) to transfer the contract to MC's account
  • MC to call token.acceptOwnership() to accept the transfer of the contract


Deployment Cost

Following are the transaction cost of deploying the new RARE token contract, with the 323 account balances transferred totaling 0.085889375 ETH:

0xa052ae71 0.02079118543703 0x8423def6 0.00757892 0xf681a8f0 0.00502287 0x83d758f3 0.0049126 0x838dd32e 0.00491362 0x6a90885b 0.00491208 0xec72251e 0.00491157 0xa101e698 0.00491311 0x032843d7 0.00491157 0x19741741 0.00491055 0xf1d4b376 0.00491157 0x454bb51f 0.00491925 0x2cdeb3ab 0.0049172 0xbb67c6b6 0.00302516 0x5ce235c6 0.00033812


(c) BokkyPooBah / Bok Consulting Pty Ltd - May 09 2017

About

RARE Peperium Token

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors