BribeCollectorV1_3
Inherits: InfraredUpgradeable, IBribeCollector
Title: BribeCollector v1.3
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.3 adds a permission check to require KEEPER_ROLE for claiming fees. This is necessary because Infrared now boosts external validators and collects POL incentives from them. Since Merkle proofs for these incentives are only updated periodically, this can lead to unpredictable value inflow. If timed unfortunately, this could create a significant loss for the protocol if the value far exceeds the payout amount. The onlyKeeper modifier is a temporary security measure until a smoothing mechanism for available tokens to claim is implemented.
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 |
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;