Fee Token Architecture

Taha Abbasi
FerrumNetwork
Published in
3 min readApr 12, 2024

Fee Token Architecture — Original Publication by Taha Abbasi

Description

Develop a token with an integrated tax feature. This feature will collect tax in the destination-swapped token instead of the native token. This strategy is intended to mitigate distortion and selling pressure on the token while generating revenue.

A major benefit of this architecture is that it will allow projects to use UniSwap V2 and UniSwap V3 Liquidity Provisioning based on their needs. The Fee Token structures currently available are not compatible with UniSwap V3.

We have previously developed a Crucible Contract that handles the token router functionality and custom fee logic; we have the Fiber Router that handles the DEX router logic. A combination of these two will result in Iron Tax contract listed below.

Diagram

Fee Token Architecture by Taha Abbasi

Explanation:

  • Token to TokenRouter: The entry point where all transfers start.
  • Wallet to Wallet vs. Trade Transfers: Branching logic based on whether the transfer is a regular wallet-to-wallet transfer or a trade via a DexRouter.
  • Fee Logic for Regular Transfer:
    - Tax in Native Token: Shows the tax being taken in the native token and sent to the Fee Collector.
    - Transfer Remaining Tokens: The remaining balance post-fee is sent to the destination address.
  • Trade Transfer Logic:
    - Identify as DexRouter Transfer: This step represents the token router identifying the transfer as a trade.
    - Send Tokens to DexRouter and Back: Illustrates the flow of tokens to the DexRouter, into the Dex Pool, and back to the Token Router.
    - Tax in Destination Token and Post Fee Destination Token: Similar to the regular transfer, but with the tax assessed in the destination token. It then splits into the fee being sent to the Fee Collection Address and the remaining destination tokens being sent to the swap address.

Credit to the Equonox Team, for inpiring the design need for collecting the token tax/fees in destination token for sell orders.

Multichain Token Standard

We will need to incorporate this with the Multichain token standard.

  • Create master and client contract with tax logic
  • Incorporate additional functionality such as pausable, mintable, burnable etc
  • dexPool are configurable
  • Fee addresses are configurable
    - In addition to dexPool addresses where fee is assessed, other addresses can be set where fees are removed or overwritten, for example no fee to stake, or no fee when using the token to pay platform fees etc.

About Ferrum Network

Ferrum is Pioneering Interoperability 2.0 — a new era of interconnected blockchains. Powered by a multichain messaging engine known as Quantum Portal, Ferrum Network’s mainnet will bring value, data, and functional interoperability to every chain in the industry.

Utilize Ferrum Network to build and deploy solutions on one network and instantly enable multichain functionality without the burden or technical debt that comes with managing a multichain infrastructure.

Ferrum Network Important Links

Website | Telegram | Twitter | YouTube | Discord

--

--