IBribeCollector

Git Source

Inherits: IPOLErrors

Functions

payoutToken

Token used for fee payments when claiming bribes

function payoutToken() external view returns (address);

Returns

NameTypeDescription
<none>addressAddress of the payout token

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

function payoutAmount() external view returns (uint256);

setPayoutAmount

Update the payout amount to a new value. Must be called by governor

function setPayoutAmount(uint256 _newPayoutAmount) external;

Parameters

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

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

PayoutAmountSet

Emitted when the payout amount is updated by the governor

event PayoutAmountSet(
    uint256 indexed oldPayoutAmount, uint256 indexed newPayoutAmount
);

Parameters

NameTypeDescription
oldPayoutAmountuint256Previous payout amount
newPayoutAmountuint256New payout amount set

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