Operator Onboarding

This page describes how to create an operator, register it in SatLayer, and create a vault on SatLayer testnet. SatLayer's testnet exists as a set of smart contracts on top of Babylon's own testnet bbn-test-5. In order to onboard onto SatLayer testnet, operators have to complete the following steps: 1) Generate an address via a wallet app such as Keplr.

2) Instantiate your address as a signer.

const chainId = "bbn-test-5";
const endpoint = "https://babylon-testnet-rpc.nodes.guru";

import { GasPrice } from "@cosmjs/stargate";
import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate";
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
import { stringToPath } from "@cosmjs/crypto";

const gasPrice = GasPrice.fromString("0.002000ubbn");

// create signer object using mnemonic phrase you created in Keplr
const signer = await DirectSecp256k1HdWallet.fromMnemonic("[YOUR MNEMONIC PHRASE]", {
  prefix: "bbn",
});

const client = await SigningCosmWasmClient.connectWithSigner(endpoint, signer, { gasPrice });

3) Register your operator in the bvs-registry.

const registry = "bbn1a9tleevqygn862ll2la49g637fjttfzzlttdrmmua35fadpuvnksuyud7a";

const executeMsg = {
    register_as_operator: {
        metadata: {
            name: "[YOUR OPERATOR NAME]",
            uri: "[YOUR OPERATOR URI]"
        }
    }
};

await client.execute("[YOUR OPERATOR ADDRESS]", registry, executeMsg, "auto");

4) Create a Vault to start accepting collateral. Vaultscan be configured to accept either cw20or bankmodule tokens.

CW20:

const factory = "bbn1tnpg0hs099tpmaavzjzx02kvf7lcqhwmkrp0spg30aejmfydxnkqfzwdyx";

const executeMsg = {
    deploy_cw20: {
        cw20: "[YOUR CW20 ADDRESS]"
    }
};

const response = await client.execute("[YOUR OPERATOR ADDRESS]", factory, executeMsg, "auto");

Where the cw20argument is the address of the cw20 token that you wish to accept as collateral.

Bank Module:

const factory = "bbn1tnpg0hs099tpmaavzjzx02kvf7lcqhwmkrp0spg30aejmfydxnkqfzwdyx";

const executeMsg = {
    deploy_bank: {
        denom: "[YOUR BANK DENOM]"
    }
};

const response = await client.execute("[YOUR OPERATOR ADDRESS]", factory, executeMsg, "auto");

Where the denomargument is the denomof the x/bankmodule token which you wish to accept as collateral.

5) Whitelist your vault in the router

const router = "bbn1tztx8vkgw24rm5f6ny52qyt6kpg7gyfd5nggvfgjjfj8n7ggkx7qfhvdum";

const executeMsg = {
  set_vault: {
    vault: "[YOUR VAULT ADDRESS]",
    whitelisted: true,
  }    
};

await client.execute("[YOUR OPERATOR ADDRESS]", router, executeMsg, "auto");

After completing these steps, you will have created an operatorand a vault, linked them together, and whitelisted this vaultin the router. The final step to get set up on testnet is to identify a Bitcoin Validated Service (BVS) you wish to validate and register to validate it.

6) Register services you want to validate to your operator. First you need to identify the address of the service in SatLayer. This address represents the BVS'es on-chain footprint.

const executeMsg = {
    register_service_to_operator: {
        service: "[SERVICE ADDRESS]"
    }
}

await client.execute("[YOUR OPERATOR ADDRESS]", registry, executeMsg, "auto");

Last updated

Was this helpful?