πHello World BVS
Last updated
Last updated
SatLayer provides a Hello World BVS application for developers to get comfortable with our Platform and SDKs. The components of this application are not required by any means, they serve as a simple example. You are free to design your BVS to function and operate how you like.
This HelloWorld BVS is a straightforward example of a number-squaring BVS. While it demonstrates one type of arbitrary computation, it doesn't have to be limited to squaring numbers. The framework can accommodate various kinds of off-chain logic, and the final results can be trusted due to on-chain validation and the inherent asset risk management.
To be explicit, the specific components of the Hello World example include:
Off-Chain Task Caller: This component submits new tasks to the BVS's on-chain contract.
Trusted Aggregator: A centralized, trusted entity that aggregates BLS signatures and results before submitting them on-chain.
Squaring Software: The off-chain operator software that runs on multiple operators to perform the squaring computation.
Reward Uploader: This component uploads rewards to be distributed to operators participating in the BVS.
Hello World BVS Contract: The on-chain contract that interacts with the SatLayer core contracts.
These components work together to demonstrate how a basic BVS can function while maintaining security and trust in the results produced.
The Task Caller submits a number to the BVS on-chain contract.
This number is stored in the State Bank, and a new task is created in the BVS Driver within the SatLayer Core Contracts.
Off-chain operators who are listening for on-chain changes download the task and its associated state.
Each operator running the off-chain software squares the number and submits their result to a trusted aggregator.
The trusted aggregator receives results from multiple operators and determines the final number to submit based on a quorum of submissions.
The submission can be validated by the on-chain contract before it is recorded as a task result.
Results from the operators are visible, allowing for monitoring and verification.
If incorrect results are detected, a slashing request with evidence can be submitted to the Slash Manager to penalize any malicious operators.
This flow demonstrates how the BVS framework ensures reliable computations while maintaining accountability and security within the system.