Fei Protocol
Search…
EthPCVDripper
Drips ETH into a target contract

Contract

EthPCVDripper implements CoreRef, Timed

Description

Drips fixed size batches of held ETH to a target contract with a certain frequency.
If the target has at least the batch size (amountToDrip) then the drip will fail
The dripper prevents a target contract from holding more than 2x the batch size of ETH effectively allowing a smoother release of potentially large amounts of ETH to target contracts.
This has a few advantages:
  • Allowing the Guardian to intervene in the event of an issue
  • Mitigating oracle manipulation risk
  • Preventing large ETH supply shocks to happen instantaneously

Parameterization

Param
Value
amountToDrip
5000000000000000000000 (5000 ETH)
duration
3600 (1 hour)
None

Events

Dripped
Withdrawal
A drip to the target
type
param
description
uint256
amount
amount ETH dripped
Withdrawal of PCV
type
param
description
address indexed
_to
the recipient address of the PCV
uint256
_amount
amount withdrawn

Read-Only Functions

isTargetBalanceLow

1
function isTargetBalanceLow() external view returns (bool);
Copied!
Returns true when the target balance is less than amountToDrip

target

1
function target() external view returns (address);
Copied!
Returns the target address to drip to

amountToDrip

Returns the amount dripped to the target on each drip call

Public State-Changing Functions

drip

1
function drip() external;
Copied!
Sends amountToDrip() ETH to target() if the following conditions are met:
  • duration seconds have passed since the last drip
  • the contract is not paused by the Guardian
  • isTargetBalanceLow() is true
emits Dripped

PCV Controller-Only ⚙️ State-Changing Functions

withdraw

1
function withdrawETH(address payable to, uint256 amount) external;
Copied!
Withdraws amount ETH to address to from the EthPCVDripper
emits Withdrawal

ABIs

ethpcvdripper.json
4KB
Code
EthPCVDripper ABI
Last modified 8mo ago