SatLayer Core Contracts
These are core contracts maintained and owned by SatLayer's core contributors, and deployed on the Babylon Chain.
Last updated
Was this helpful?
These are core contracts maintained and owned by SatLayer's core contributors, and deployed on the Babylon Chain.
Last updated
Was this helpful?
This document presents an overview of the system components, contracts, and user roles, detailing a total of 10 core smart contracts within the BVS framework.
for registering BVS contracts.
for managing relevant BVS task data.
for managing BVS task lifecycle.
for managing the various assets accepted as collateral.
for managing the delegation and withdraw of staker assets to operators.
for managing the deposit and distribution of BVS token rewards.
for managing the report and execution of asset slashing.
BVS developers need to focus on contracts including BVSDirectory
, BVSDriver
and StateBank
.
To deploy a live BVS, you will need to:
Write, compile, and deploy your BVS Service Contracts.
Your TaskInterface contract should call the StateBank then the BVSDriver
The functions of the BVSDirectory include:
Read Only query functions for retrieving on-chain data to be used by off-chain programs.
StateBank
serves as the central state management system, providing storage and updates for tasks throughout their lifecycle.
The functions provided in the StateBank
include:
Set On-Chain State: Sets a key, value
pair in the StateBank contract, where the key is a string and the value is an int64.
Register a BVS: Registers the final TaskInterface
contract of a BVS Service, required for StateBank
to accept new state data.
Get Method: Provides a method to query on-chain state data.
Provided functions are as follows:
The functions provided in the BVSDirectory
include:
Additionally, Slasher roles, appointed by the contract owner, are granted the ability to submit, cancel, and execute slashes. During slash execution, the shares delegated by Stakers to the affected Operator are reduced, with the penalties evenly distributed among all Stakers who delegated to that Operator. Only Slasher roles can submit, execute, or cancel slash requests.
Register your contract with the BVS Director
The BVS contracts you develop will interface with these three primary contracts. Additional contracts handle functions like delegation, staking, slashing, and more. For further details, please refer to . Refer to to find all deployed core contract addresses and their corresponding explorer links.
The manages interactions between BVS Services Contracts and the SatLayer Core Contracts. Once registered as an Operator in the SatLayer core (via DelegationManager
), Operators can register with one or more BVSs (via the BVS's contracts) to start providing off-chain services to them. When an Operator registers with a BVS, the BVS records this registration in the core contracts by interfacing with the BVSDirectory
.
: Registers the BVS info to BVSDirectory contract.
: adds or removes an Operator from a specific BVS
The module manages the on-chain state data. It uses the set method to store task states on the blockchain and broadcasts state changes via event logs (event updateState).
The module is responsible for managing the BVS task lifecycle within SatLayer. It triggers the execution of BVS off-chain operations via the run BVS method and notifies other modules when a task starts. The BVSDriver
connects with the StateBank
module to retrieve relevant task state and passes this information along to the BVS off-chain program.
: to emit a new task event for off-chain program.
Service's final TaskInterface
contract, this is required for BVSDriver to accept tasks.
: Emits a new task event for the off-chain program.
: Registers the final TaskInterface
contract of a BVS Service, which is required for BVSDriver
to accept tasks.
The contract is primarily responsible for penalizing Operators engaged in invalid or malicious activities. The contract owner can designate Validators who will sign and verify slash requests on-chain. The number of Validators who verify slashing should exceeds a minimum threshold for enhanced security and fairness in executing slashes.
The remaining SatLayer Core Contracts manage functions like staking, delegation, operator coordination, and reward distribution. While these details aren't immediately relevant for developing a BVS service, you can refer to the sections for a deeper understanding of how these contracts operate.