Build an Application
This guide walks through the complete lifecycle of integrating an application with Symbiotic Core V2.
At a high level, the integration consists of:
- Deploying your application middleware.
- Registering your application on Symbiotic.
- Associating the middleware with your application.
- Deploying a vault.
- Deploying an AppAdapter.
- Having the AppAdapter whitelisted.
- Connecting the AppAdapter to the vault.
Overview
Applications define their own business logic while Symbiotic provides collateral management, stake accounting, and slashing infrastructure.
The integration is centered around three components:
- Network Middleware — application-specific logic.
- AppAdapter — connects the application to Symbiotic collateral.
- Vault — provides the collateral securing operators.
The middleware determines when an operator should be slashed, while the AppAdapter executes the slash against collateral allocated from Symbiotic vaults.
1. Build the Network Middleware
The Network Middleware is the application-specific contract responsible for enforcing your protocol's business logic and interacting with the corresponding AppAdapter.
For example, a Proof-of-Reserve network may slash operators that:
- fail to publish reserve proofs,
- submit invalid proofs,
- miss reporting windows,
- or violate any application-defined rules.
When a slashable condition is detected, the middleware calls:
slash(uint256 amount)on the corresponding AppAdapter.
Only the middleware registered for the network inside the NetworkMiddlewareService can call slash(). This guarantees that every application maintains full control over its own slashing conditions while relying on Symbiotic for collateral management.
Responsibilities
At a minimum, the middleware should implement:
- Slash conditions.
- Slash amount calculation.
- Access control (governance, committee, oracle, automation, etc.).
- Calls to
slash(uint256 amount)on the AppAdapter. - Any dispute, evidence, or challenge mechanisms required by the application.
When slash() is executed, the AppAdapter:
- verifies the caller is the registered middleware,
- caps the slash amount to the available slashable stake,
- updates internal stake accounting,
- decreases allocation limits inside the Universal Delegator,
- transfers the slashed collateral to the configured burner.
2. Register the Application
Applications must first register themselves with Symbiotic.
Network Registry
Contract
https://etherscan.io/address/0xC773b1011461e7314CF05f97d95aa8e92C1Fd8aA
Call:
registerNetwork()using the address that will own and manage the application.
3. Register the Middleware
Once the middleware has been deployed, associate it with the registered application.
NetworkMiddlewareService
Contract
https://etherscan.io/address/0xD7dC9B366c027743D90761F71858BCa83C6899Ad
Call:
setMiddleware()using the same address that registered the network, passing the middleware contract address.
4. Deploy a Vault
Applications are secured by collateral supplied through Symbiotic vaults.
Vaults are typically deployed by curators either through:
- the Curator UI, or
- the deployment script.
forge script script/DeployVaultV2.s.sol:DeployVaultV2Script \
--rpc-url=RPC \
--account=ACCOUNT \
--sender=SENDER \
--broadcastDeployment script:
https://github.com/symbioticfi/core/blob/delegator-simplify/script/DeployVaultV2.s.sol
5. Deploy an AppAdapter
Each AppAdapter represents one vault-backed guarantee for a specific:
- subnetwork
- operator
The application must therefore define:
- which vault provides collateral,
- which operator is being secured,
- which middleware controls slashing,
- how long collateral remains slashable,
- where slashed collateral is sent.
Deployment Parameters
| Parameter | Description |
|---|---|
OWNER | Owner/admin of the adapter |
VAULT | Vault providing collateral |
BURNER | Recipient of slashed collateral |
DURATION | Slashability / guarantee duration |
OPERATOR | Operator secured by this adapter |
SUBNETWORK | Subnetwork identifier |
CONVERTER | Optional converter back into vault asset |
ADAPTER_FACTORY | Factory contract used for deployment |
VERSION | Adapter implementation version |
Deploy using:
forge script script/adapters/DeployAppAdapter.s.sol:DeployAppAdapterScript \
--rpc-url=RPC \
--account=ACCOUNT \
--sender=SENDER \
--broadcastDeployment script:
https://github.com/symbioticfi/core/blob/delegator-simplify/script/adapters/DeployAppAdapter.s.sol
6. Whitelist the AppAdapter
After deployment, the AppAdapter must be whitelisted by Symbiotic.
Symbiotic calls:
setWhitelistedStatus()inside the AdapterRegistry, passing:
- vault address
- adapter address
Only whitelisted adapters can later be attached to vaults.
7. Add the AppAdapter to the Vault
Finally, the curator connects the AppAdapter to the vault.
This is done by calling:
addAdapter()on the vault's UniversalDelegator.
Source:
function addAdapter(address adapter)The function:
- verifies the adapter has been whitelisted,
- ensures it hasn't already been added,
- assigns an adapter index,
- grants allocation permissions,
- enables the adapter to allocate and deallocate collateral from the vault.
Once this step is complete, operators can receive collateral allocations through the AppAdapter, and the middleware can begin enforcing the application's slashing logic.
