Skip to content

For AI agents: a documentation index is available at /llms.txt. Every page is also available as Markdown at the same URL with a .md suffix, or by requesting Accept: text/markdown.

BLOK Capital

IIndex.sol

This interface defines the essential data structures passed between the off-chain Centralized Relayer Engine (CRE) and the on-chain protocol. Core…

Last updated:

This interface defines the essential data structures passed between the off-chain Centralized Relayer Engine (CRE) and the on-chain protocol.

Core Concept: Swap Instructions & Intents#

To execute a rebalance, the CRE must provide an array of SwapStep instructions. The protocol compares the outcome of these steps against the locked PendingIntent.

Crucial Builder Snippet: The Execution Types#

/// @notice A single swap step provided by the CRE to rebalance the garden.
struct SwapStep {
    bytes32 dexId; // Resolved to a selector on-chain (e.g., keccak256("UNISWAP_V3"))
    SwapInstruction instruction; // Contains tokens, pools, and amounts
}
 
/// @notice Pending rebalance intent data (slimmed for gas efficiency)
struct PendingIntent {
    bool active;
    uint256 totalValueUsd; // Portfolio value at intent creation
    bytes32[] symbols;
    uint256[] targetValues; // Desired USD value per token
}