⬅️ Contracts
a PCV dripping controller
Author: Fei Protocol
Mainnet implementations
Core, Fei, AavePCVDeposit, MintRedeemPausePSM, PriceBoundPSM, ERC20CompoundPCVDeposit, BAMMDeposit
Events
BufferCapUpdate
event BufferCapUpdate(uint256,uint256)
Params
| Param |
Type |
Notes |
| oldBufferCap |
uint256 |
|
| newBufferCap |
uint256 |
|
BufferUsed
event BufferUsed(uint256,uint256)
Params
| Param |
Type |
Notes |
| amountUsed |
uint256 |
|
| bufferRemaining |
uint256 |
|
ContractAdminRoleUpdate
event ContractAdminRoleUpdate(bytes32,bytes32)
Params
| Param |
Type |
Notes |
| oldContractAdminRole |
bytes32 indexed |
|
| newContractAdminRole |
bytes32 indexed |
|
CoreUpdate
event CoreUpdate(address,address)
Params
| Param |
Type |
Notes |
| oldCore |
address indexed |
|
| newCore |
address indexed |
|
DripAmountUpdate
event DripAmountUpdate(uint256,uint256)
Params
| Param |
Type |
Notes |
| oldDripAmount |
uint256 |
|
| newDripAmount |
uint256 |
|
Dripped
event Dripped(address,address,uint256)
Params
| Param |
Type |
Notes |
| source |
address indexed |
|
| target |
address indexed |
|
| amount |
uint256 |
|
DurationUpdate
event DurationUpdate(uint256,uint256)
Params
| Param |
Type |
Notes |
| oldDuration |
uint256 |
|
| newDuration |
uint256 |
|
IncentiveUpdate
event IncentiveUpdate(uint256,uint256)
Params
| Param |
Type |
Notes |
| oldIncentiveAmount |
uint256 |
|
| newIncentiveAmount |
uint256 |
|
Paused
event Paused(address)
Params
| Param |
Type |
Notes |
| account |
address |
|
RateLimitPerSecondUpdate
event RateLimitPerSecondUpdate(uint256,uint256)
Params
| Param |
Type |
Notes |
| oldRateLimitPerSecond |
uint256 |
|
| newRateLimitPerSecond |
uint256 |
|
SourceUpdate
event SourceUpdate(address,address)
Params
| Param |
Type |
Notes |
| oldSource |
address indexed |
|
| newSource |
address indexed |
|
TargetUpdate
event TargetUpdate(address,address)
Params
| Param |
Type |
Notes |
| oldTarget |
address indexed |
|
| newTarget |
address indexed |
|
TimerReset
event TimerReset(uint256)
Params
| Param |
Type |
Notes |
| startTime |
uint256 |
|
Unpaused
event Unpaused(address)
Params
| Param |
Type |
Notes |
| account |
address |
|
Methods
CONTRACT_ADMIN_ROLE
function CONTRACT_ADMIN_ROLE() view returns(bytes32)
a role used with a subset of governor permissions for this contract only
Returns
MAX_RATE_LIMIT_PER_SECOND
function MAX_RATE_LIMIT_PER_SECOND() view returns(uint256)
maximum rate limit per second governance can set for this contract
Returns
buffer
function buffer() view returns(uint256)
the amount of action used before hitting limit
replenishes at rateLimitPerSecond per second up to bufferCap
Returns
bufferCap
function bufferCap() view returns(uint256)
the cap of the buffer that can be used at once
Returns
core
function core() view returns(address)
address of the Core contract referenced
Returns
| Param |
Type |
Notes |
|
address |
ICore implementation address |
doPartialAction
function doPartialAction() view returns(bool)
a flag for whether to allow partial actions to complete if the buffer is less than amount
Returns
drip
function drip() nonpayable
drip PCV to target by withdrawing from source
dripAmount
function dripAmount() view returns(uint256)
amount to drip after each window
Returns
dripEligible
function dripEligible() view returns(bool)
checks whether the target balance is less than the drip amount
Returns
duration
function duration() view returns(uint256)
the duration of the timed period
Returns
fei
function fei() view returns(address)
address of the Fei contract referenced by Core
Returns
| Param |
Type |
Notes |
|
address |
IFei implementation address |
feiBalance
function feiBalance() view returns(uint256)
fei balance of contract
Returns
| Param |
Type |
Notes |
|
uint256 |
fei amount held |
incentiveAmount
function incentiveAmount() view returns(uint256)
FEI incentive for calling keeper functions
Returns
isContractAdmin
function isContractAdmin(address) view returns(bool)
returns whether a given address has the admin role for this contract
Params
| Param |
Type |
Notes |
| _admin |
address |
|
Returns
isTimeEnded
function isTimeEnded() view returns(bool)
return true if time period has ended
Returns
isTimeStarted
function isTimeStarted() view returns(bool)
Returns
lastBufferUsedTime
function lastBufferUsedTime() view returns(uint256)
the last time the buffer was used by the contract
Returns
pause
function pause() nonpayable
set pausable methods to paused
paused
function paused() view returns(bool)
Returns true if the contract is paused, and false otherwise.
Returns
rateLimitPerSecond
function rateLimitPerSecond() view returns(uint256)
the rate per second for this contract
Returns
remainingTime
function remainingTime() view returns(uint256)
number of seconds remaining until time is up
Returns
| Param |
Type |
Notes |
|
uint256 |
remaining |
setBufferCap
function setBufferCap(uint256) nonpayable
set the buffer cap
Params
| Param |
Type |
Notes |
| newBufferCap |
uint256 |
|
setContractAdminRole
function setContractAdminRole(bytes32) nonpayable
sets a new admin role for this contract
Params
| Param |
Type |
Notes |
| newContractAdminRole |
bytes32 |
|
setCore
function setCore(address) nonpayable
set new Core reference address
Params
| Param |
Type |
Notes |
| newCore |
address |
the new core address |
setDripAmount
function setDripAmount(uint256) nonpayable
set the new drip amount
Params
| Param |
Type |
Notes |
| newDripAmount |
uint256 |
|
setIncentiveAmount
function setIncentiveAmount(uint256) nonpayable
set the incentiveAmount
Params
| Param |
Type |
Notes |
| newIncentiveAmount |
uint256 |
|
setRateLimitPerSecond
function setRateLimitPerSecond(uint256) nonpayable
set the rate limit per second
Params
| Param |
Type |
Notes |
| newRateLimitPerSecond |
uint256 |
|
setSource
function setSource(address) nonpayable
set the new PCV Deposit source
Params
| Param |
Type |
Notes |
| newSource |
address |
|
setTarget
function setTarget(address) nonpayable
set the new PCV Deposit target
Params
| Param |
Type |
Notes |
| newTarget |
address |
|
source
function source() view returns(address)
source PCV deposit to withdraw from
Returns
startTime
function startTime() view returns(uint256)
the start timestamp of the timed period
Returns
target
function target() view returns(address)
target address to drip to
Returns
timeSinceStart
function timeSinceStart() view returns(uint256)
number of seconds since contract was initialized
will be less than or equal to duration
Returns
| Param |
Type |
Notes |
|
uint256 |
timestamp |
tribe
function tribe() view returns(address)
address of the Tribe contract referenced by Core
Returns
| Param |
Type |
Notes |
|
address |
IERC20 implementation address |
tribeBalance
function tribeBalance() view returns(uint256)
tribe balance of contract
Returns
| Param |
Type |
Notes |
|
uint256 |
tribe amount held |
unpause
function unpause() nonpayable
set pausable methods to unpaused
⬅️ Contracts