# EVM-less Vochain

EVM-less Vochain is the term used to describe the decoupling of the Vocdoni voting infrasctructure from EVM based blockchains used as source of truth.

# Overview

# EVM based blockchains as source of truth for the Vochain

A set of smart-contracts can be used the source of truth for all data that is required for bootstrapping and managing voting processes and entities (aka organizations, groups, DAOs ...).

Oracles act as a trusted bidirectional message passing component between EVM based blockchains and the Vochain.

i.e Entity creates a voting process in Ethereum mainnet -> ProcessCreated event is fired -> Oracle read the Ethereum event -> Oracle created a NewProcessTx Vochain transaction and signs with its private key -> voting process is created in the Vochain.

# Vochain as source of truth

Using EVM based blockchains like Ethereum mainnet as source of truth adds and extra layer of security for processes and entities data integrity as well minimizing spam attacks (only oracles can create processes on the Vochain and entities pay gas costs when EVM contract interaction) but also adds a lot of friction for process and entity management as well as adding the need of the Oracles trusted component.

The EVM-less Vochain approach adds the possibility for entities to interact with the Vochain without any trusted component acting as a middlemen between the source of truth and the Vochain. There is no need to interact with any EVM based blockchain at all.

This of course comes at the cost of not having a more secure chain like Ethereum mainnet acting as the source of truth, but for most of the uses cases is a trade-off worth to do in order to have less UX friction and to lower the budget required to operate processes and entities.

In order to avoid spam attacks and create future incentivization mechanisms around the Vochain a native token is required to interact with the Vochain.

# Concepts

# Treasurer

The Treasurer is a genesis privileged account that can mint native Vochain tokens and can granurally set the cost of the transactions.

# Account

An account is key-value entry in a merkle tree where the key is a standard Ethereum address and the value contains a nonce, the balance of the account, a set of delegates and an URI that points to the metadata of the account (usually a decentralized storage URI).

An account can:

  • Create and manage voting processes
  • Transfer tokens
  • Give power to other accounts to act on his behalf
  • Manage its metadata

# Entity

An entity is an account with tokens that have its metadata set.

# Delegate

A delegate is an account that can act on behalf of other accounts having access to a subset of the account owner permissions. A delegate can:

  • Create and manage voting processes
  • Manage account metadata A delegate cannot:
  • Send tokens

# Faucet

The faucet mechanism allows an address with Tokens to sign off-chain a payload that can be used by the recipient in any moment to claim funds from the address signing the payload.

# Transactions

All transactions can be submitted using the gateways API submitRawTx method.

  • SetAccountInfoTx
message SetAccountInfoTx {
	TxType txtype = 1;
	uint32 nonce = 2;   // account nonce for the transaction
	string infoURI = 3; // infoURI to set
	bytes account = 4;  // account to be changed
	FaucetPackage faucetPackage = 5; // faucet payload used on account creation
  • SetAccountDelegateTx

    • AddDelegateForAccount

      message SetAccountDelegateTx {
          TxType txtype = 1; // ADD_DELEGATE_FOR_ACCOUNT
          uint32 nonce = 2;  // account nonce for the transaction
          bytes delegate = 3; // delegate to add (ethereum like address)
    • DelDelegateForAccount

      message SetAccountDelegateTx {
          TxType txtype = 1; // DEL_DELEGATE_FOR_ACCOUNT
          uint32 nonce = 2;  // account nonce for the transaction
          bytes delegate = 3; // delegate to delete (ethereum like address)
  • SendTokensTx

message SendTokensTx {
	TxType txtype = 1;
	uint32 nonce = 2; // account nonce for the transaction
	bytes from = 3;   // from address
	bytes to = 4;     // to address
	uint64 value = 5; // value to send
  • CollectFaucetTx
message CollectFaucetTx {
	TxType txType = 1;
	FaucetPackage faucetPackage = 2;
	uint32 nonce = 3;       // nonce of the account claiming

/// Generated by the issuer

message FaucetPackage {
	FaucetPayload payload = 1;
	bytes signature = 2;   // signature of the faucet payload

message FaucetPayload {
	uint64 identifier = 1; // random nonce
	bytes to = 2;          // address able to claim the amount
	uint64 amount = 3;     // amount to claim
  • MintTokensTx
message MintTokensTx {
	TxType txtype = 1;
	uint32 nonce = 2; // Treasurer nonce
	bytes to = 3;     // to address
	uint64 value = 4; // value to mint
  • SetTransactionCostsTx
message SetTransactionCostsTx {
	TxType txtype = 1; // transaction type to set the cost to
	uint32 nonce = 2;  // Treasurer nonce
	uint64 value = 3;  // value to set 
  • NewProcessTx
message NewProcessTx {
	TxType txtype = 1;
	uint32 nonce = 2;
	Process process = 3;
  • SetProcessTx
message SetProcessTx {
	TxType txtype = 1;
	uint32 nonce = 2;
	bytes processId = 3;
	optional ProcessStatus status = 4;
	optional uint32 questionIndex = 5;
	optional bytes censusRoot = 6;
	optional string censusURI = 7;
	optional Proof proof = 8;
	optional ProcessResult results = 9;
Last Updated: 9/1/2022, 10:00:25 AM