BribeCollectorV1_2

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 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

NameTypeDescription
_newPayoutAmountuint256updated 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

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

sweepPayoutToken

function sweepPayoutToken() external;