# set\_fees

An entrypoint that setups interface fee, swap fee, and auction fee that applies in time of each [***swap***](/smart-contracts/dex-2.0/dexcore-contract/entrypoints-overview/dex-entrypoints/swap.md) or [***flash\_swap***](/smart-contracts/dex-2.0/dexcore-contract/entrypoints-overview/dex-entrypoints/swap.md)**.** Also it setups a reward for withdrawing auction fee that applies in time of calling [***withdraw\_auction\_fee***](/smart-contracts/dex-2.0/dexcore-contract/entrypoints-overview/dex-entrypoints/withdraw_auction_fee.md) entrypoint by any user.

### Call parameters

```pascaligo
type fees_t             is [@layout:comb] record [
  interface_fee           : nat;
  swap_fee                : nat;
  auction_fee             : nat;
  withdraw_fee_reward     : nat;
]
```

<table><thead><tr><th width="229">Field</th><th width="150">Type</th><th width="199.77716643741405">Hint</th><th>Description</th></tr></thead><tbody><tr><td>interface_fee</td><td>nat</td><td>Float value multiplied by 1e+18</td><td>Fee that goes to referrers or UI/UX providers</td></tr><tr><td>swap_fee</td><td>nat</td><td>Float value multiplied by 1e+18</td><td>Fee that goes to the liquidity pool (for liquidity providers)</td></tr><tr><td>auction_fee</td><td>nat</td><td>Float value multiplied by 1e+18</td><td>Fee that goes to the <a href="/pages/Tfsg5Ntqa1tvgeBH1v4L">Auction</a> contract</td></tr><tr><td>withdraw_fee_reward</td><td>nat</td><td>Float value multiplied by 1e+18</td><td>The % of the rewards that will be transferred to the transaction sender when he calls <a href="/pages/CpczzXJsvvqiH9Mwcgou"><em><strong>withdraw_auction_fee</strong></em></a> entrypoint</td></tr></tbody></table>

### Usage

{% tabs %}
{% tab title="🌮 Taquito" %}

```javascript
const interfaceFee = 0.05 * 10 ** 18; // 0.05%
const swapFee = 0.05 * 10 ** 18; // 0.05%
const auctionFee = 0.4 * 10 ** 18; // 0.4%
const withdrawFeeReward = 3 * 10 ** 18; // 3%
const dexCoreAddress = "KT1...";
const fees = {
    interface_fee: interfaceFee,
    swap_fee: swapFee,
    auction_fee: auctionFee,
    withdraw_fee_reward: withdrawFeeReward,
};
const dexCore = await tezos.contract.at(dexCoreAddress);
const operation = await dexCore.methodsObject.set_fees(fees).send();

await operation.confirmation();
```

{% endtab %}
{% endtabs %}

### Errors

* `400` - `sender` of the transaction is not current administrator.
* `412` - non payable entrypoint (can't accept TEZ tokens during call of an entrypoint).


---

# 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.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract/entrypoints-overview/admin-entrypoints/set_fees.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.
