IRebalancerEvents
Defines all custom events emitted by the Rebalancer contract.
Events
InitiatedAssetsDeposit
A user initiates a deposit into the Rebalancer.
event InitiatedAssetsDeposit(address indexed payer, address indexed to, uint256 amount, uint256 timestamp);
Parameters
Name | Type | Description |
---|---|---|
payer | address | The address of the user initiating the deposit. |
to | address | The address the assets will be assigned to. |
amount | uint256 | The amount of assets deposited. |
timestamp | uint256 | The timestamp of the action. |
AssetsDeposited
Assets are successfully deposited into the contract.
event AssetsDeposited(address indexed user, uint256 amount, uint256 positionVersion);
Parameters
Name | Type | Description |
---|---|---|
user | address | The address of the user. |
amount | uint256 | The amount of assets deposited. |
positionVersion | uint256 | The version of the position in which the assets will be used. |
DepositRefunded
A deposit is refunded after failing to meet the validation deadline.
event DepositRefunded(address indexed user, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
user | address | The address of the user. |
amount | uint256 | The amount of assets refunded. |
InitiatedAssetsWithdrawal
A user initiates the withdrawal of their pending assets.
event InitiatedAssetsWithdrawal(address indexed user);
Parameters
Name | Type | Description |
---|---|---|
user | address | The address of the user. |
AssetsWithdrawn
Pending assets are withdrawn from the contract.
event AssetsWithdrawn(address indexed user, address indexed to, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
user | address | The original owner of the position. |
to | address | The address the assets are sent to. |
amount | uint256 | The amount of assets withdrawn. |
ClosePositionInitiated
A user initiates a close position action through the rebalancer.
event ClosePositionInitiated(
address indexed user, uint256 rebalancerAmountToClose, uint256 amountToClose, uint256 rebalancerAmountRemaining
);
Parameters
Name | Type | Description |
---|---|---|
user | address | The address of the rebalancer user. |
rebalancerAmountToClose | uint256 | The amount of rebalancer assets to close. |
amountToClose | uint256 | The amount to close, taking into account the previous versions PnL. |
rebalancerAmountRemaining | uint256 | The remaining rebalancer assets of the user. |
PositionMaxLeverageUpdated
The maximum leverage is updated.
event PositionMaxLeverageUpdated(uint256 newMaxLeverage);
Parameters
Name | Type | Description |
---|---|---|
newMaxLeverage | uint256 | The updated value for the maximum leverage. |
MinAssetDepositUpdated
The minimum asset deposit requirement is updated.
event MinAssetDepositUpdated(uint256 minAssetDeposit);
Parameters
Name | Type | Description |
---|---|---|
minAssetDeposit | uint256 | The updated minimum amount of assets to be deposited by a user. |
PositionVersionUpdated
The position version is updated.
event PositionVersionUpdated(
uint128 newPositionVersion, uint256 entryAccMultiplier, uint128 amount, Types.PositionId positionId
);
Parameters
Name | Type | Description |
---|---|---|
newPositionVersion | uint128 | The updated version of the position. |
entryAccMultiplier | uint256 | The accumulated multiplier at the opening of the new version. |
amount | uint128 | The amount of assets injected into the position as collateral by the rebalancer. |
positionId | Types.PositionId | The ID of the new position in the USDN protocol. |
TimeLimitsUpdated
Time limits are updated.
event TimeLimitsUpdated(
uint256 validationDelay, uint256 validationDeadline, uint256 actionCooldown, uint256 closeDelay
);
Parameters
Name | Type | Description |
---|---|---|
validationDelay | uint256 | The updated validation delay. |
validationDeadline | uint256 | The updated validation deadline. |
actionCooldown | uint256 | The updated action cooldown. |
closeDelay | uint256 | The updated close delay. |