Dual Investment

Dual Investment is Peridot’s structured-yield product built on top of the core lending markets. Users open time‑boxed positions defined by strike, expiry, and direction (call/put). Positions are represented as non‑transferable ERC‑1155 tokens and are settled by an oracle at/near expiry. Capital can come from existing pTokens (collateral path) or by borrowing underlying (borrow path) in a risk‑managed way.

Architecture

  • Position Token: contracts/DualInvestment/ERC1155DualPosition.sol stores encoded position parameters and enforces mint/burn‑only flows.

  • Manager: DualInvestmentManager(.Upgradeable) validates inputs, coordinates collateral/borrow flows, mints positions.

  • Vault: VaultExecutor handles redeem/mint for pTokens, withdrawal for settlement, and optional swaps.

  • Settlement: SettlementEngine reads price from oracle, determines winning side, executes payout, and burns the position.

  • Router: CompoundBorrowRouter performs safe borrows and routes funds to the vault.

  • Risk: RiskGuard enforces health factor, market utilization, and size limits.

  • DEX: PancakeSwapAdapter provides quotes and swaps (V2/V3).

Key Flows

  • Enter with Collateral

    1. Manager validates and generates tokenId;

    2. VaultExecutor redeems user pTokens → supplies underlying to protocol;

    3. Position minted to user;

    4. ) Risk tracking updated.

  • Enter with Borrow

    1. Manager validates;

    2. Router checks health/liquidity, borrows underlying, routes to VaultExecutor;

    3. Vault supplies and position is minted;

    4. Risk tracking updated.

  • Settlement

    1. SettlementEngine gets settlement price;

    2. Computes winning pToken;

    3. Tries direct withdraw/mint, else withdraws from source and swaps;

    4. Mints payout pTokens to user and burns the position.

Admin & Observability

  • Configure supported markets, limits, routers, adapters, and treasury/rewards (Upgradeable).

  • Events: PositionEntered, PositionSettled, BorrowAndRoute, UserCTokensRedeemed, utilization and risk updates.

Last updated