Skip to main content

Every deposit or withdrawal syncs the market against the current SY exchange rate before validation. An integration preview can become stale if the SY exchange rate, return model, or market state changes before execution. For the lifecycle model, see Market State Model. For utilization math, see Utilization. Utilization and threshold fields are Number fixed-point ratios onchain. A displayed 1.0 is stored as 1_000_000_000_000.

Shared Checks

Senior Deposit

Senior deposits are allowed in Active or FixedTermRecovery, but only when both Senior and Junior impermanent loss balances are zero. The post-deposit utilization must not exceed 1.0: Upost1U_{\text{post}} \le 1 The program compares U_post to UNIT, where UNIT = 1_000_000_000_000. Use getSrRemainingCapacityNetAssetValue() or getSyncedSrRemainingCapacityNetAssetValue() to check remaining Senior room. Senior capacity can be lower than the configured max supply because it is also constrained by available Junior coverage.

Junior Deposit

Junior deposits are allowed only in Active. They are blocked while Senior has unrecovered impermanent loss. Junior deposits increase Junior effective NAV and usually reduce utilization. They are still subject to maxJuniorLpSupply when that cap is non-zero. Use getJrRemainingCapacityNetAssetValue() or getSyncedJrRemainingCapacityNetAssetValue() to check configured Junior capacity.

Senior Withdrawal

Senior withdrawals are allowed only in Active. During the Recovery Period, Senior withdrawals are paused. The recovery window is the market’s fixed-term observation period: For wallet and lending integrations, treat FixedTermRecovery as a Senior withdrawal lock. You can still transfer Senior LP tokens, but the market will not redeem them until the state returns to Active.

Junior Withdrawal

Junior withdrawals are allowed in Active and FixedTermRecovery, but they cannot reduce protection below the market’s required level. The transaction fails if post-withdraw utilization exceeds 1.0: Upost1U_{\text{post}} \le 1 The program compares U_post to UNIT, where UNIT = 1_000_000_000_000. For integrations that allow Junior LP as collateral, this check is important. A Junior LP balance can be transferable and still fail redemption if withdrawing it would leave Senior under-protected.

Risk Integration Checklist

For SDK code that reads these values, see SDK Preflight.