Logo

indigo

UnofficialPreliminary, reverse-engineered version published by the tx3 team for testing and exploration. It is not endorsed by the original protocol authors. Do not use in mainnet. • v2.0.0

Indigo Protocol

Indigo is a decentralised synthetic-asset protocol on Cardano. Users lock ADA as collateral inside a Collateralised Debt Position (CDP) and mint iAssets — on-chain synthetic representations of real-world assets such as the US dollar (iUSD), Bitcoin (iBTC), Ether (iETH), and Solana (iSOL). The synthetic side is backed by over-collateralised ADA reserves and tracks underlying prices via on-chain oracles.

Indigo also runs two adjacent products in the same contract suite: a Stability Pool, where iAsset holders deposit synthetics to absorb under-collateralised CDPs in exchange for a share of liquidated collateral, and INDY staking, where holders of the governance token stake to vote on protocol parameters and earn protocol revenue. End users typically interact through the Indigo web app to open positions, borrow against ADA collateral, and earn yield on idle iAssets.

This tx3 covers the full user-facing surface: CDP open / adjust / close, Stability Pool create / adjust / close (request side), and INDY staking. Batcher-side processing of SP requests is out of scope.

Overview

Indigo is a script-heavy protocol — every transaction consumes one or more reference inputs (oracles, iAsset config, CDP manager, collector) and at least one validator UTxO. Architecturally:

  • CDPs are individual script UTxOs holding ADA collateral, with the synthetic debt encoded in the datum. Minting an iAsset requires the on-chain interest accumulator and oracle price, both supplied as caller parameters.
  • Stability Pool uses a two-step pattern: the user submits a request UTxO to the pool, and a batcher later processes the request against the pool state. This tx3 implements the request side only.
  • INDY staking is a simple lock-with-NFT pattern; current on-chain validators use V1/V2 with empty datums.

This implementation was built from on-chain analysis and verified against real mainnet transactions; the deployed contracts differ in several ways from the public GitHub source.

Transactions

TransactionDescription
open_cdpDeposit ADA collateral and mint iAssets in a new CDP
close_cdpBurn iAssets and reclaim collateral, closing the CDP
deposit_collateralAdd more ADA collateral to an existing CDP
withdraw_collateralRemove excess collateral from a CDP
mint_moreMint additional iAssets against existing collateral
repayBurn iAssets to reduce CDP debt
deposit_spRequest a deposit into a Stability Pool
withdraw_spRequest a withdrawal from a Stability Pool
stake_indyStake INDY governance tokens
unstake_indyUnstake INDY governance tokens

Important considerations

  • On-chain version mismatch. The deployed contracts differ from the public GitHub source in several ways (extra datum fields, different redeemer structures). This tx3 was built from on-chain analysis and verified against real transactions.
  • CDP validator version. On-chain CDPs use VX (AdjustCDP with 3 fields). Staking validators still use V1/V2 with empty datums.
  • Double-wrapped datums. CDP datums are double-wrapped (Constr(0, [Constr(0, [fields...])])), which the type definitions reflect.
  • Network profile required. Policy IDs, reference script UTxOs, and script addresses must be configured per network in the trix profile.
  • Reference scripts. Seven different reference-script UTxOs are required: CDP spend, CDP creator, collector, iAsset mint, CDP NFT mint, stability pool, staking.
  • Stability Pool request/process pattern. SP operations are two-step — user submits a request UTxO; a batcher processes it. This tx3 implements only the request side.
  • Caller-provided oracle values. Although datum_is lets tx3 read fields from reference inputs, timestamp_ms and the interest accumulator are independent of the oracle datum and must be supplied by the caller.

Caller preparation

Many values must be queried from on-chain UTxO datums before invoking a transaction. tx3 cannot read variant-type datum fields from spent inputs, so the Stability Pool transactions require the full snapshot tuple as explicit parameters.

All CDP transactions

ParameterSource
timestamp_ms: IntCurrent POSIX timestamp in milliseconds. Independent of the oracle's od_expiration.
interest_accumulator: Int / accumulator: IntCurrent interest accumulator value. Independent of od_nonce; computed off-chain.
oracle_utxo, iasset_config_utxo, cdp_manager_utxoReference-input UTxOs queried on-chain.

adjust_cdp_mint / adjust_cdp_burn

ParameterSource
new_minted_total: IntNew total minted amount after the operation (current ± additional). Computed off-chain.
new_collateral: IntNew collateral amount in the CDP. For mint: unchanged. For burn: current − withdrawn.

close_cdp

ParameterSource
pool_iasset: IntiAsset amount in the Stability Pool (from SP pool UTxO datum).
sp_snapshot_p, sp_snapshot_d, sp_snapshot_s, sp_snapshot_epoch, sp_snapshot_scaleAll 5 fields from the Stability Pool's snapshot datum. Would be eliminated by tx3 support for variant-type datum field access on spent inputs (~20 params total across SP txs).

Stability Pool transactions (create_sp_account, adjust_sp_account, close_sp_account)

ParameterSource
sp_snapshot_* (5 fields)Pool snapshot values from the corresponding on-chain datum.
acc_snapshot_* (5 fields)Account snapshot values from the user's SP account datum.
output_addr: AddressUser's output address for receiving funds.

Staking transactions (create_staking, adjust_staking, unstake)

ParameterSource
indy_policy_id, indy_asset_nameINDY token identifiers.
staking_token_policy_id, staking_token_nameStaking-position NFT identifiers.
manager_utxo, collector_utxoProtocol UTxOs queried on-chain.

References

Transactions

indigo

Published by

@open-tx3

Publication datePublished a month ago
Back to all Protocols