LiquidationRewardsManagerWusdn
Inherits: LiquidationRewardsManager
This contract calculates rewards for liquidators within the USDN protocol, using wUSDN as the underlying asset. Rewards are computed based on gas costs which are converted to wUSDN using the current price. Additionally a fixed reward is added along with a bonus based on the size of the liquidated ticks.
State Variables
PRICE_PRECISION
The precision used for the price.
uint256 internal constant PRICE_PRECISION = 1e18;
Functions
constructor
constructor(IWusdn wusdn) Ownable(msg.sender);
Parameters
Name | Type | Description |
---|---|---|
wusdn | IWusdn | The address of the wUSDN token. |
getLiquidationRewards
Computes the amount of assets to reward a liquidator.
function getLiquidationRewards(
Types.LiqTickInfo[] calldata liquidatedTicks,
uint256 currentPrice,
bool,
Types.RebalancerAction rebalancerAction,
Types.ProtocolAction,
bytes calldata,
bytes calldata
) external view override returns (uint256 wUsdnRewards_);
Parameters
Name | Type | Description |
---|---|---|
liquidatedTicks | Types.LiqTickInfo[] | Information about the liquidated ticks. |
currentPrice | uint256 | The current price of the asset. |
<none> | bool | |
rebalancerAction | Types.RebalancerAction | The action performed by the _triggerRebalancer function. |
<none> | Types.ProtocolAction | |
<none> | bytes | |
<none> | bytes |
Returns
Name | Type | Description |
---|---|---|
wUsdnRewards_ | uint256 | assetRewards_ The amount of asset tokens to reward the liquidator. |