# Proof of Reserves

Botanix implements a transparent and verifiable proof of reserves system that allows anyone to independently verify the total amount of Bitcoin locked in the protocol.

### How It Works

1. **Deposit Address Storage**: Each EVM wallet address on Botanix has a corresponding Bitcoin deposit address (gateway address). We store these deposit addresses by listening to mint events emitted when users make pegin claims, and then storing the associated deposit address in our database.
2. **Address Reuse**: Users can reuse the same deposit address for multiple pegins with the same wallet, but the address is only registered once during the initial pegin operation.
3. **Address Discovery**: Users can obtain the complete list of active deposit addresses (those with balance > 0) in two ways:
   * **API Method**: Query our API endpoint for immediate access to active addresses
   * **Trustless Method**: Independently derive the address list by listening to mint events from the pegin contract
4. **Balance Verification**: Using the address list, anyone can verify total locked Bitcoin by running Bitcoin Core's `scantxoutset` RPC command, which returns the sum of all UTXOs held by these addresses.

### Benefits

* **Real-time Verification**: Check reserves at any time without waiting for periodic audits
* **Trustless Auditing**: Completely independent verification possible using only on-chain data
* **Transparency**: All deposit addresses and their balances are publicly verifiable on the Bitcoin blockchain
* **No Special Tools Required**: Verification only requires a Bitcoin Core node and basic RPC knowledge

### Verification Steps

1. Extract all deposit addresses from pegin contract mint events (or use our API)
2. Run `bitcoin-cli scantxoutset start '["addr(ADDRESS1)", "addr(ADDRESS2)", ...]'`
3. Sum the returned UTXO values to get total locked Bitcoin
4. Compare against circulating supply on Botanix L2

This approach ensures that Botanix operates with full reserves while providing the cryptographic guarantees users expect from blockchain-based systems.

{% hint style="info" %}
**API Access**

If you want access to the API, contact us on [Telegram](https://t.me/+rVo_EOrFXeljN2Vk).
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.botanixlabs.com/botanix/get-to-know-botanix/security/proof-of-reserves.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
