> For the complete documentation index, see [llms.txt](https://docs.anyone.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anyone.io/sdk/api/tracking.md).

# Tracking the Protocol

### Tracking Staked Balance

The total tokens staked by a wallet can be called from a single read function of the protocol EVM contract on Ethereum Mainnet. It's contract address is as below and the source code can be found [here](https://github.com/anyone-protocol/hodler/blob/main/contracts/HodlerV5.sol).&#x20;

{% code title="Ethereum Mainnet Hodler Contract Address" %}

```
0x0d9a1ca7bc756ae009672db626cde3c9bef583ef
```

{% endcode %}

Note that the staked tokens do not include tokens that have been unstaked and are under the cooldown period before they can be withdrawn.&#x20;

The value can be fetched by calling the `getStake` function which returns a uint256 value. Note that $ANYONE has 18 decimals.&#x20;

{% code title="Function to Query Total Staked" %}

```
getStake(address _address); 
```

{% endcode %}

{% code title="ABI Reference for Total Staked function in Hodler" %}

```json
[
	{
			"inputs": [
				{
					"internalType": "address",
					"name": "_address",
					"type": "address"
				}
			],
			"name": "getStake",
			"outputs": [
				{
					"internalType": "uint256",
					"name": "",
					"type": "uint256"
				}
			],
			"stateMutability": "view",
			"type": "function"
		}
]
```

{% endcode %}

See an example code snippet for fetching this values with ethers.js:

```javascript
const provider;
const abi;
// Set provider URL and an abi JSON 

let address = 0xabc123; // Set target address 
const protocolAddress = '0x0d9a1ca7bc756ae009672db626cde3c9bef583ef';
const protocolContract = new ethers.Contract(protocolAddress, abi, provider);

let totalStaked = await protocolContract.getStake(<address>); 
```

*Last Updated: 29-Dec-2025*


---

# 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.anyone.io/sdk/api/tracking.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.
