← Back to projects
Project README

Prism Hook

Uniswap v4 hook that splits every LP deposit into LP-Y (zero IL, pure fee yield) and LP-D (absorbs IL, USDC collateral). A live market inside the pool — no emissions, no rented liquidity.

SolidityUniswap v4ERC-1155Reactive NetworkNext.jsWagmi v2Foundry
Prism Hook — LP-Y / LP-D split mechanism
LP deposit split: LP-Y (zero IL) and LP-D (IL absorber) minted atomically

The Problem

Every Uniswap LP position bundles two completely different financial products: fee yield (predictable income) and delta exposure (impermanent loss). A 2021 study of 17,000 wallets found ~50% of Uniswap LPs underperformed simply holding. Protocols run perpetual token emissions to compensate LPs for this risk — rented liquidity that leaves the moment emissions slow.

What Prism Does

On every deposit, the hook mints two ERC-1155 tokens: LP-Y (earns all swap fees, zero IL) and LP-D (absorbs 100% of IL, earns a fee share, backed by USDC collateral). Protocols bid for LP-D on an on-chain order book. When an LP deposits, the hook fills the best bid atomically in the same transaction — split, match, collateral lock, one tx.

How It Works

  • LP deposits into any Uniswap v4 pool with the Prism hook.
  • Hook mints LP-Y and LP-D (tokenId = positionId) via ERC-1155.
  • Best standing bid auto-fills inside afterAddLiquidity — atomic, no user opt-in.
  • On exit, IL is computed oracle-free (entry vs exit sqrtPrice from the pool) and paid from the buyer's USDC vault.
  • A Reactive Smart Contract on Lasna monitors every swap cross-chain and auto-settles positions when price reverts — no keepers, no cron.

The Trust Layer

Settlement is oracle-free: IL depends only on the price ratio computed from StateLibrary.getSlot0 — no Chainlink, no TWAP. Oracle manipulation is self-defeating. The RSC on Reactive Network watches prices across blocks (which a hook fundamentally cannot do inside a single tx) and fires cross-chain callbacks for automatic settlement.

Results

66/66 Foundry tests passing covering all 7 required settlement cases including CEI ordering, idempotent settlement, auth guards, and positionId collision resistance. 6 contracts across 2 chains. Fully deployed on Unichain Sepolia. Full dApp live at prism.ayush.works.