IRAuction
Inherits: InfraredUpgradeable
Title: IRAuction
Auctions portion of iBGT vault rewards to IR, then compounds in sIR
Similar to BribeCollector pattern but for sIR reward auto-compounding
Auction mechanism: Pay IR tokens to claim non-IR reward tokens
State Variables
IR_TOKEN
IR token that must be paid to claim auction rewards
ERC20 internal IR_TOKEN
SIR_VAULT
sIR vault that receives compounded IR
IStakedIR internal SIR_VAULT
payoutAmount
Amount of IR required per auction claim
uint256 public payoutAmount
__gap
uint256[40] private __gap
Functions
initialize
function initialize(
address _infrared,
address _gov,
address _keeper,
address _irToken,
address _sirVault,
uint256 _payoutAmount
) external initializer;
claimFees
Claim auction rewards by paying IR
Converts paid IR to sIR shares via compounding (increases share value)
function claimFees(
address _recipient,
address[] calldata rewardTokens,
uint256[] calldata amounts
) external virtual onlyKeeper;
Parameters
| Name | Type | Description |
|---|---|---|
_recipient | address | Address to receive rewardTokens |
rewardTokens | address[] | Array of reward token addresses to claim |
amounts | uint256[] | Array of amounts for each reward token |
sweepPayoutToken
function sweepPayoutToken() external;
setPayoutAmount
Update payout amount (governance function)
function setPayoutAmount(uint256 _newAmount) external virtual onlyGovernor;
Parameters
| Name | Type | Description |
|---|---|---|
_newAmount | uint256 | New amount of IR required per auction claim |
recoverERC20
Recover stuck tokens (governance function)
Emergency function to recover tokens sent to contract by mistake
function recoverERC20(address token, address to, uint256 amount)
external
virtual
onlyGovernor;
Parameters
| Name | Type | Description |
|---|---|---|
token | address | Token address to recover |
to | address | Recipient address |
amount | uint256 | Amount to recover |
getTokenBalance
Get balance of a specific token held by this contract
function getTokenBalance(address token)
external
view
virtual
returns (uint256);
Parameters
| Name | Type | Description |
|---|---|---|
token | address | Token address to check |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | The token balance |
payoutToken
Get payout token address
function payoutToken() external view virtual returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | payout token address |
Events
AuctionClaimed
event AuctionClaimed(
address indexed claimer,
address indexed rewardToken,
uint256 rewardAmount,
uint256 irPaid
);
PayoutAmountSet
event PayoutAmountSet(uint256 oldAmount, uint256 newAmount);
TokensRecovered
event TokensRecovered(
address indexed token, address indexed to, uint256 amount
);