> For the complete documentation index, see [llms.txt](https://docs.mezzanine.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mezzanine.xyz/protocol/treasury-and-departments/spending-funds-and-allowance.md).

# Spending Funds & Allowance

Similar to how access control in Mezzanine is hierarchical, the *spending* and *allowances* of assets are also hierarchal.   An *allowance* is the amount that another address can spend of an ERC20 on behalf of another address.  For example, if Alice gives Bob an allowance of 100 USDC, Bob can spend up to 100 of Alice's USDC on her behalf. &#x20;

ERC20 allowances are used in Mezzanine to enable departments and their *descendants* to spend funds *directly* from the Treasury.  Take the following example of Mezzanine company, *Foo*:

<figure><img src="/files/E5aOLx24I5nHI2JhSBLg" alt="" width="563"><figcaption><p>Simple Example of Allowances in Mezzanine</p></figcaption></figure>

In the above example, *Foo's* Treasury contains 1,000 USD, and its Finance Department has an allowance of 1,000 USD.  The Finance Department can spend this at its discretion.  Notably, the Treasury can also set allowances *higher* than its current balance. In the above example, the Billing Department has an allowance of  2,000 USD of *Foo*'s Treasury even though the treasury only contains 1,000 USD. When the allowance is greater than the funds available, the child can only spend up to the amount available to the ancestor.&#x20;

Setting an extremely high allowance may be useful when a department needs a highly variable amount of funds as working capital.  However, setting a high allowance should be used with caution, and the signers of the department should be trusted to use those funds wisely.

Under the Finance Department is a Sales Department, which can spend up to 500 USD at its discretion.  Spending funds transfers funds *down the organization*, decreasing the allowances of its ancestors by the amount.  Let's assume that *Foo's* Sales Department spends all 500 of its USD allowance:

<figure><img src="/files/fv3bQbLBgm4UFmlIdLkC" alt="" width="563"><figcaption><p>Simple Example of Spending in Mezzanine</p></figcaption></figure>

The Sales Department's spending of 500 USD decreases the Treasury Contract's balance by 500.  Notably, the allowances of *both* the Finance Department and Sales Department decreased by 500. All modules and departments in Mezzanine have access to this hierarchic spending. &#x20;


---

# 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.mezzanine.xyz/protocol/treasury-and-departments/spending-funds-and-allowance.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.
