Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

HarvestBaseCollectorV1_2

Git Source

Inherits: HarvestBaseCollector

Auction contract for iBGT to WBERA conversion for base fees to compound to iBERA holders

Simplified version of BribeCollector. This contract allows keepers to claim iBGT fees by paying a fixed WBERA amount, which is converted to native BERA and sent to the fee receiver for compounding.

Upgrade to have same interface as Bribe Collector, specifically adding payoutToken and claimFees

Note: oz-upgrades-from: src/staking/HarvestBaseCollector.sol:HarvestBaseCollector

State Variables

payoutToken

Payout token, required to be WBERA token as its unwrapped and used to compound rewards in the iBera system.

address constant payoutToken = 0x6969696969696969696969696969696969696969;

Functions

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

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

Events

FeesClaimed

Emitted when the fees are claimed

event FeesClaimed(
    address indexed caller,
    address indexed recipient,
    address indexed feeToken,
    uint256 amount
);

Parameters

NameTypeDescription
calleraddressCaller of the claimFees function
recipientaddressThe address to which collected POL bribes will be transferred
feeTokenaddressThe address of the fee token to collect
amountuint256The amount of fee token to transfer