BribeCollector

Git Source

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

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 out the caller of the claimFees function.

uint256 public payoutAmount;

__gap

uint256[40] private __gap;

Functions

initialize

function initialize(
    address _infrared,
    address _gov,
    address _payoutToken,
    uint256 _payoutAmount
) external initializer;

setPayoutAmount

Set the payout token for the bribe collector.

Only callable by the governor and should be set to WBERA token since iBERA requires BERA to compound rewards.

function setPayoutAmount(uint256 _newPayoutAmount) external onlyGovernor;

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

NameTypeDescription
_recipientaddressThe Address to receive claimed tokens
_feeTokensaddress[]Array of token addresses to claim
_feeAmountsuint256[]Array of amounts to claim for each fee token