Pause this contract, which prevents future calls to deposit and depositWithPermit.
Callable by MULTISIG_ROLE.
function pause() external requiresAuth;
unpause
Unpause this contract, which allows future calls to deposit and depositWithPermit.
Callable by MULTISIG_ROLE.
function unpause() external requiresAuth;
addAsset
Adds this asset as a deposit asset.
The accountant must also support pricing this asset, else the deposit call will revert.
Callable by OWNER_ROLE.
function addAsset(ERC20 asset) external requiresAuth;
removeAsset
Removes this asset as a deposit asset.
Callable by OWNER_ROLE.
function removeAsset(ERC20 asset) external requiresAuth;
setShareLockPeriod
Sets the share lock period.
This not only locks shares to the user address, but also serves as the pending deposit period, where deposits can be reverted.
If a new shorter share lock period is set, users with pending share locks could make a new deposit to receive 1 wei shares, and have their shares unlock sooner than their original deposit allows. This state would allow for the user deposit to be refunded, but only if they have not transferred their shares out of there wallet. This is an accepted limitation, and should be known when decreasing the share lock period.
Callable by OWNER_ROLE.
function setShareLockPeriod(uint64 _shareLockPeriod) external requiresAuth;
beforeTransfer
Implement beforeTransfer hook to check if shares are locked.
function beforeTransfer(address from) public view;
refundDeposit
Allows DEPOSIT_REFUNDER_ROLE to revert a pending deposit.
Once a deposit share lock period has passed, it can no longer be reverted.
It is possible the admin does not setup the BoringVault to call the transfer hook, but this contract can still be saving share lock state. In the event this happens deposits are still refundable if the user has not transferred their shares. But there is no guarantee that the user has not transferred their shares.