SatLayer
Restake now
  • 🟨Overview
    • Introduction to SatLayer
  • SatLayer on Babylon
  • 🏛️Architecture
    • SatLayer Overview
  • Roadmap
  • Protocol Rewards
  • Slashing
  • SatLayer Contracts
  • Developer Docs
  • 🔓Security
    • Audits
      • Staking App
      • SatLayer Core
      • Cube by SatLayer
    • Contracts
      • Staking App
      • SatLayer Core
      • Cube by SatLayer
    • Bug Bounty
  • 🪙Restakers
    • How to Restake
    • Sats² Staker Rewards
      • Earning Sats²
      • Monthly Sats² Sprints
      • Referral Guide
      • Sats² FAQs
      • Current Campaigns
        • The Order of the Sats
        • SatLayer x Pulsar Money Bitcoin Restaking Challenge
        • Restake uniBTC on Build on Bob
      • Past Campaigns
        • OKX Cryptopedia
        • Journey to the Sats
        • The Great BTC Meme War
        • 5 Million Sats² OKX Wallet Giveaway Rewards
        • Bitcoin Pizza Day Promo: 3x Sats² Multiplier Boost
  • Partner Rewards
    • Babylon
    • Bedrock
    • Tower Finance
    • Boyco
    • Turtle Club for TAC
  • How to Yap
    • Yapper Wildcard Bounties
  • 🎛️Operators
    • Overview
    • 👉Apply as an Operator
  • BVS Developers
    • Introduction
    • 👉Apply as a Developer
  • SatLayer Testnet
    • Operator Onboarding
    • BVS Onboarding
  • 🧊Cube by SatLayer
    • Introduction
    • Understanding the LST
    • How to Stake
      • Cube and cBABY FAQ
  • 🧰Resources
    • Website
    • Discord
    • Twitter
    • GitHub
    • SatLayer Brand Guidelines
Powered by GitBook
On this page

Was this helpful?

  1. SatLayer Testnet

Operator Onboarding

PreviousApply as a DeveloperNextBVS Onboarding

Last updated 2 months ago

Was this helpful?

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 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");
testnet