> For the complete documentation index, see [llms.txt](https://docs.mav.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-reward-contracts/rewardbase/rewardaccounting.md).

# RewardAccounting

**Inherits:** [IRewardAccounting](/technical-reference/maverick-v2/v2-contracts/maverick-v2-reward-contracts/rewardbase/irewardaccounting.md)

Provides ERC20-like functions for minting, burning, balance tracking and total supply. Tracking is based on a tokenId user index instead of an address.

### State Variables <a href="#state-variables" id="state-variables"></a>

#### \_stakeBalances <a href="#stakebalances" id="stakebalances"></a>

```solidity
mapping(uint256 account => uint256) private _stakeBalances;
```

#### \_stakeTotalSupply <a href="#staketotalsupply" id="staketotalsupply"></a>

```solidity
uint256 private _stakeTotalSupply;
```

### Functions <a href="#functions" id="functions"></a>

#### stakeBalanceOf <a href="#stakebalanceof" id="stakebalanceof"></a>

Balance of stake for a given `tokenId` account.

```solidity
function stakeBalanceOf(uint256 tokenId) public view returns (uint256 balance);
```

#### stakeTotalSupply <a href="#staketotalsupply" id="staketotalsupply"></a>

Sum of all balances across all tokenIds.

```solidity
function stakeTotalSupply() public view returns (uint256 supply);
```

#### \_mintStake <a href="#mintstake" id="mintstake"></a>

Mint to staking account for a tokenId account.

```solidity
function _mintStake(uint256 tokenId, uint256 value) internal;
```

#### \_burnStake <a href="#burnstake" id="burnstake"></a>

Burn from staking account for a tokenId account.

```solidity
function _burnStake(uint256 tokenId, uint256 value) internal;
```

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-reward-contracts/rewardbase/rewardaccounting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
