Process of a Transaction
This preserved section contains legacy technical specifications.
A full architectural overhaul of this documentation is actively being developed.
To understand how a transaction works in the MATE metaprotocol, we must first examine its process. The following diagram illustrates the steps for a wide variety of transactions:
The process is divided into three main stages:
-
Transaction Creation: The user creates and signs the transaction with their wallet.
-
Transaction Verification: Fishers verify the transaction's validity before relaying it to the MATE metaprotocol.
-
Transaction Execution: The transaction is executed, and rewards are distributed to the Fishers and/or Services who verified and/or executed it.
Each stage is detailed below.
Transaction Creation
In this first stage, the user constructs the transaction's payload, which includes:
- Sender Address: The address of the user sending the transaction.
- Variables: The specific data being transmitted in the transaction.
- Signature: The EIP-191 signature of the transaction, generated by the user's wallet. This signature, often created using the variables as the message, verifies the transaction's authenticity. Some execution functions require more than one signature to be valid.
Once the payload is constructed, the user sends the transaction to the mempool, private API or any Fishing Spot where it will be fished (captured) by Fishers.
In the case that the tx is sent, e.g. to Ethereum Mainnet, it should use the following gas parameters:
These gas parameters ensure that the transaction stays in the mempool and avoids processing, allowing it to be broadcasted and then fished.
Transaction Verification
In this stage, Fishers catch the transaction from the mempool (or receives it directly through an API) and verify its validity. The verification process includes:
-
Signature Verification: Fishers verify eaach EIP-191 signatures to ensure the transaction is authentic.
-
Nonce Verification: Fishers check the nonce of the transaction to ensure it if is a sync nonce the next in the sequence or if it is an async nonce the nonce is not already used.
-
Balances: As same happen in every blockchain, sender balance should be enough to cover a successful transaction.
If the transaction passes these verification steps, Fishers relies it to the MATE metaprotocol for execution.
Transaction Execution
In the final stage, the transaction is executed in the EVVM (Ethereum Virtual Virtual Machine) using EVM abstraction techniques, then rewards are distributed to the Fishers and/or Services who verified and/or executed it. The rewards depend of the EVVM and/or service type of execution.