> For the complete documentation index, see [llms.txt](https://docs-v4.nftx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v4.nftx.io/contracts/tax-calculator.md).

# Tax Calculator

`TaxCalculator` determines the tax a seller pays to create a listing. The tax is quoted and paid in the collection's ERC-20, prepaid at listing creation, and pro-rata refundable if the listing is later modified or cancelled. It's the mechanism that makes the [self-assessed listing model](/contracts/listings.md) work: overpricing an item is allowed, but the higher the price and the longer the duration, the more tax you pay.

Signatures and descriptions below come from the `ITaxCalculator` interface.

### `calculateTax`

Calculates the tax required to create a listing from its floor multiple and duration. The function is `pure` and deterministic.

```solidity
function calculateTax(address _collection, uint _floorMultiple, uint _duration) external view returns (uint taxRequired_);
```

| Parameter        | Type      | Description                                                        |
| ---------------- | --------- | ------------------------------------------------------------------ |
| `_collection`    | `address` | The collection address of the listing                              |
| `_floorMultiple` | `uint`    | The floor multiple, to two decimals (`150` = 1.50x, `200` = 2.00x) |
| `_duration`      | `uint`    | The duration of the listing, in seconds                            |

| Return         | Type   | Description                            |
| -------------- | ------ | -------------------------------------- |
| `taxRequired_` | `uint` | The collection tokens required to list |

## The fee curve

Tax scales with the **square of the floor multiple** and **linearly with duration**, normalised to a 7-day reference. Above a kink at floor multiple `200` (2.00x), the curve softens — halving the effective slope — to encourage high-value "grail" listings rather than penalise them.

For `floorMultiple ≤ 200`:

$$
\text{tax} = \text{floorMultiple}^2 \times 10^{12} \times \frac{\text{duration}}{7\ \text{days}}
$$

For `floorMultiple > 200` (the softened branch):

$$
\text{tax} = (\text{floorMultiple} + 200)^2 \times 10^{12} \times \frac{\text{duration}}{4 \times 7\ \text{days}}
$$

Both branches meet exactly at the `FLOOR_MULTIPLE_KINK` of `200`, so the curve is continuous there.

{% hint style="info" %}
`FLOOR_MULTIPLE_KINK = 200` (i.e. 2.00x). Below it, tax grows with the square of the multiple; above it, the softened branch keeps grail listings affordable.
{% endhint %}

## Worked examples

For a **7-day** listing, the tax works out to (in FLOOR / collection-token units, where `1` = one whole token):

| Floor multiple | Tax (7-day listing) |
| -------------- | ------------------- |
| 1.50x          | 0.0225 FLOOR        |
| 2.00x (kink)   | 0.04 FLOOR          |
| 3.00x          | 0.0625 FLOOR        |
| 4.00x          | 0.09 FLOOR          |
| 10.00x         | 0.36 FLOOR          |

Because tax is linear in duration, halving the duration halves the tax, and doubling it doubles the tax. Setting a price far above fair value is possible, but the fee climbs steeply — so a mispriced item simply won't sell, and the prepaid tax bleeds down until the listing closes.
