IWithdrawalManager

Git Source

Inherits: IWithdrawalManagerStorage

Functions

initialize

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

setExitConfig

Pool admin sets a new configuration for the withdrawal manager.

function setExitConfig(uint256 cycleDuration_, uint256 windowDuration_) external;

Parameters

addShares

Add more shares for withdrawal.

function addShares(uint256 shares_, address owner_) external;

Parameters

removeShares

Remove shares from withdrawal.

function removeShares(uint256 shares_, address owner_) external returns (uint256 sharesReturned_);

Parameters

processExit

Process the exit of requested shares of a owner.

function processExit(
    uint256 requestedShares_,
    address owner_
)
    external
    returns (uint256 redeemableShares_, uint256 resultingAssets_);

Parameters

Returns

isInExitWindow

Checks if the owner has a withdrawal request in the exit window.

function isInExitWindow(address owner_) external view returns (bool isInExitWindow_);

Parameters

Returns

lockedLiquidity

Gets the total amount of liquidity locked in the current cycle.

function lockedLiquidity() external view returns (uint256 lockedLiquidity_);

Returns

previewRedeem

Previews the amount of shares and assets that can be redeemed.

function previewRedeem(
    address owner_,
    uint256 shares_
)
    external
    view
    returns (uint256 redeemableShares_, uint256 resultingAssets_);

Parameters

Returns

getCycleConfig

Gets the configuration of a config id.

function getCycleConfig(uint256 configId_) external view returns (WithdrawalManager.CycleConfig memory config_);

Parameters

Returns

getConfigAtId

Gets the configuration of a given cycle id.

function getConfigAtId(uint256 cycleId_) external view returns (WithdrawalManager.CycleConfig memory config_);

Parameters

Returns

getCurrentConfig

Gets the configuration of the current cycle id.

function getCurrentConfig() external view returns (WithdrawalManager.CycleConfig memory config_);

Returns

getCurrentCycleId

Gets the current cycle id.

function getCurrentCycleId() external view returns (uint256 cycleId_);

Returns

getWindowStart

Gets the starting time of a window for a given cycle id.

function getWindowStart(uint256 cycleId_) external view returns (uint64 windowStart_);

Parameters

Returns

getWindowAtId

Gets the start and end time of a window for a given cycle id.

function getWindowAtId(uint256 cycleId_) external view returns (uint64 windowStart_, uint64 windowEnd_);

Parameters

Returns

getRedeemableAmounts

Gets the redeemable amount of an owner based in the current cycle.

function getRedeemableAmounts(
    uint256 lockedShares_,
    address owner_
)
    external
    view
    returns (uint256 redeemableShares_, uint256 resultingAssets_, bool partialLiquidity_);

Parameters

Returns

Events

Initialized

Emitted when a withdrawal manager is initialized.

event Initialized(address poolAddressesProvider_, uint256 cycleDuration_, uint256 windowDuration_);

Parameters

ConfigurationUpdated

Emitted when the configuration of the withdrawal manager is updated.

event ConfigurationUpdated(
    uint256 indexed configId_,
    uint64 initialCycleId_,
    uint64 initialCycleTime_,
    uint64 cycleDuration_,
    uint64 windowDuration_
);

Parameters

WithdrawalCancelled

Emitted when a withdrawal is cancelled.

event WithdrawalCancelled(address indexed account_);

Parameters

WithdrawalProcessed

Emitted when a withdrawal is processed.

event WithdrawalProcessed(address indexed account_, uint256 sharesToRedeem_, uint256 assetsToWithdraw_);

Parameters

WithdrawalUpdated

Emitted when a withdrawal is updated.

event WithdrawalUpdated(address indexed account_, uint256 lockedShares_, uint64 windowStart_, uint64 windowEnd_);

Parameters

Last updated