Set Protocol Index Integration

We design and develop full-cycle blockchain solutions: from smart contract architecture to launching DeFi protocols, NFT marketplaces and crypto exchanges. Security audits, tokenomics, integration with existing infrastructure.
Showing 1 of 1 servicesAll 1306 services
Set Protocol Index Integration
Medium
~3-5 business days
FAQ
Blockchain Development Services
Blockchain Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1214
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_logo-advance_0.png
    B2B Advance company logo design
    561
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    823

Integration with Set Protocol (Indices)

Set Protocol is infrastructure for tokenized asset baskets. At its core: SetToken — an ERC-20 representing a proportional share in a set of assets. Holder of 1 SetToken owns, for example, 0.1 WETH + 0.05 WBTC + 50 USDC simultaneously. The protocol manages rebalancing, issuance and redemption through modular architecture. Integration is needed when your project wants to offer users ready-made portfolio strategies: top-10 DeFi index, 50/50 ETH/BTC, momentum trading strategy — without building this mechanism from scratch.

Key Set Protocol v2 Contracts

SetToken and Its Components

SetToken stores a list of components (components) with their positions (units — quantity per 1 Set). On issuance via BasicIssuanceModule.issue(), user deposits all components proportionally, receives SetToken. On redemption — reverse process.

Important: positions in SetToken can be Default (direct ownership) and External (via yield protocol, e.g., Aave aToken). If the index includes aUSDC instead of USDC — Set Protocol automatically accounts for accrued interest in getPositionRealUnits(). Integration must correctly handle both position types, otherwise portfolio valuation will be wrong.

Issuance Flow and Slippage

Large volume issuance via DEX-oriented DebtIssuanceModule creates slippage: components are purchased via Uniswap/SushiSwap and actual price differs from quoted. Set Protocol passes maxTokenAmountIn for each component, but if market moved between quote and execution — transaction reverts.

Our wrapper adds dynamic slippage tolerance: get quote, add 0.5-1% buffer, set deadline for 2-3 blocks. This reduces revert probability without substantially worse execution.

What We Build for Integration

Index Management Component

If the client wants to create their own Set (not just use existing):

// Creating SetToken via SetTokenCreator
ISetTokenCreator(creator).create(
    components,      // token addresses
    units,           // positions (18 decimals)
    modules,         // [BasicIssuanceModule, StreamingFeeModule, ...]
    manager,         // manager address (multisig or governing contract)
    name,
    symbol
);

StreamingFeeModule — important for monetization: management fee is deducted annually via supply dilution. Configuration: feeRecipient, maxStreamingFeePercentage (maximum), streamingFeePercentage (current). Without explicit max fee limit, manager can raise fee to 100% — rug pull via fee.

Rebalancing Mechanism

Manual rebalancing by manager via TradeModule.trade() — simplest option. Manager calls trade, module sells excess asset via specified DEX, buys needed asset. This is centralized approach: single manager private key = single point of failure.

For decentralized rebalancing, integrate Index Coop-style: manager is a smart contract with rebalance() function, callable only when weights deviate from target by X% (e.g., 5%). Trigger condition checked via Chainlink price feeds.

Frontend Integration

Set Protocol SDK (setprotocol/setjs) or direct calls via viem:

  • getSetDetails() — current components and weights
  • getIssuanceComponents() — how much of each token needed for N Set
  • getRedemptionComponents() — what you get on redeeming N Set

Hook useSetTokenData aggregates data with 30-second update via useInterval.

Supported Chains and Limitations

Chain Set Protocol v2 Component Liquidity Status
Ethereum Yes High Mainnet
Polygon Yes Medium Mainnet
Optimism Limited Medium Experimental
Arbitrum No native Not supported

Development Process

Analytics (1-2 days). Define index composition, rebalancing mechanism, modules (Issuance, Fee, Trade, Governance). Check component liquidity on target chain.

Development (3-4 days). Deploy SetToken via CreatorFactory, configure modules, build issuance/redemption wrapper with slippage guard, frontend integration. Tests on Ethereum mainnet fork.

Deployment (1 day). Via Gnosis Safe multisig, verify components and modules.

Basic integration with existing Set — 3 days. Creating your own index with rebalancing logic — 5-7 days. Cost calculated after agreeing on index composition and management requirements.