IBaseLiquidationRewardsManager
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
Name | Type | Description |
---|---|---|
liquidatedTicks | Types.LiqTickInfo[] | Information about the liquidated ticks. |
currentPrice | uint256 | The current price of the asset. |
rebased | bool | Indicates whether a USDN rebase was performed. |
rebalancerAction | Types.RebalancerAction | The action performed by the _triggerRebalancer function. |
action | Types.ProtocolAction | The type of protocol action that triggered the liquidation. |
rebaseCallbackResult | bytes | The result of the rebase callback, if any. |
priceData | bytes | The oracle price data, if any. This can be used to differentiate rewards based on the oracle used to provide the liquidation price. |
Returns
Name | Type | Description |
---|---|---|
assetRewards_ | uint256 | The amount of asset tokens to reward the liquidator. |