Earn from Permissionless Rebalancing & Liquidation

Guide to Monitoring and Triggering Rebalance & Liquidation Operations

This document explains the details of Rebalancing and Liquidation mechanisms within the Sigma Money protocol. These processes are permissionless and can be triggered by any keeper (bot or user), helping maintain system stability.

Rebalancing

πŸ”Έ When is Rebalancing Triggered?

Rebalancing occurs when a leveraged position (xPOSITION) exceeds the rebalancing threshold (e.g., 88% LTV) but is still below the full liquidation threshold (e.g., 95% LTV).

A position is eligible for rebalancing if it satisfies:

(debt - x) / (price * (coll - y * (1 + incentive))) <= target_ratio

Where:

  • debt: Position’s debt in bnbUSD

  • coll: Position’s collateral amount (e.g., slisBNB)

  • price: Price of the collateral (in stablecoins)

  • x: Amount of debt to be repaid

  • y: Collateral to be sold, where y = x / price

  • incentive: Rebalancing incentive ratio (bounty for keeper)

Solving for x:

x >= (debt - target_ratio * price * coll) / (1 - (1 + incentive) * target_ratio)

Each eligible position’s x (also called rawDebts) is calculated, and positions with the highest x are prioritized.

πŸ”„ Rebalance Process

  1. Identify positions above the rebalancing threshold (e.g., 88% LTV).

  2. Calculate rewards for each position:

    bounty = (rawDebts * bonusRatio / FEE_PRECISION) * (FEE_PRECISION - liquidationExpenseRatio) / FEE_PRECISION
  3. Swap collateral for stablecoins, potentially using a flash loan.

  4. Execute:

function rebalance(
  address pool,
  int16 tickId,
  address tokenIn,
  uint256 maxAmount,
  uint256 minCollOut
)

Or:

function rebalance(
  address pool,
  address tokenIn,
  uint256 maxAmount,
  uint256 minCollOut
)

Liquidation

πŸ”Έ When is Liquidation Triggered?

Liquidation occurs when a position exceeds the liquidation threshold (e.g., 95% LTV).

The maximum amount of debt that can be liquidated is:

rawDebts <= (rawColls + balance) / (1 + bonus) * price

Where:

  • rawColls: Collateral held in the position

  • balance: Available token reserves in the pool

  • price: Price of the collateral

  • bonus: Liquidation bonus ratio

The final liquidation amount is the lesser of this computed value and the actual debt.

🧨 Liquidation Process

  1. Monitor LTVs.

  2. When threshold exceeded:

    • Call:

function liquidate(
  address pool,
  address tokenIn,
  uint256 maxAmount,
  uint256 minCollOut
)

πŸ”§ Developers

Monitor and Trigger Operations

Keepers can monitor on-chain data and trigger rebalancing or liquidation operations when conditions are met. These actions provide opportunities to acquire discounted collateral.

  • Rebalancing is more frequent, triggered at 88% LTV to protect users from liquidation.

  • Liquidation occurs at 95% LTV if the position is not rebalanced in time.

πŸ”Ή Price Ticks

  • All positions within the same price tick can be processed together.

  • A price tick represents a 0.15% price range.

  • Rebalancing and liquidation can be executed individually (per tick) or in batches (all eligible ticks).

βš™οΈ Contracts & Conditions

πŸ“˜ slisBNB Mint Parameters (SigmaClisBNB Pool - SY Pool)

πŸ’° Stability Pool Contract

If the Stability Pool TVL is above $10,000 (very likely):

Use the Stability Pool contract to perform rebalance or liquidate.

// Rebalance
contract address: 
https://bscscan.com/address/0x2b9C1F069Ddcd873275B3363986081bDA94A3aA3#writeProxyContract#F12

// Liquidate
contract address: 
https://bscscan.com/address/0x2b9C1F069Ddcd873275B3363986081bDA94A3aA3#writeProxyContract#F9

Specify a tick or position to process individually, or leave blank to process all eligible in batch.

🧱 PoolManager Contract

If the Stability Pool TVL is below $10,000 (unlikely but possible under stress conditions):

Use the PoolManager contract instead.

// Rebalance
contract address: 
https://bscscan.com/address/0x0a43ca87954ED1799b7b072F6E9D51d88Cca600E#writeProxyContract#F12

// Liquidate
contract address: 
https://bscscan.com/address/0x0a43ca87954ED1799b7b072F6E9D51d88Cca600E#writeProxyContract#F8

You can specify a tick or position, or let the system handle all eligible ones in batch.

Last updated