# CarbonVortex Functions

Carbon DeFi generates protocol fees on each chain its deployed in two primary ways: on the taker side through orders being taken by traders on the Carbon DeFi protocol, and through arbitrage transactions powered by Bancor’s integrated Arb Fast Lane.

Taker fees from user trades are collected directly via Carbon DeFi. In parallel, the Arb Fast Lane performs chain-wide arbitrage and collects additional fees via its smart contracts. These combined fees are transferred into the Carbon Vortex contract, where they are made available for purchase through a Dutch auction pricing model.

These are popular flows that can be achieved using the Carbon Vortex:

### Trigger Execute() for caller rewards

The Carbon Vortex allows any user to check the available token balances and trigger a function to process them, with an incentive.

The caller can follow these steps to complete the process:

1. Identify the size of opportunity - call the `[read] availableTokens()` function to learn how many tokens are available to process.
2. Read the reward percentage - call the `[read] rewardsPPM()` function to learn what is the reward percentage and threshold&#x20;
3. Execute the transaction - call the `[write] execute()` function to receive caller rewards

### Trigger Trade() to interact with an active dutch auction

The Carbon Vortex offers tokens up for sale in a gradually descending price discovery flow known as Dutch auction. Any caller can identify and take opportunities when they occur.&#x20;

1. Identify the available amount of tokens for sale by calling the `[read]amountAvailableForTrading` function
2. Identify the current price by calling any of the following functions `[read] expectedTradeInput, expectedTradeReturn, tokenPrice`
3. Execute the trade by calling the `trade` function

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td>Write Functions</td><td></td><td><a href="/pages/mOdPqhck2uvSO8SMnEH4">/pages/mOdPqhck2uvSO8SMnEH4</a></td></tr><tr><td></td><td>Read Functions</td><td></td><td><a href="/pages/7d0gHdREcmewAXfulWOx">/pages/7d0gHdREcmewAXfulWOx</a></td></tr><tr><td></td><td>Data &#x26; Events</td><td></td><td><a href="/pages/gD5AtYIwwRtI1TBKGkfo">/pages/gD5AtYIwwRtI1TBKGkfo</a></td></tr></tbody></table>


---

# 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.carbondefi.xyz/contracts-and-functions/carbonvortex-functions.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.
