> For the complete documentation index, see [llms.txt](https://calnix.gitbook.io/aave-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calnix.gitbook.io/aave-book/functions/supply.md).

# supply

## Overview

<img src="/files/FE3C1UNlEhXQv807HutM" alt="" class="gitbook-drawing">

* `executeSupply` contains the core logics of the supply function

## executeSupply

<figure><img src="/files/rtaX3TaHvr580VpPXtPY" alt=""><figcaption></figcaption></figure>

### Execution flow

* [ ] <mark style="color:orange;">cache</mark>
* [ ] <mark style="color:orange;">updateState</mark>
* [ ] validateSupply
* [ ] <mark style="color:orange;">updateInterestRates</mark>
* [ ] transfer & mint
* [ ] If isFirstSupply (setup `userConfig`, if first supply & asset can be used as collateral)

We will breakdown and examine the unique sections of logics within **supply**. Code delineated in orange are common functions and can be explored in that [section](/aave-book/functions/common-functions.md).

## Visual Aid

{% embed url="<https://link.excalidraw.com/readonly/4hKXoUS5ExJDQxut21rn?darkMode=true>" %}
<https://link.excalidraw.com/readonly/4hKXoUS5ExJDQxut21rn?darkMode=true>
{% endembed %}
