VaultPenaltyHandler
VaultPenaltyHandler
Addresses
Chain | Address |
---|---|
Arbitrum Sepolia | 0xf723565d8a6eFBb64d9e7c4B5Ae16Cc4399922E5 |
Base Sepolia | 0x7AF44C56Cc3ee74228Ef73473A77923E45377f53 |
Base Mainnet | 0x447d9B189D8B723b8187e029B817c9F2D5f29dfD |
Functions
initialize
function initialize(struct StorageInstance app_) external
decrementPenalty
After (partially) filling a request, decrease or clear the user's stored penalty.
function decrementPenalty(address user, Shares shares) external
Parameters
Name | Type | Description |
---|---|---|
user | address | Owner of (partially) filled request |
shares | Shares | Number of shares that have just been withdrawn or redeemed |
clearPenalty
function clearPenalty(address user) public
clearRequestAndPenalty
Clear a user's request and penalty rate, since immediate withdraws have become available
function clearRequestAndPenalty(address account) public
Parameters
Name | Type | Description |
---|---|---|
account | address | Address of request holder |
subtractPendingRequest
Assuming that pendingRedeem
and pendingWithdraw
account for a
request's shares
and assets
, and a withdraw/redemption has just
occured, figure out whatever fraction of the request this withdraw
/redeem represents and subtract it from the totals.
function subtractPendingRequest(address account, Shares sharesRedeemed, uint256 assetsWithdrawn) public
Dev note
Derived share/asset quantities may not be at the request's rate (see getLesserRate), so we have to recompute here.
Parameters
Name | Type | Description |
---|---|---|
account | address | Account making the withdrawal (subtraction happens at that request's rate) |
sharesRedeemed | Shares | Number of shares if this is a redeem, 0 otherwise |
assetsWithdrawn | uint256 | assets withdrawn, if this is a withdraw. 0 otherwise |
Events
WithdrawCleared
event WithdrawCleared(address caller, address owner, struct IVaultDomain.WithdrawRequest withdrawRequest)