Fireblocks Integration

circle-exclamation

This guide explains how clients with Fireblocks custody can integrate with our Smart Wallet and Strategy system, including deposits, withdrawals, position tracking, and recommended security best practices.

Overview

The integration leverages Smart Wallets to provide segregated user accounts while keeping your Omnibus wallet isolated from strategy bytecode execution. This architecture ensures maximum security by preventing your main operational wallet from signing potentially untrusted transactions.

Prerequisites

Before starting the integration, ensure you have:

  • A Fireblocks account with API access

  • Understanding of Fireblocks Transaction Authorization Policy (TAP)

  • Familiarity with our Architecture Overview


1. Fireblocks Setup

To safely interact with strategy bytecode while isolating your Omnibus wallet, Fireblocks must be configured with dedicated roles and policies.

Creating Roles

To ensure clean separation of responsibilities and secure execution:

Role
Description

Initiator

The API user or service responsible for submitting strategy-related transactions to Fireblocks. This user will call Fireblocks when signing strategy bytecode.

Earn Owner

A dedicated vault that acts as the Smart Wallet Owner. This address serves as the signer for smart wallet transactions, providing security segmentation from your main operational wallet.

Creating Policies

Two policies must be configured in Fireblocks to ensure automated, safe signing of transactions:

Contract Call Policy

Setting
Value

Initiator

The API user created for strategy operations

Source

Earn Owner vault

Signer

Co-signer (for automatic signing)

Typed Message Policy

Setting
Value

Initiator

The API user created for strategy operations

Source

Earn Owner vault

Signer

Co-signer (for automatic signing)


2. Smart Wallet Creation

Each user receives their own segregated smart wallet. Create one by calling:

Request Body:

Parameter
Type
Description

owner

string

Who will be the owner of the smart wallet

chainId

number

The blockchain network ID

Response:


3. Store the Smart Wallet Mapping

You must store the mapping between your internal user IDs and their smart wallet addresses:

This mapping enables you to:

  • Display user balances and yield

  • Track user performance

  • Execute operations on behalf of users


4. Deposit Flow

When a user wants to deposit into a strategy (e.g., 100 USDC):

Step 1: Transfer Funds to Smart Wallet

Transfer the deposit amount from your Omnibus wallet to the user's smartWalletAddress.

Step 2: Request Strategy Bytecode

Fetch the bytecode for the deposit operation:

See How to Depositarrow-up-right for detailed parameter information.

Step 3: Sign and Execute via Fireblocks

  1. Use the Earn Owner signer (NOT the Omnibus signer) to sign the transaction

  2. Execute the returned bytecode through Fireblocks

  3. The transaction will deposit funds from the smart wallet into the strategy


5. View User Positions and Yield

To fetch a user's position, balance, or yield:

This endpoint provides all data needed for user-facing dashboards and reporting. See How to Check Open Positionsarrow-up-right for more details.


6. Withdrawal Flow

Withdrawals follow the reverse flow:

Step 1: Request Withdrawal Bytecode

Step 2: Sign and Execute

Sign and execute the transaction using the Earn Owner signer through Fireblocks.

Step 3: Transfer Funds

After the withdrawal completes, transfer funds from the smart wallet to the destination:

  • Back to your Omnibus wallet, or

  • Any other target address


Trade-offs

Considerations

Aspect
Details

Additional Transfers

Requires two separate transfers for deposits and withdrawals: Transfer IN (Omnibus to Smart Wallet) and Transfer OUT (Smart Wallet to destination)

Benefits

Benefit
Details

Omnibus Isolation

Your Omnibus signer is never exposed to potentially malicious bytecode, preventing scenarios similar to known custody exploits

User Segregation

Each user operates through a fully segregated smart wallet

Auditability

Clean audit trail and easier accounting per user

Analytics

Aggregated deposit analytics available via the /analytics endpoint


Optional: Additional Security Layer

For maximum security, you can integrate Blockaid to simulate and validate bytecode before signing it on Fireblocks.

This adds defense-in-depth by detecting:

  • Unexpected contract behavior

  • Malicious payloads

  • Incorrect calldata or parameters


Next Steps

Last updated