Index Coop Integration: Oracles, Smart Contracts, Rebalancing

Integration with Index Coop We integrate Index Coop into your DeFi products: configure smart contracts, oracles, and rebalancing monitoring. Under the hood — the protocol of decentralized crypto indices: DPI (DeFi Pulse Index), MVI (Metaverse Index), ETH2X-FLI (2x leveraged ETH) — all managed thr

Blockchain Development Services

Frequently Asked Questions

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1450
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1308
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    1003
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1269
  • image_logo-advance_0.webp
    B2B Advance company logo design
    717
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    1008

Integration with Index Coop

We integrate Index Coop into your DeFi products: configure smart contracts, oracles, and rebalancing monitoring. Under the hood — the protocol of decentralized crypto indices: DPI (DeFi Pulse Index), MVI (Metaverse Index), ETH2X-FLI (2x leveraged ETH) — all managed through Set Protocol V2. Integration with Index Coop is needed in two key scenarios: using ready-made index tokens as collateral or LP assets, or launching your own index through the Index Coop infrastructure. Our team has been doing blockchain development for over five years and has delivered more than 30 DeFi projects, including integrations with leading protocols. We guarantee correct operation of oracles and adapters considering rebalancing specifics. Average client gas savings when using ExchangeIssuance — up to 40%.

The main difficulty is building a correct price oracle for Set tokens, as Chainlink does not provide direct feeds for DPI and MVI. Therefore we implement a composite oracle that aggregates prices of all components through their Chainlink feeds. Another challenge is handling rebalancing: every three months the DPI composition changes, and the oracle needs to be dynamically updated. Evaluate your project: contact us, and we will prepare a preliminary estimate within one business day.

Why a composite oracle for Index tokens?

Index tokens (DPI, MVI) are ERC-20 tokens that, under the hood, Set Protocol manages a basket of real assets. The price of such a token equals the sum of the prices of the constituent tokens weighted by their positions. Unlike regular tokens, Chainlink does not provide a single feed for DPI. The only way to get an up-to-date price on-chain is to calculate it through component prices.

Index Coop provides the ISetToken interface to get the current components and their positions:

interface ISetToken is IERC20 { function getComponents() external view returns (address[] memory); function getDefaultPositionRealUnit(address component) external view returns (int256); } 

Set Token price = Σ(component_price * position_real_unit). This needs to be calculated on-chain for use in lending or derivatives. Chainlink has no direct feeds for DPI — a custom oracle adapter implementation is required.

How minting and redemption work via Set Protocol?

Direct minting of DPI happens through BasicIssuanceModule:

IBasicIssuanceModule(issuanceModule).issue( ISetToken(DPI_ADDRESS), quantity, // number of DPI tokens to // recipient ); 

Before calling, you need to approve all basket components to the issuanceModule. To get the exact amount of each component for N tokens:

(address[] memory components, uint256[] memory amounts) = IBasicIssuanceModule(issuanceModule).getRequiredComponentUnitsForIssue( ISetToken(DPI_ADDRESS), quantity ); 

Redemption is the reverse operation via redeem(). The user burns DPI and receives all components proportionally.

ExchangeIssuance for single-token entry

Most users find it inconvenient to collect all basket components before minting. ExchangeIssuance allows entry with a single token (ETH, USDC):

IExchangeIssuanceV2(exchangeIssuance).issueExactSetFromToken( ISetToken(DPI_ADDRESS), IERC20(USDC), setAmount, maxInputAmount, componentSwapData // swap routes for each component ); 

Under the hood, the contract performs swaps via a DEX aggregator (1inch or Uniswap) for each component. componentSwapData is the encoded calldata for each swap. Generated via Index Coop API or through a custom routing engine.

What rebalancing risks exist and how to minimize them?

DPI rebalancing occurs quarterly. On rebalancing day, trading volume spikes, and the price may temporarily deviate. If you have an oracle based on spot price — that's a risk. We use a TWAP of 30–60 minutes for the IndexPriceOracle, which smooths out temporary spikes. The typical budget for such a solution is a few thousand dollars, which is significantly lower than potential losses from incorrect pricing.

Another risk is mass redemption. If many users exit your product simultaneously via DPI redemption, it creates selling pressure on all components. When integrating into lending, we set conservative LTVs considering component liquidity. For example, for DPI with component liquidity of $50M+, LTV does not exceed 70%.

Integration Architecture

Typical integration for a DeFi product:

YourProtocol.sol ├── IndexCoopAdapter.sol — wrapper over Set Protocol interfaces ├── IndexPriceOracle.sol — composite SetToken price oracle └── RebalanceObserver.sol — rebalancing monitoring 

RebalanceObserver is needed if your protocol holds positions in Index tokens — the basket composition changes upon rebalancing (usually quarterly for DPI). After rebalancing, weights and components change, and the composite oracle needs recalibration.

Typical integration issues and their solutions
  • Slippage during mass redemption: if many users simultaneously exit via DPI redemption, selling pressure on components increases. Solution — LTV calculation considering each component's liquidity.
  • Rebalancing as flash point: on rebalancing day, spot price can temporarily deviate. We use a 30–60 minute TWAP for the oracle.
  • Incorrect composition data: it's important to subscribe to the Rebalance event in the Set Token. RebalanceObserver.sol automatically updates the component list.

Integration Type Comparison Table

Integration Type Complexity Timeline Additional Modules
Using ready-made tokens Medium 2–3 days Oracle + RebalanceObserver
Creating a new index High 1–2 weeks Custom rebalance module + oracle

DPI Composition Table (Example)

Component Address (main) Ticker Weight (%)
Uniswap 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 UNI 25
Aave 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9 AAVE 20
Compound 0xc00e94Cb662C3520282E6f5717214004bB7E2c32 COMP 15
... ... ... ...

Stack and Tools

Set Protocol interfaces — from @setprotocol/set-protocol-v2 npm package. Tests — Foundry fork on Ethereum mainnet. The Graph subgraph Index Coop for historical rebalancing data. Frontend: wagmi hooks for approve flow, integration with Index Coop API for componentSwapData.

Timeline Estimates

Integration of ready-made Index tokens into an existing protocol (oracle + collateral support) — 2–3 days. Development of a new index via Set Protocol with a custom rebalance module — 1–2 weeks. Contact us to discuss the specifics of your project.

For more details about Set Protocol interfaces — Index Coop documentation.