5 releases
new 0.0.0-main.170+2025.05.05 | May 5, 2025 |
---|---|
0.0.0-main.162+2025.05.02 | May 3, 2025 |
0.0.0-main.158+2025.05.02 | May 2, 2025 |
#21 in Magic Beans
149 downloads per month
Used in 6 crates
215KB
4.5K
SLoC
BVS Vault Router
The BVS Vault Router is a central contract that manages the interaction between vaults and other contracts in the SatLayer ecosystem. It serves as the entry/exit point for all vaults, controlling that vaults can accept deposits and managing the relationship between operators and their vaults.
The Vault Router provides essential functionality for the SatLayer ecosystem by:
- Managing the whitelist status of vaults, determining which vaults can accept deposits
- Tracking the relationship between operators and their vaults
- Querying the registry to determine if operators are validating services
- Managing withdrawal lock periods for vaults
Contract Functions
Execute Functions
SetVault
: Set a vault contract and its whitelist status (only owner can call)SetWithdrawalLockPeriod
: Set the lock period for withdrawals (only owner can call)TransferOwnership
: Transfer ownership of the contract to a new owner
Query Functions
IsWhitelisted
: Check if a vault is whitelisted and can accept depositsIsValidating
: Check if an operator is validating servicesListVaults
: List all vaults with pagination supportListVaultsByOperator
: List vaults managed by a specific operatorWithdrawalLockPeriod
: Get the current withdrawal lock period
Whitelisting Process
The Vault Router manages vaults through a whitelisting process:
- The owner adds a vault to the router using
SetVault
withwhitelisted: true
- The router verifies that the vault is connected to it
- The router creates a mapping between the operator and the vault
- Whitelisted vaults can accept deposits
- The router can check if an operator is validating services by querying the registry
Dependencies
~19MB
~332K SLoC