Skip to Content

Interfaces

The manager and escrow interfaces, as an integrator consumes them. In the repository they live under src/wind/euler/core/interfaces/ and src/unwind/euler/core/interfaces/.

IWindManager

Entry side.

function requestWind( uint256 equityAmount, uint256 leverageBps, address subAccount, bytes[] calldata pythUpdateData, bytes calldata adapterData ) external payable returns (bytes32 requestId); function finalizeWind(bytes32 requestId, bytes[] calldata pythUpdateData) external payable; function settleRequest(bytes32 requestId, bytes calldata adapterData) external;

requestWind verifies the caller’s Keyring credential (checkCredential(user, policyId); a policy ID of zero disables the check), enforces the market’s equity and leverage bounds, borrows against PSBA collateral, and submits the tokenised asset deposit through the adapter. Settlement readiness is confirmed off-chain by the operator, and there is no wind queue; settleRequest is keyed by a single request ID. Wind escrows move through three states: Initialized (clone deployed), Pending (position opened, subscription in flight), Finalized (tokenised asset collateral in place, position transferred to the user’s sub-account). Representative errors: WindManager__NotKyced, WindManager__EquityBelowMinimum, WindManager__LeverageTooHigh, WindManager__UserWalletMissing (see user wallets).

IUnwindManagerCore and IUnwindManagerExtension

Exit side.

function requestUnwind(RequestUnwindParams calldata params) external payable returns (bytes32 requestId); function settleRequest(bytes32 requestId, bytes calldata adapterData) external; function finalizeUnwind(bytes32 requestId, address subAccount, bytes[] calldata pythUpdateData) external payable; function checkAuctionLiquidation(bytes32 requestId, uint256 repayAssets, bytes[] calldata pythUpdateData) external payable returns (bool liquidatable, uint256 yield, Status status); function executeAuctionLiquidation( bytes32 requestId, uint256 repayAssets, uint256 minYieldBalance, bytes[] calldata pythUpdateData, address winner ) external payable returns (uint256 yieldBalance); function safetyCloseUnwind(bytes32 requestId) external;

requestUnwind takes the sub-account, collateral shares, debt amount, oracle update data, and adapter data, enforces the buffer LTV (UnwindManagerCore__UnacceptableCdpLtv on violation), pulls the debt into a fresh escrow, and mints the Receipt NFT. Liquidation of unhealthy escrows runs through an auction contract whose bidders are credential-checked like winders. Each round is opened with a bonus ceiling (maxBonus) and enforces a minimum bid improvement (minBonusDecrementBps, read via getMinBonusDecrementBps); a bid above the ceiling reverts UnwindLiquidationAuction__BonusExceedsMax. Key events: UnwindRequested, UnwindFinalized, UnwindLiquidated, UnwindSafetyClosed.

IUnwindEscrow

One escrow per request, deployed as a deterministic minimal-proxy clone of an immutable implementation:

enum Status { Initialized, Pending, Redeeming, Finalized } function pullDebt(address subAccount, uint256 debt) external; function prepareRedemption(uint256 pendingSettlementAmount, uint256 collateralAssetsToRedeem, address recipient) external; function finalizeUnwind(uint256 debtAssetAmount, address subAccount) external returns (uint256);

Redemption uses the ERC-7540 asynchronous flow against the provider’s adapter. EscrowStatusUpdated tracks transitions.

Events for indexers

Wind: WindRequested, WindSettled, WindFinalized, WindSafetyClosed, KeyringFeesAccrued, KeyringFeeClaimed, and EscrowStatusUpdated on every escrow transition. Unwind: UnwindRequested, UnwindFinalized, UnwindLiquidated, UnwindSafetyClosed, EscrowStatusUpdated. The auction emits its own lifecycle: LiquidationRoundOpened, LiquidationBidSubmitted, LiquidationRoundExecuted, LiquidationRoundExpired, LiquidationRoundClosed, LiquidationPayoutClaimed, BidBondWithdrawn. Escrow addresses in events are the deterministic clone addresses.

Last verified on