# Tutorial 5: Fee-On-Transfer Tokens

{% hint style="info" %}
[**Book an audit with Zokyo**](https://www.zokyo.io/)
{% endhint %}

{% hint style="info" %}
**Fee-On-Transfer Tokens:** An Auditor's Guide. This in-depth tutorial is designed to provide blockchain auditors, developers, and enthusiasts with the necessary knowledge and skills to identify and mitigate vulnerabilities associated with fee-on-transfer tokens in smart contracts. By leveraging real-world examples and proven mitigation strategies, this tutorial serves as an all-encompassing resource for understanding, identifying, and dealing with these significant security concerns.
{% endhint %}

Fee-on-transfer tokens, also known as deflationary tokens, have gained popularity in the decentralized finance (DeFi) landscape. These tokens impose a fee on each transfer, effectively reducing the transaction amount that recipients receive. Although this mechanism can offer benefits such as incentivizing holding or disincentivizing selling, it introduces unique security challenges that can potentially be exploited if not correctly addressed.

Several issues can arise when using fee-on-transfer tokens in smart contracts. A common issue occurs when a contract assumes that the token transfer's amount is the same as the initial specified amount, ignoring the fee taken upon transfer. This faulty assumption can cause functions to revert unexpectedly, making parts of the protocol unavailable, or can lead to discrepancies between actual and expected balances, causing loss of funds.

Moreover, some fee-on-transfer tokens subtract the fee from the sender's remaining balance rather than the transfer amount, causing unexpected behavior if not accounted for in the contract. It's crucial to consider these nuances when implementing support for such tokens, as neglecting to do so can result in severe vulnerabilities.

fee-on-transfer related issues can often be overlooked in audits, underscoring the importance of an in-depth examination of this topic. This tutorial aims to delve into the intricacies of fee-on-transfer tokens, understand their effects on smart contract function execution, and propose potential mitigation techniques. By improving our collective understanding of these issues, we can strengthen our auditing practices, bolster the security framework of smart contract platforms, and reduce the chances of overlooking such vulnerabilities.


---

# 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://zokyo-auditing-tutorials.gitbook.io/zokyo-tutorials/tutorial-5-fee-on-transfer-tokens.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.
