Skip to main content

Documentation Index

Fetch the complete documentation index at: https://berachain-422fce37-fix-pol-diagrams.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Partial Reward Claims

getPartialReward lets integrators claim a selected portion of accrued Reward Vault rewards instead of claiming the entire balance in one call. Reward Vault emissions are distributed in $WBERA.

getReward vs getPartialReward

MethodAmount claimedRemaining rewardsCommon use case
getRewardFull accrued amount0Full claim
getPartialRewardCaller-selected amountNon-zeroStreaming or periodic claims
A getPartialReward call settles the requested amount in $WBERA. rewardToken() reads $WBERA.

Solidity example

pragma solidity ^0.8.26;

interface IRewardVault {
    function earned(address account) external view returns (uint256);
    function getPartialReward(address account, address recipient, uint256 amount) external;
}

contract PartialClaimManager {
    IRewardVault public immutable rewardVault;

    constructor(address vault) {
        rewardVault = IRewardVault(vault);
    }

    function claimPartial(uint256 amount, address recipient) external {
        uint256 available = rewardVault.earned(msg.sender);
        require(amount <= available, "amount exceeds rewards");
        rewardVault.getPartialReward(msg.sender, recipient, amount);
    }
}

Integration guidance

  • Read earned(account) before submitting a claim.
  • Keep claim sizes below available rewards to avoid AmountGreaterThanReward.
  • For delegated claim flows, enforce explicit operator authorization.