Git Source
Inherits: IWithdrawalManagerStorage
Initializes the Withdrawal Manager.
Function is invoked by the proxy contract when the Withdrawal Manager Contract is added to the PoolAddressesProvider of the market.
function initialize(IPoolAddressesProvider provider_, uint256 cycleDuration_, uint256 windowDuration_) external;
Parameters
The address of the PoolAddressesProvider.
The total duration of a withdrawal cycle.
The duration of the withdrawal window.
Pool admin sets a new configuration for the withdrawal manager.
function setExitConfig(uint256 cycleDuration_, uint256 windowDuration_) external;
Parameters
The total duration of a withdrawal cycle.
The total duration of a withdrawal window.
Add more shares for withdrawal.
Parameters
The amount of shares to add.
Remove shares from withdrawal.
Parameters
The amount of shares to remove from withdrawal.
Process the exit of requested shares of a owner.
Parameters
The amount of shares to redeem.
Returns
The amount of redeemable shares.
The corresponding amount of assets with the redeemable shares.
Checks if the owner has a withdrawal request in the exit window.
Parameters
The owner address to check.
Returns
True if the owner has a withdrawal request in the exit window.
lockedLiquidity
Gets the total amount of liquidity locked in the current cycle.
Returns
The total amount of liquidity locked in the current cycle.
Previews the amount of shares and assets that can be redeemed.
Parameters
The amount of shares to redeem.
Returns
The amount of redeemable shares.
The corresponding amount of assets with the redeemable shares.
Gets the configuration of a config id.
Parameters
Returns
WithdrawalManager.CycleConfig
Gets the configuration of a given cycle id.
Parameters
Returns
WithdrawalManager.CycleConfig
The configuration used at the cycle id.
getCurrentConfig
Gets the configuration of the current cycle id.
Returns
WithdrawalManager.CycleConfig
The configuration used at the current cycle id.
getCurrentCycleId
Gets the current cycle id.
Returns
The id of the current cycle.
Gets the starting time of a window for a given cycle id.
Parameters
Returns
The starting time of the window.
Gets the start and end time of a window for a given cycle id.
Parameters
Returns
The starting time of the window.
The ending time of the window.
getRedeemableAmounts
Gets the redeemable amount of an owner based in the current cycle.
Parameters
The amount of locked shares under the owner.
The address of the owner.
Returns
The amount of redeemable shares.
The corresponding amount of assets with the redeemable shares.
Emitted when a withdrawal manager is initialized.
Parameters
The address of the PoolAddressesProvider.
The duration of a withdrawal cycle.
The duration of the withdrawal window.
ConfigurationUpdated
Emitted when the configuration of the withdrawal manager is updated.
Parameters
The id of the configuration.
The id of the initial cycle.
The starting time of the initial cycle.
The duration of a withdrawal cycle.
The duration of the withdrawal window.
WithdrawalCancelled
Emitted when a withdrawal is cancelled.
Parameters
The account whose withdrawal is cancelled.
WithdrawalProcessed
Emitted when a withdrawal is processed.
Parameters
The account whose withdrawal is processed.
The amount of shares to redeem.
The amount of assets to withdraw.
WithdrawalUpdated
Emitted when a withdrawal is updated.
Parameters
The account whose withdrawal is updated.
The new amount of locked shares.
The new starting time of the withdrawal window.
The new ending time of the withdrawal window.