IBaseLiquidationRewardsManager

Git Source

This interface exposes the only function used by the UsdnProtocol.

Future implementations of the rewards manager must implement this interface without modifications.

Functions

getLiquidationRewards

Computes the amount of assets to reward a liquidator.

function getLiquidationRewards(
    Types.LiqTickInfo[] calldata liquidatedTicks,
    uint256 currentPrice,
    bool rebased,
    Types.RebalancerAction rebalancerAction,
    Types.ProtocolAction action,
    bytes calldata rebaseCallbackResult,
    bytes calldata priceData
) external view returns (uint256 assetRewards_);

Parameters

NameTypeDescription
liquidatedTicksTypes.LiqTickInfo[]Information about the liquidated ticks.
currentPriceuint256The current price of the asset.
rebasedboolIndicates whether a USDN rebase was performed.
rebalancerActionTypes.RebalancerActionThe action performed by the _triggerRebalancer function.
actionTypes.ProtocolActionThe type of protocol action that triggered the liquidation.
rebaseCallbackResultbytesThe result of the rebase callback, if any.
priceDatabytesThe oracle price data, if any. This can be used to differentiate rewards based on the oracle used to provide the liquidation price.

Returns

NameTypeDescription
assetRewards_uint256The amount of asset tokens to reward the liquidator.