RewardRecipient.sol
General Overview
The RewardRecipient.sol
contract is a key component in the protocol. It handles the harvesting of rewards earned by validators, and oversees their dissolution and penalization (slashing) as required. Additionally, it is responsible for setting and updating addresses of critical protocol contracts.
Technical Overview
Inherits: AccessControlDefaultAdminRules
Author: redactedcartel.finance
State Variables
KEEPER_ROLE
GOVERNANCE_ROLE
pirexEth
oracleAdapter
Functions
onlyOracleAdapter
constructor
Parameters
Name | Type | Description |
---|---|---|
_admin | address | Admin address |
_initialDelay | uint48 | Delay required to schedule the acceptance of a access control transfer started |
setContract
Set a contract address
Parameters
Name | Type | Description |
---|---|---|
c | DataTypes.Contract | Contract |
contractAddress | address | Contract address |
dissolveValidator
Dissolve validator
Parameters
Name | Type | Description |
---|---|---|
_pubKey | bytes | Public key |
_amount | uint256 | ETH amount |
slashValidator
Slash validator
Parameters
Name | Type | Description |
---|---|---|
_pubKey | bytes | Public key |
_removeIndex | uint256 | Validator public key index |
_amount | uint256 | ETH amount released from Beacon chain |
_unordered | bool | Removed in gas efficient way or not |
_useBuffer | bool | Whether to use buffer to compensate the penalty |
_burnerAccounts | DataTypes.BurnerAccount[] | Burner accounts |
harvest
Harvest and mint staking rewards
Parameters
Name | Type | Description |
---|---|---|
_amount | uint256 | Amount of ETH to be harvested |
_endBlock | uint256 | Block until which ETH rewards are computed |
receive
Receive MEV rewards