# AuRa block rewards Nethermind's plugin system abstracts consensus engine in modular components. Each consensus must implement [`IRewardCalculator`](https://github.com/NethermindEth/nethermind/blob/90640a8f62e96a84af5234b17deae9898c702dd4/src/Nethermind/Nethermind.Consensus/Rewards/IRewardCalculator.cs#L21) ```csharp public interface IRewardCalculator { BlockReward[] CalculateRewards(Block block); } ``` Where [`BlockReward`](https://github.com/NethermindEth/nethermind/blob/90640a8f62e96a84af5234b17deae9898c702dd4/src/Nethermind/Nethermind.Consensus/Rewards/BlockReward.cs#L22) ```csharp BlockReward { public Address Address public UInt256 Value public BlockRewardType RewardType } public enum BlockRewardType { Block = 0, Uncle = 1, EmptyStep = 2, External = 3 } ``` Specific implementation for AuRa consensus [`AuRaRewardCalculator.CalculateRewards`](https://github.com/NethermindEth/nethermind/blob/90640a8f62e96a84af5234b17deae9898c702dd4/src/Nethermind/Nethermind.Consensus.AuRa/Rewards/AuRaRewardCalculator.cs#L72) simplified code below. - Calls onchain BlockReward contract and gets final rewards amounts - Whatever those values are, apply to the block rewards ```csharp var (addresses, rewards) = contract.Reward(block.Header, beneficiaries, kinds); for (int index = 0; index < addresses.Length; index++) { new BlockReward(addresses[index], rewards[index], BlockRewardType.External); } ``` Jumping to [`BlockRewardAuRaBase.reward`](https://github.com/poanetwork/posdao-contracts/blob/0315e8ee854cb02d03f4c18965584a74f30796f7/contracts/base/BlockRewardAuRaBase.sol#L234) contract function, the header docs are a useful intro. ```solidity /// @dev Called by the validator's node when producing and closing a block, /// see https://openethereum.github.io/Block-Reward-Contract.html. /// This function performs all of the automatic operations needed for controlling numbers revealing by validators, /// accumulating block producing statistics, starting a new staking epoch, snapshotting staking amounts /// for the upcoming staking epoch, rewards distributing at the end of a staking epoch, and minting /// native coins needed for the `erc-to-native` bridge. /// The function has unlimited gas (according to OpenEthereum and/or Nethermind client code). function reward(address[] calldata benefactors, uint16[] calldata kind) external onlySystem returns(address[] memory receiversNative, uint256[] memory rewardsNative) { ```