Wallet Contract

Target releaseMercury
Epic
Document status
DRAFT
Document owner
Designer
Developers
QA

Goals

  • Growth

Background and strategic fit

Blockchain platforms involve the distribution and exchange of cryptocurrency.  By extension, it is necessary to have a wallet where the cryptocurrency can be stored and exchanged. 

Assumptions


Requirements

#TitleUser StoryImportanceNotes
1WalletAs an investor or contract developer, I need a place where I can store my RevMust Have
  • Basic wallet to store and exchange Rev
2Private KeyAs an investor, I need a private secure key so that no one can steal my cryptocurrencyMust Have
  • Security 101 for wallets
3Ethereum compatibilityAs an Ethereum investor, I want to be able to reuse my ETH addresses to store my Rev, so that I don't need to have a whole new set of addresses.Must Have
  • Not sure how this could work without burning Rev (ex: BTC and BTC Cash problem) - get a token that is backed by Ether.  Cannot store ETH directly in RChain.  
  • Suggest that the RChain address be the same as the ETH address, except that the address starts with 'RX' instead of '0X'.
4Contract WalletAs a contract developer, I need a place where I can store my Rev and execute my contracts Must Have
  •  
5Wallet controls Contract WalletsAs a contract developer, I need to see all my contract accounts in a single place so that I can transfer Rev from my Rev wallet to power my smart contractsMust Have
6Rev to Phlogiston ExchangeAs a contract developer, I need to be able to 'fund' my contract accounts with Phlogiston by moving Rev from my Account to a contract account.Must Have
  • Need to determine what the Rev→Phlogiston exchange looks like (exchange rate)
7Out of Gas BehaviorAs a contract runner, I need to know what to expect in the event I run out of funds while running a contractMust Have
  • Ethereum out-of-gas (and many (most?) other types of) exceptions cause

    1. state changes by the contract code to be rolled back;
    2. the transaction recorded on the blockchain with the exception as its result;
    3. the nonce of the sending account incremented; and,
    4. the gas to be forfeit to the miner.

User interaction and design

Being developed by the Holdings group.

Questions

Below is a list of questions to be addressed as a result of this requirements document: (Answered by Lucius Gregory Meredith )

QuestionOutcome
Does creating Contract Wallets cost Phlogiston?Yes absolutely.  Everything costs 
Do Contract wallets house only a single contract?Yes - 
Who pays the Pholgiston in a contract?  Sender or receiver?  In Ethereum, the sender always pays.Could be more sophisticated in the future, for mercury - yes only the sender.

Do we need to consider ETH→ Phlogiston exchange?  Or will ETH need to be converted to Rev?

No

How much storage is allocated for a default contract wallet? Yes - we will have provisioning defaults, but we need to be careful.  We want to be sensitive to the fact that these resources will cost.  RHOL-17 - Getting issue details... STATUS
What is the default minimum amount of Phlogiston needed to transact with a contract wallet?  Is there a default?See above.
What happens to transactions that run out of Phlogiston?  Do they land up on the blockchain?Throw an exception.  For audit purposes, the fact that it threw the error needs to be on the blockchain.  Greg doesn't think that ETH records the out of gas error. Our traces become debugging audit logs.   If the continuation gets into the Key value store - then the data doesn't get rolled back.  User would obtain inforamtion that they needed to add more gas to continue execution. 


Not Doing

    • MutliSig contract wallets. - Stretch goal for Mercury - Nice to have. (we need to decide how critical Multi-Sig wallets are for Mercury)
    • No 'watch only' wallets - should be easy to do - try to include it.