InfraredBERAFeeReceivor

Git Source

Inherits: Upgradeable, IInfraredBERAFeeReceivor

Receivor for fees from InfraredBERA from tips and share of the proof-of-liquidity incentive system.

Validators need to set this address as their coinbase(fee_recepient on most clients).

State Variables

InfraredBERA

The address of the InfraredBERA.sol contract.

address public InfraredBERA;

infrared

The Infrared.sol contract address.

IInfrared public infrared;

shareholderFees

Accumulated protocol fees in contract to be claimed.

uint256 public shareholderFees;

__gap

Reserve storage slots for future upgrades for safety

uint256[40] private __gap;

Functions

initialize

Initializer function (replaces constructor)

function initialize(
    address _gov,
    address _keeper,
    address ibera,
    address _infrared
) external initializer;

Parameters

NameTypeDescription
_govaddressAddress for admin / gov to upgrade
_keeperaddressAddress for keeper
iberaaddressAddress for InfraredBERA
_infraredaddressAddress for Infrared

distribution

Amount of BERA swept to InfraredBERA and fees taken for protool on next call to sweep

function distribution() public view returns (uint256 amount, uint256 fees);

Returns

NameTypeDescription
amountuint256THe amount of BERA forwarded to InfraredBERA on next sweep.
feesuint256The protocol fees taken on next sweep.

sweep

Sweeps accumulated coinbase priority fees + MEV to InfraredBERA to autocompound principal

function sweep() external returns (uint256 amount, uint256 fees);

Returns

NameTypeDescription
amountuint256The amount of BERA forwarded to InfraredBERA.
feesuint256The total fees taken.

collect

Collects accumulated shareholder fees

Reverts if msg.sender is not InfraredBera.sol contract

function collect() external returns (uint256 sharesMinted);

Returns

NameTypeDescription
sharesMinteduint256The amount of iBERA shares minted and sent to the Infrared.sol

receive

Fallback function to receive BERA

receive() external payable;