IVaultPenaltyHandler
IVaultPenaltyHandler
Addresses
Chain | Address |
---|
Functions
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) external
clearRequestAndPenalty
Clear a user's request and penalty rate, since immediate withdraws have become available
function clearRequestAndPenalty(address account) external
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) external
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 |
VaultPenaltyDelegate
Addresses
Chain | Address |
---|
Functions
decrementPenalty
function decrementPenalty(contract IVaultPenaltyHandler handler, address user, Shares shares) internal
clearPenalty
function clearPenalty(contract IVaultPenaltyHandler handler, address user) internal
clearRequestAndPenalty
function clearRequestAndPenalty(contract IVaultPenaltyHandler handler, address account) internal
subtractPendingRequest
function subtractPendingRequest(
contract IVaultPenaltyHandler handler,
address account,
Shares sharesRedeemed,
uint256 assetsWithdrawn
) internal