Edge Sequencer
The Edge Sequencer acts as an intermediary, batching transactions and managing provably fair randomization. It is operated either by us or the game developer and is commonly developed using serverless technology to enable easy deployment and ensure low latency worldwide.
Authorization
The Edge Sequencer must be authorized by the game developer to process transactions on specific smart contracts based on a trust assumption. This trust stipulates that a whitelisted Edge Sequencer will prevent users from replaying transactions with previously revealed random numbers, a necessary tradeoff for enhanced performance simulations. It is important to note that if your game does not incorporate randomization, it remains fully trustless regardless of the Edge Sequencer used.
Provably Fair Randomization
Unlike oracle-based randomization, which aims to minimize predictability, provably fair randomization ensures fairness and transparency. The Edge Sequencer knows a deterministic random number (server seed) in advance; its hash is then sent to the user. The user also contributes a signed random number (client seed) from their end. These two seeds combine to form the final random number used in the smart contract. Since the client seed is signed by the user, the Edge Sequencer cannot alter it.
The primary risk with an Edge Sequencer is the potential for allowing users to cheat by revealing the random number prematurely or permitting the replay of transactions once the random number has been disclosed. Therefore, it is crucial for the Edge Sequencer to be trusted by the game developer to prevent such fraud.
Transaction Batching
The Edge Sequencer batches transactions, revealing the randomization at the outset. We utilize a standard interface for the Edge Sequencer to submit these transactions, and game developers create smart contracts that support this standard. The batching system is designed to execute AUTHCALL from the user's wallet to the game contract and reveal the random value via a transient storage slot in the Edge Sequencer Controller Contract, which only lasts for the duration of a transaction.
Edge Sequencer Controller Contract
The Edge Sequencer Controller Contract is pivotal, linking the edge node, Edge Sequencer, and the Hokum blockchain. Its functionalities include:
Accepting batched transactions with randomization details and performing
AUTHCALLon the user's wallet to the game contract.Acting as temporary storage for game contracts to access the revealed random value.
Serving as a central smart contract to whitelist Edge Sequencers for specific game contracts as designated by the game developer.
Facilitating payments from game developers for edge node bandwidth costs.
Verifying zk proofs and billing the game developer for bandwidth usage.
Associating edge node P2P gossip topics with the zk proof verifier smart contract address and the prover source code.
Security
While Edge Sequencers cannot directly cheat users, poor security measures by game developers can lead to their Edge Sequencer being compromised, risking the game's treasury. Security tips include:
Utilizing cloud-native KMS solutions instead of plain text private keys.
Deploying Edge Sequencers on serverless platforms with long-term payment solutions and burning the login password to render the deployed code immutable.
Avoiding the use of a single private key across multiple deployments.
Employing multisig wallets to guard changes to the Edge Sequencer keys.
Reliability
To maximize reliability and uptime, developers should host the Edge Sequencer across multiple serverless providers. This diversity ensures better service continuity and resilience against failures.
Last updated