BribeCollectorV1_4
Inherits: InfraredUpgradeable, IBribeCollectorV1_4
The Bribe Collector contract is responsible for collecting bribes from Berachain rewards vaults and auctioning them for a Payout token which then is distributed among Infrared validators.
This contract is forked from Berachain POL which is forked from Uniswap V3 Factory Owner contract. https://github.com/uniswapfoundation/UniStaker/blob/main/src/V3FactoryOwner.sol
v1.4 adds a payout token setter and initializes payout token as iBGT
State Variables
payoutToken
Payout token, required to be WBERA token as its unwrapped and used to compound rewards in the iBera
system.
address public payoutToken;
payoutAmount
Payout amount is a constant value that is paid by the caller of the claimFees
function.
uint256 public payoutAmount;
__gap
uint256[40] private __gap;
Functions
setPayoutAmount
Set the payout amount for the bribe collector.
function setPayoutAmount(uint256 _newPayoutAmount) external onlyGovernor;
Parameters
Name | Type | Description |
---|---|---|
_newPayoutAmount | uint256 | updated payout amount |
setPayoutToken
Set the payout token for the bribe collector.
function setPayoutToken(address _newPayoutToken) external onlyGovernor;
Parameters
Name | Type | Description |
---|---|---|
_newPayoutToken | address | updated payout token |
claimFees
Claims accumulated bribes in exchange for payout token
Only callable by accounts with the KEEPER_ROLE for security to prevent potential economic losses from unpredictable external validator incentives
function claimFees(
address _recipient,
address[] calldata _feeTokens,
uint256[] calldata _feeAmounts
) external onlyKeeper;
Parameters
Name | Type | Description |
---|---|---|
_recipient | address | The Address to receive claimed tokens |
_feeTokens | address[] | Array of token addresses to claim |
_feeAmounts | uint256[] | Array of amounts to claim for each fee token |
sweepPayoutToken
function sweepPayoutToken() external;