Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a Work In Progress.

...

TermDescriptoon
Purseholds REV. Purses holding REV can only be sent to other purses capable of holding REV minted by the must only accept (in their methods) other purses produced by the (same) REV Mint
VaultAdds the guard  guard around a Purse. The "guard" can be a simple public key or a more complicated multisig smart-contract.

It also adds auditing to all REV transfers and enforces that a Purse is only sent to another REV Vault (to ensure all REV transfers are audited and conserved.)
  • Anyone can make a deposit to a Vault. The REV Address is used to lookup which vault should receive the deposit of REV, as well as to look up the Vault used to spend.
  • Only the holder of the Vault key can spend it.
REV Address

A REV Address is a human-readable representation of where REV can be sent. It is used by off-chain it exchanges and wallets as part of the user experience.


An off-chain REV Address is used to lookup the Vault on-chain.

REV MintThe REV Mint issues Purses and ultimately ensures the total supply of REV is conserved. (The Rev Mint is part of the REV Vault contract.)

Lockbox

The Lockbox is required to transfer REV out of the Purse locked by the Vault. There are two types:

  • Public-key proof of possession of the private key.
  • Possession of the unforgeable name used to create the Vault.

...

The Rev Vault Contract is where most of the logic lives for on-chain REV movement.

It must support:

FunctionParamsDesription
findOrCreateREV Address

Looks up the Vault via the REV Address. If it finds one, it sends it back on the return channel. If a Vault does not exist at this REV address. a new empty Vault is created with this address.

The Vault sent back is suitable to be the recipient of a REV Purse via "deposit"

lookup the public key in REV-Address-Registry => Some(Vault)

  1. case Some => return
  2. case None =>
    1. REV Mint create empty purse => Purse
    2. new Vault(Purse, defaultAuthCode)
    3. register REV Address => Vault in REV-Address-registry
    4. return
createREV AddressCreates a new Vault with address REV Address, and registers it in the REV-Address-Registry. This will typically be called by a rholang contract the creates a Valut intended to be used by a multisig smart contract.
Note: This approach could also be used to create a wallet that could be spent using an Ethereum address, and thus be used to 
transferDestVault REV Address, Amount, Lockbox

Transfer REV from this Vault to another Vault. Lockbox proves ownership over the Vault sending the REV.

transfer means:

  • lockbox.verify() => matches?
  • purse.split(amount) => p1
  • findOrCreat(DestVault REV Address) => v1
  • v1.deposit(p1)
depositPurseDeposits Purse into the Vault. (Combing it with existing Purse in Vault.)



...

Ad 3.

The Create contract seems to be:

...