# set\_fees

An entrypoint that setups fee for the specified farm. Also can setup fees for a group of farms in one transaction.

### Call parameters

```pascaligo
type fees_type          is [@layout:comb] record [
  harvest_fee             : nat;
  withdrawal_fee          : nat;
]

type set_fee_type       is [@layout:comb] record [
  fid                     : fid_type;
  fees                    : fees_type;
]

type set_fees_type      is list(set_fee_type)
```

#### fees\_type

<table><thead><tr><th width="171.16862900218976">Field</th><th width="150">Type</th><th width="199.77716643741405">Hint</th><th>Description</th></tr></thead><tbody><tr><td>harvest_fee</td><td>nat</td><td>Float value multiplied by 1e+16</td><td>Fee that applies in time of rewards claiming</td></tr><tr><td>withdrawal_fee</td><td>nat</td><td>Float value multiplied by 1e+16</td><td>Fee that applies in time of withdrawing (unstaking) tokens only in farms with timelock. Applies only in case of early withdrawal</td></tr></tbody></table>

#### set\_fee\_type

<table><thead><tr><th width="225.51915588834515">Field</th><th width="196.6059476580288">Type</th><th>Description</th></tr></thead><tbody><tr><td>fid</td><td>fid_type (nat)</td><td>Farm's ID</td></tr><tr><td>fees</td><td><a href="#fees_type">fees_type</a></td><td>Fees that applies to the farming</td></tr></tbody></table>

### Usage

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

```javascript
const farmId = 1;
const harvestFee = 0.05 * 10 ** 16; // 0.05%
const withdrawalFee = 0.25 * 10 ** 16; // 0.25%
const tFarmAddress = "KT1...";
const fees = [
    {
        fid: farmId,
        fees: {
            harvest_fee: harvestFee,
            withdrawal_fee: withdrawalFee,
        },
    },
    ...
];
const tFarm = await tezos.contract.at(tFarmAddress);
const operation = await tFarm.methods.set_fees(fees).send();

await operation.confirmation();
```

{% endtab %}
{% endtabs %}

### Errors

* `Not-admin` - `sender` of the transaction is not current administrator.
* `QSystem/farm-not-set` - farming with `fid` parameter doesn't exist.


---

# 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/farming/tfarm-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.
