Skip to content
LogoLogo

Network Contract

Register your network using the NetworkRegistry smart contract. The registered address serves as your management address for interacting with Symbiotic vaults to accept stake allocations.

We provide a network repository that simplifies registration and makes management more secure. It includes the Network.sol contract and tooling to manage it.

The Network.sol contract extends OpenZeppelin's TimelockController.sol with additional functionality to define delays for (exact target | exact selector) or (any target | exact selector) pairs.

Prerequisites

Clone the repository

bash
git clone --recurse-submodules https://github.com/symbioticfi/network.git
cd network

Install dependencies

bash
npm install

Deploy Network and Register

The deployment scripts support two scenarios:

  1. Deploy a network only (opt into vaults later)
  2. Deploy a network with vault opt-ins

Pure Network Deployment

Open DeployNetwork.s.sol and configure these settings:
DeployNetwork.s.sol
// Name of the Network
string NAME = "My Network";
// Default minimum delay (will be applied for any action that doesn't have a specific delay yet)
uint256 DEFAULT_MIN_DELAY = 3 days;
// Cold actions delay (a delay that will be applied for major actions like upgradeProxy and setMiddleware)
uint256 COLD_ACTIONS_DELAY = 14 days;
// Hot actions delay (a delay that will be applied for minor actions like setMaxNetworkLimit and setResolver)
uint256 HOT_ACTIONS_DELAY = 0;
// Admin address (will become executor, proposer, and default admin by default)
address ADMIN = 0x0000000000000000000000000000000000000000;
 
// Optional
 
// Metadata URI of the Network
string METADATA_URI = "";
// Salt for deterministic deployment
bytes11 SALT = "SymNetwork";
Edit the configuration fields, then run:
bash
forge script script/DeployNetwork.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --etherscan-api-key <ETHERSCAN_API_KEY> --broadcast --verify

Network Deployment With Opt-ins

Open DeployNetworkForVaults.s.sol and configure these settings:
DeployNetworkForVaults.s.sol
// Name of the Network
string NAME = "My Network";
// Default minimum delay (will be applied for any action that doesn't have a specific delay yet)
uint256 DEFAULT_MIN_DELAY = 3 days;
// Cold actions delay (a delay that will be applied for major actions like upgradeProxy and setMiddleware)
uint256 COLD_ACTIONS_DELAY = 14 days;
// Hot actions delay (a delay that will be applied for minor actions like setMaxNetworkLimit and setResolver)
uint256 HOT_ACTIONS_DELAY = 0;
// Admin address (will become executor, proposer, and default admin by default)
address ADMIN = 0x0000000000000000000000000000000000000000;
// Vault address to opt-in to (multiple vaults can be set)
address[] VAULTS = [0x0000000000000000000000000000000000000000];
// Maximum amount of delegation that network is ready to receive (multiple vaults can be set)
uint256[] MAX_NETWORK_LIMITS = [0];
// Resolver address (optional, is applied only if VetoSlasher is used) (multiple vaults can be set)
address[] RESOLVERS = [0x0000000000000000000000000000000000000000];
 
// Optional
 
// Subnetwork Identifier (multiple subnetworks can be used, e.g., to have different resolvers for the same network)
uint96 SUBNETWORK_ID = 0;
// Metadata URI of the Network
string METADATA_URI = "";
// Salt for deterministic deployment
bytes11 SALT = "SymNetwork";
Edit the configuration fields, then run:
bash
forge script script/DeployNetworkForVaults.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --etherscan-api-key <ETHERSCAN_API_KEY> --broadcast --verify

Manage Your Network

Use these five predefined action scripts:

All actions follow a similar pattern. Here's how to use SetMaxNetworkLimit as an example:

Open SetMaxNetworkLimit.s.sol and configure these settings:
SetMaxNetworkLimit.s.sol
// Address of the Network
address NETWORK = 0x0000000000000000000000000000000000000000;
// Address of the Vault
address VAULT = 0x0000000000000000000000000000000000000000;
// Maximum amount of delegation that network is ready to receive
uint256 MAX_NETWORK_LIMIT = 0;
// Delay for the action to be executed
uint256 DELAY = 0;
 
// Optional
 
// Subnetwork Identifier (multiple subnetworks can be used, e.g., to have different max network limits for the same network)
uint96 SUBNETWORK_IDENTIFIER = 0;
// Salt for TimelockController operations
bytes32 SALT = "SetMaxNetworkLimit";
Edit the configuration fields, then choose an operation:
  • runS() - schedule an action
  • runE() - execute an action
  • runSE() - schedule and execute an action (only if the delay is zero)
Run the operation:
  • To execute the script with an EOA:

    bash
    forge script script/actions/SetMaxNetworkLimit.s.sol:SetMaxNetworkLimit --sig "runS()" --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast
  • To get transaction calldata for a Safe multisig:

    bash
    forge script script/actions/SetMaxNetworkLimit.s.sol:SetMaxNetworkLimit --sig "runS()" --rpc-url <RPC_URL> --sender <MULTISIG_ADDRESS> --unlocked

    The logs will show a callData field like this:

    Expected output
    callData:0x01d5062a00000000000000000000000025ed2ee6e295880326bdeca245ee4d8b72c8f103000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000005365744d61784e6574776f726b4c696d697400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004423f752d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b6700000000000000000000000000000000000000000000000000000000

    In Safe Transaction Builder:

    1. Enable "Custom data"
    2. Enter the Network's address as the target address
    3. Use the callData (e.g., 0x01d5062a0000000000000000000000...) received earlier as the Data (Hex encoded)

Update Delays

Every network action is protected by a delay (from zero to infinity).

Use these update delay scripts for the actions above, plus additional ones:

For usage examples, see Manage Your Network.


Dashboard

The Network.sol contract inherits OpenZeppelin's TimelockController, which inherits AccessControl. You can't determine the full state (operation statuses or role holders) using only RPC calls.

Use the Network Dashboard to:

  • Get delays for all operations
  • Get holders of any role
  • Get scheduled/executed operations
  • Schedule/execute arbitrary actions

Next Steps

Submit Metadata

Submit your network's metadata to make it visible on the Symbiotic UI.