Mina Domain Model
Last updated
Was this helpful?
Last updated
Was this helpful?
Mina is a lightweight blockchain that operates on Proof-of-Stake consensus. What makes this blockchain succinct and lightweight is the zero-knowledge principle of consensus, which allows the consensus to be reached without full knowledge of all history of transactions. Mina solves the blockchain trilemma (see Figure 1 and Appendix 1) by separating the functions of block production performed by validators (block producers), transaction validation and verification performed by ZK-snarkers (snark producers), and storing the blockchain historical data performed by archive nodes. Like any other blockchain, the Mina blockchain consists of blocks that are added to the canonical chain using an encryption algorithm and which contain data about transactions manifesting the change of state (state machine).
Validators, in their turn, are nodes that create blocks, therefore they’re also called block producers. To do so, they pick out transactions from the mempool which are of the highest amount and match them with a ZK-snark from the snarketplace, for which the ZK-snarker takes the smallest fee. When a certain set of transaction-ZK-snark matches has accumulated, a new block is produced. Later nodes vote for the new block. If they validate it, it is then a canonical block, and it is added to the canonical chain, otherwise, this block is deemed orphaned and doesn’t enter the chain. The Mina Protocol is designed in a way that no forks are possible and the canonical chain is, in theory, infinite. For producing a block a validator receives a reward, which has a coinbase. The reward is paid in tokens - Mina. In usual blocks a coinbase is 720 mina, in supercharged blocks - 1440 Mina. In case the account of the validator is unlocked, the validator creates a supercharged block, for which it is granted a double reward. The process of getting a reward for block production is called staking. Staking is an incentive for blockchain participants to be involved in maintaining blockchain integrity. Staked tokens are locked for an epoch plus a period before the validator distributes rewards. This time is specified in the terms, and, combined with an epoch it makes up 1 calendar month. An epoch consists of 7140 slots and lasts roughly for roughly 2 weeks (almost 15 days, to be more exact).
In Mina, there are nodes that produced at least one block in the last epoch and there's nodes that are just connected to the network but are now engaged in block production and Consensus. Nodes that produced at least one block in the last epoch are called “active validators“. So a node (a validator) does not necessarily need to produce blocks to be part of Mina Blockchain: it’s possible that a user runs a node but is not involved in block production.
A validator also stakes its tokens in the blockchain. The more a validator stakes, the more chances of winning a block it has. Furthermore, a validator may delegate its funds to itself.
Not only validators can stake tokens. If an account wants to stake Mina but doesn’t wish to run a node, it may delegate tokens to a validator. In this case, this account is a delegator. At the end of an epoch, delegators get repaid with part of the total validator’s reward according to their share in the total amount of the tokens staked by the validator. To delegate a validator charges a fee from its delegators. Overall, a delegator receives its share of the reward minus the fee. This is the way both delegators and validators are encouraged to stake tokens with Mina. Not all delegators delegate tokens - some can just have an account but stay passive and choose not to delegate their tokens. Moreover, delegators can delegate tokens themselves. At any time a delegator may choose to undelegate its tokens. A delegator delegates all its balance and can’t delegate only its part. During the delegation period, a delegator may use the delegated tokens in transactions and can withdraw it. The balance changes affect the delegated amount and the repaid reward respectively.
Both nodes and delegators have an account through which they stake tokens. An account consists of a private key and a public key. A public key is the part of the account address that is seen by the other blockchain community. A private key is kept secret. It under no condition must be revealed to the public or third persons for security reasons. A public key is used to prove a validator’s vote for a block. A private key is used to access the account.
We develop an explorer that accumulates analytical data about nodes, blocks, transactions, rewards, fees, epochs and any other relevant data about the Mina blockchain for stakeholders, be it individual users, holders, traders or validator owners and other experts and stakeholders. We want our explorer to be easy to use and navigate, succinct, compendious and helpful for users.
The diagram in Figure 2 shows the main entities in Mina Protocol and their associations.
See .
See .
See .