BribeCollector
Inherits: InfraredUpgradeable, IBribeCollector
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
State Variables
payoutToken
Token used for fee payments when claiming bribes
address public payoutToken;
payoutAmount
The amount of payout token that is required to claim POL bribes for all tokens
This works as first come first serve basis. whoever pays this much amount of the payout amount first will get the fees
uint256 public payoutAmount;
Functions
constructor
constructor(address _infrared) InfraredUpgradeable(_infrared);
initialize
function initialize(address _gov, address _payoutToken, uint256 _payoutAmount)
external
initializer;
setPayoutAmount
Update the payout amount to a new value. Must be called by governor
function setPayoutAmount(uint256 _newPayoutAmount) external onlyGovernor;
Parameters
Name | Type | Description |
---|---|---|
_newPayoutAmount | uint256 | The value that will be the new payout amount |
claimFees
Claims accumulated bribes in exchange for payout token
Caller must approve payoutAmount of payout token to this contract.
function claimFees(
address _recipient,
address[] calldata _feeTokens,
uint256[] calldata _feeAmounts
) external;
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 |