Support for ERC20 Tokens

Support for ERC20 Tokens

Target release

Mercury

Epic

Document status

DRAFT

Document owner

@Medha Parlikar (Unlicensed)

Designer

Developers

QA

Goals

  • Growth

Background and strategic fit

Most tokens in the market today are ERC20 tokens.  Supporting this standard includes RChain tokens in the mainstream body of tokens available today.  Here are the key methods that are part of the ERC20 Token contract.

functiontotalSupply()constantreturns(uinttotalSupply); 4 functionbalanceOf(address_owner)constantreturns(uintbalance); 5 functiontransfer(address_to,uint_value)returns(boolsuccess); 6 functiontransferFrom(address_from,address_to,uint_value)returns(boolsuccess); 7 functionapprove(address_spender,uint_value)returns(boolsuccess); 8 functionallowance(address_owner,address_spender)constantreturns(uintremaining); 9 eventTransfer(addressindexed_from,addressindexed_to,uint_value);10 eventApproval(addressindexed_owner,addressindexed_spender,uint_value);

Assumptions

Requirements

#

Title

User Story

Importance

Notes

#

Title

User Story

Importance

Notes

1

Address format

Determine the format for RChain addresses

Must Have

  • ECDSA curves

2

Token Properties

Come up with the properties of the Rev token

Must Have

  •  Name, decimal point, etc..

3

Rev Distribution

Determine how Rev will be distributed, mined, released and implement.

Must Have

  • Validator rewards, supply parameters

4

Rev to Phlogiston Exchange

System contracts that exchange Rev to Phlogiston and back

Must Have

  • Powers the purchase of Phlogiston with Rev

5

 

 

 

 

User interaction and design

Questions

Below is a list of questions to be addressed as a result of this requirements document:

Question

Outcome

Question

Outcome

Does Rev pay for itself?

Rev is a special contract.  It is not like other tokens.  It is a staking token.  Every node is going to run a Rev contract, and they won't be paid for it.  No rent needs to be paid on the Rev token contract.  This is what makes staking tokens special from other types of tokens.

Not Doing