Skip to main content

VaultPenaltyHandler

VaultPenaltyHandler

Addresses

ChainAddress
Arbitrum Sepolia0xf723565d8a6eFBb64d9e7c4B5Ae16Cc4399922E5
Base Sepolia0x7AF44C56Cc3ee74228Ef73473A77923E45377f53
Base Mainnet0x447d9B189D8B723b8187e029B817c9F2D5f29dfD

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

NameTypeDescription
useraddressOwner of (partially) filled request
sharesSharesNumber 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

NameTypeDescription
accountaddressAddress 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

NameTypeDescription
accountaddressAccount making the withdrawal (subtraction happens at that request's rate)
sharesRedeemedSharesNumber of shares if this is a redeem, 0 otherwise
assetsWithdrawnuint256assets withdrawn, if this is a withdraw. 0 otherwise

Events

WithdrawCleared

event WithdrawCleared(address caller, address owner, struct IVaultDomain.WithdrawRequest withdrawRequest)