IERC20Allocator
Volt Protocol
Contract to remove all excess funds past a certain threshold from a smart contract used to allocate funds from a PSM to a yield venue so that liquid reserves are minimized This contract should never hold PCV, however it has a sweep function, so if tokens get sent to it, they can still be recovered.
Methods
checkActionAllowed
function checkActionAllowed(address psm) external view returns (bool)
returns whether an action is allowed
Parameters
Name | Type | Description |
---|
psm | address | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
checkDripCondition
function checkDripCondition(address psm) external view returns (bool)
function that returns whether the amount of tokens held are below the target and funds should flow from PCV Deposit -> PSM
Parameters
Name | Type | Description |
---|
psm | address | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
checkSkimCondition
function checkSkimCondition(address psm) external view returns (bool)
function that returns whether the amount of tokens held are above the target and funds should flow from PSM -> PCV Deposit
Parameters
Name | Type | Description |
---|
psm | address | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
connectDeposit
function connectDeposit(address psm, address pcvDeposit) external nonpayable
establish connection between PSM and a PCV Deposit
Parameters
Name | Type | Description |
---|
psm | address | undefined |
pcvDeposit | address | undefined |
connectPSM
function connectPSM(address psm, uint248 targetBalance, int8 decimalsNormalizer) external nonpayable
create a new deposit
Parameters
Name | Type | Description |
---|
psm | address | Peg Stability Module for this deposit |
targetBalance | uint248 | target amount of tokens for the PSM to hold |
decimalsNormalizer | int8 | decimal normalizer to ensure buffer is depleted and replenished properly |
deleteDeposit
function deleteDeposit(address pcvDeposit) external nonpayable
delete connection between PSM and a PCV Deposit
Parameters
Name | Type | Description |
---|
pcvDeposit | address | undefined |
disconnectPSM
function disconnectPSM(address psm) external nonpayable
delete an existing deposit
Parameters
Name | Type | Description |
---|
psm | address | Peg Stability Module to remove from allocation |
drip
function drip(address psm) external nonpayable
push ERC20 tokens to PSM by pulling from a PCV deposit flow of funds: PCV Deposit -> PSM
Parameters
Name | Type | Description |
---|
psm | address | undefined |
editPSMTargetBalance
function editPSMTargetBalance(address psm, uint248 targetBalance) external nonpayable
edit an existing deposit
Parameters
Name | Type | Description |
---|
psm | address | Peg Stability Module for this deposit |
targetBalance | uint248 | target amount of tokens for the PSM to hold |
skim
function skim(address psm) external nonpayable
pull ERC20 tokens from pull target and send to push target if and only if the amount of tokens held in the contract is above the threshold.
Parameters
Name | Type | Description |
---|
psm | address | undefined |
Events
DepositConnected
event DepositConnected(address psm, address pcvDeposit)
emitted when a psm is connected to a PCV Deposit
Parameters
Name | Type | Description |
---|
psm | address | undefined |
pcvDeposit | address | undefined |
DepositDeleted
event DepositDeleted(address deposit)
emitted when an existing deposit is deleted
Parameters
Name | Type | Description |
---|
deposit | address | undefined |
Dripped
event Dripped(uint256 amount, address target)
event emitted when tokens are sent to the pullTarget from the pushTarget
Parameters
Name | Type | Description |
---|
amount | uint256 | undefined |
target | address | undefined |
PSMConnected
event PSMConnected(address psm, address token, uint248 targetBalance, int8 decimalsNormalizer)
emitted when a new PSM is connected
Parameters
Name | Type | Description |
---|
psm | address | undefined |
token | address | undefined |
targetBalance | uint248 | undefined |
decimalsNormalizer | int8 | undefined |
PSMDeleted
event PSMDeleted(address psm)
emitted when a PSM is deleted
Parameters
Name | Type | Description |
---|
psm | address | undefined |
PSMTargetBalanceUpdated
event PSMTargetBalanceUpdated(address psm, uint248 targetBalance)
emitted when an existing PSM is updated
Parameters
Name | Type | Description |
---|
psm | address | undefined |
targetBalance | uint248 | undefined |
Skimmed
event Skimmed(uint256 amount, address target)
event emitted when tokens are sent to the pushTarget from the pullTarget
Parameters
Name | Type | Description |
---|
amount | uint256 | undefined |
target | address | undefined |