> For the complete documentation index, see [llms.txt](https://gum-ball.gitbook.io/gumball-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gum-ball.gitbook.io/gumball-protocol/protocol-flow.md).

# Protocol Flow

The general flow of GumBall Protocol is as follows:

1. Creator deploys gNFT collection on GumBall. This deploys gNFTs (erc721) and Collection Keys (erc20) in + 1:1 amount.&#x20;
2. User’s purchase gNFT or Collection Keys with base asset ($WETH, for example) from the ERC20 Bonding Curve

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Collection Keys are ERC20 tokens. Each collection has it's own specific collection Keys. <br></p><p>gNFT is an ERC721 NFT. Each collection has it's own gNFTs. </p></div>
3. $WETH from sale remains in ERC20 Bonding Curve for that collection
4. User may swap between gNFTs and Collection Keys using the GumBall Machine
5. Both NFTs and collection tokens can be staked, borrowed against, etc in the GumBar Contract
6. As more gNFTs / collection tokens are bought from a bonding curve, price increases
7. As gNFTs or collection tokens are sold back to a collection’s bonding curve, price decreases
8. Users may sell their gNFT or keys for bonding curve price instantly at any time (minus fees).

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


---

# 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://gum-ball.gitbook.io/gumball-protocol/protocol-flow.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.
