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 bnbUSDcoll
: Positionβs collateral amount (e.g.,slisBNB
)price
: Price of the collateral (in stablecoins)x
: Amount of debt to be repaidy
: Collateral to be sold, wherey = 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
Identify positions above the rebalancing threshold (e.g., 88% LTV).
Calculate rewards for each position:
bounty = (rawDebts * bonusRatio / FEE_PRECISION) * (FEE_PRECISION - liquidationExpenseRatio) / FEE_PRECISION
Swap collateral for stablecoins, potentially using a flash loan.
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 positionbalance
: Available token reserves in the poolprice
: Price of the collateralbonus
: Liquidation bonus ratio
The final liquidation amount is the lesser of this computed value and the actual debt.
𧨠Liquidation Process
Monitor LTVs.
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)
0xe8a16F808412C4341F692B49C81d64C374187B7D https://bscscan.com/address/0xe8a16F808412C4341F692B49C81d64C374187B7D
π° 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