LiquidationRewardsManagerWstEth
Inherits: LiquidationRewardsManager
This contract calculates rewards for liquidators within the USDN protocol, using wstETH as the underlying asset. Rewards are computed based on gas costs, which are converted to wstETH using the current conversion rate between wstETH and stETH, assuming a one-to-one rate between stETH and ETH. Additionally a fixed reward is added along with a bonus based on the size of the liquidated ticks.
Functions
constructor
constructor(IWstETH wstETH) Ownable(msg.sender);
Parameters
Name | Type | Description |
---|---|---|
wstETH | IWstETH | The address of the wstETH token. |
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,
bytes calldata,
bytes calldata
) external view override returns (uint256 wstETHRewards_);
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. |
<none> | Types.ProtocolAction | |
<none> | bytes | |
<none> | bytes |
Returns
Name | Type | Description |
---|---|---|
wstETHRewards_ | uint256 | assetRewards_ The amount of asset tokens to reward the liquidator. |