Skip to main content

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

NameTypeDescription
psmaddressundefined

Returns

NameTypeDescription
_0boolundefined

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

NameTypeDescription
psmaddressundefined

Returns

NameTypeDescription
_0boolundefined

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

NameTypeDescription
psmaddressundefined

Returns

NameTypeDescription
_0boolundefined

connectDeposit

function connectDeposit(address psm, address pcvDeposit) external nonpayable

establish connection between PSM and a PCV Deposit

Parameters

NameTypeDescription
psmaddressundefined
pcvDepositaddressundefined

connectPSM

function connectPSM(address psm, uint248 targetBalance, int8 decimalsNormalizer) external nonpayable

create a new deposit

Parameters

NameTypeDescription
psmaddressPeg Stability Module for this deposit
targetBalanceuint248target amount of tokens for the PSM to hold
decimalsNormalizerint8decimal 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

NameTypeDescription
pcvDepositaddressundefined

disconnectPSM

function disconnectPSM(address psm) external nonpayable

delete an existing deposit

Parameters

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

NameTypeDescription
psmaddressundefined

editPSMTargetBalance

function editPSMTargetBalance(address psm, uint248 targetBalance) external nonpayable

edit an existing deposit

Parameters

NameTypeDescription
psmaddressPeg Stability Module for this deposit
targetBalanceuint248target 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

NameTypeDescription
psmaddressundefined

Events

DepositConnected

event DepositConnected(address psm, address pcvDeposit)

emitted when a psm is connected to a PCV Deposit

Parameters

NameTypeDescription
psmaddressundefined
pcvDepositaddressundefined

DepositDeleted

event DepositDeleted(address deposit)

emitted when an existing deposit is deleted

Parameters

NameTypeDescription
depositaddressundefined

Dripped

event Dripped(uint256 amount, address target)

event emitted when tokens are sent to the pullTarget from the pushTarget

Parameters

NameTypeDescription
amountuint256undefined
targetaddressundefined

PSMConnected

event PSMConnected(address psm, address token, uint248 targetBalance, int8 decimalsNormalizer)

emitted when a new PSM is connected

Parameters

NameTypeDescription
psmaddressundefined
tokenaddressundefined
targetBalanceuint248undefined
decimalsNormalizerint8undefined

PSMDeleted

event PSMDeleted(address psm)

emitted when a PSM is deleted

Parameters

NameTypeDescription
psmaddressundefined

PSMTargetBalanceUpdated

event PSMTargetBalanceUpdated(address psm, uint248 targetBalance)

emitted when an existing PSM is updated

Parameters

NameTypeDescription
psmaddressundefined
targetBalanceuint248undefined

Skimmed

event Skimmed(uint256 amount, address target)

event emitted when tokens are sent to the pushTarget from the pullTarget

Parameters

NameTypeDescription
amountuint256undefined
targetaddressundefined