# Fee Auction

The [Fee Auction](https://github.com/cap-labs-dev/cap-contracts/blob/main/contracts/feeAuction/FeeAuction.sol) facilitates permissionless Dutch auctions where collected protocol fees are sold to the winning bidder. The proceeds are sent to the [Fee Receiver](https://github.com/cap-labs-dev/cap-contracts/blob/main/contracts/feeReceiver/FeeReceiver.sol) to convert to cUSD and distribute to stcUSD holders. The Fee Auction module provides an efficient and transparent way to distribute accumulated fees to participants while ensuring fair price discovery through time-based price decay.

## Mechanics

### Overview of Operations

1. **Interest Harvesting**: Interest Harvester realizes accumulated interest and sends it to Fee Auction
2. **Dutch Auction**: Fee Auction sells accumulated assets via a Dutch auction mechanism
3. **Fee Distribution**: Fee Receiver collects cUSD from auction sales and distributes to stcUSD token holders

<figure><img src="/files/JYkphMO0T9MyY0OeVC4H" alt=""><figcaption><p>Flow of Funds: Fee Auction</p></figcaption></figure>

### Dutch Auction Mechanics

* Admin sets a starting price (in cUSD) and the duration of auctions.
* The price decays linearly over time (up to 90% or until minimum price is reached) until a winning bidder makes a purchase. All accumulated fees are distributed to the buyer.
* The purchase triggers the start of the next auction, where the starting price is set to be double the settled price.

### Key Auction Parameters

* **Starting Price**: Initial price set by admin for each auction (in cUSD)
* **Duration**: Auction duration set to 24 hours by default
* **Minimum Start Price**: Minimum starting price set to 100 cUSD
* **Payment Token**: cUSD is used as the payment token for all auctions
* **Recipient**: Fee Receiver contract receives all auction proceeds
* **Price Multiplier**: New auction starts at 2x the settled price of the previous auction

For function signatures, parameters, and data structures, see the [Fee Auction Contract Reference](/developers/contracts/fee-auction.md).


---

# 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.cap.app/concepts/fee-auction.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.
