> For the complete documentation index, see [llms.txt](https://takepile.gitbook.io/takepile-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://takepile.gitbook.io/takepile-protocol/getting-started/get-started-with-the-takepile-protocol/using-piles-and-piletokens.md).

# Using Piles & pileTokens

Positions on the Takepile Protocol are opened with **pileTokens**, so you'll need to pick some up before you can start trading. The first set of **piles** at launch will utilize USDB, but these instructions will work with any asset available for deposit on Takepile (USDB, USDC etc.).\
\
Say you'd like to trade with up to 25x leverage. First, you'll need leveraged pileTokens. We'll run through an example with depositing wrapped FTM (wFTM).&#x20;

To get pileFTM-25, you'll deposit wFTM into the wFTM-25x Pile. You'll receive pileFTM-25 in return. A pileToken is minted upon deposit, which means the size of a pile grows as more traders add or interact with a pile.

{% hint style="info" %}
**Example:** \
The USDC Pile has 100 pileUSDC in total. You deposit 10 USDC into the pile. 10 pileUSDC is then minted and added to your wallet, and the USDC Pile has grown to a total of 110 pileUSDC.
{% endhint %}

Your newly minted pileFTM-25 can then be used to open up a position, which we'll explain further on the next page. First, we'll go into more detail about pileTokens. \
\
Along with being minted on the deposit of the pile's underlying asset, pileTokens are also minted upon a successful trade.&#x20;

{% hint style="info" %}
**Example:** \
Say that the USDC Pile has a total balance of 1000 pileUSDC, and you have a balance of 100 pileUSDC, owning 10% of the pile.\
\
You use 100 pileUSDC to short BTC. \
\
You decide to close your position with a 20% gain, bringing your total position size to 119.76012 pileUSDC, subtracting for opening and closing fees.\
\
19.76012 pileUSDC is then minted into your wallet and the total balance in the USDC pile is 1019.76012.\
\
After the trade, you would then own 11.74% of all pileUSDC rather than 10%.
{% endhint %}

The opposite would also be true in a losing trade. If a position closes with a 20% loss, 20% of the total position's collateral would be burned and reflected in the pile.&#x20;

While the conversion rate of assets may differ from time to time, what *is* true on Takepile is that if you own 10% of a pileToken's supply, you would be able to redeem 10% of a pile's underlying asset.\
\
If you were to deposit 100 USDB into the USDB pile while it has a supply of 1000 pileUSDB, bringing the total up to 1100 pileUSDB in circulation, but other traders have losing positions that bring the total number of pileUSDB in circulation down to 900, your pileUSDB would then be worth more USDB than it was originally.&#x20;

To learn more technical information regarding piles, head here:

{% content-ref url="/pages/3v8GkyJ2d8qR2VjgUBGW" %}
[Piles](/takepile-protocol/protocol/piles.md)
{% endcontent-ref %}


---

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

```
GET https://takepile.gitbook.io/takepile-protocol/getting-started/get-started-with-the-takepile-protocol/using-piles-and-piletokens.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.
