Skip to main content
Blog

Dispatchable Fungible Assets 101

The modern Aptos tech stack is built around the Fungible Asset (FA) Standard, a type-safe evolution of the legacy coin module. FA represents every Token as an object, with integrated functions for minting, burning, withdrawing, and depositing. This design gives developers a streamlined way to launch natively compatible assets across wallets and DeFi protocols, eliminating the need for extensive boilerplate code.

While vanilla FA assets primarily manage balance updates, this approach faces limitations when introducing DeFi and RWA-related complexities. Classic ERC-20–style tokens—including vanilla FA assets—only understand balance updates, but real-world scenarios demand more:

Pain PointImpact
Manual yield claimsUsers sign extra transactions; APYs are not optimized
Ad-hoc fee enginesTeams copy-paste tax logic into every dApp integration
Compliance checksOff-chain services gate transfers, breaking trustless UX
Fragmented accountingAnalytics tools scrape events instead of reading authoritative state

The more patches bolted on, the less composable the Token becomes. Cross-protocol integrations break, audit surfaces grow, and the user experience degrades.

Enter Dispatchable Fungible Assets (DFA): a more powerful FA variant.

Dispatchable Fungible Assets (DFAs)

Dispatchable Fungible Assets (DFA) upgrade FA with dynamic dispatch: issuers can attach custom Move functions that execute automatically during token transfers. The Token can stream yield, route fees, or block sanctioned addresses natively.

Key capabilities unlocked by DFA

  • Automated rewards – interest or staking rewards accrue during transfer; no claim step

  • Programmable governance – enforce vote-escrowed lockups or delegation rules at the asset layer

  • Native fee splits – siphon a fixed bps to the protocol treasury without touching the DEX

  • Regulatory-aware transfers – embed (potentially zk-enabled) KYC/AML checks directly into deposit/withdraw paths on‑chain

DFA tokens remain ABI-compatible with any code that already speaks FA. Wallets, SDKs, and on-chain protocols see the same transfer function; the dispatch logic is invisible plumbing.

How It Works

Two objects define every FA asset:

  1. A Metadata struct (name, symbol, decimals)

  2. A FungibleStore that tracks balances per address

DFA adds a third component—a dispatcher table—that maps each asset to its bespoke withdrawal/deposit handlers.

Hooks are custom Move functions that fire automatically whenever tokens leave or enter a wallet. These hooks run within the same transaction, making the underlying logic invisible to the user while executing powerful capabilities like streaming yield, fee routing, or blocking sanctioned addresses.

Here's what a simple hook looks like in Move:

public fun on_deposit(store: &mut FungibleStore, amount: u64) {
    // Custom logic executes automatically on every deposit
    farming::auto_stake(store, amount);
    loyalty::award_points(store.owner, amount / 100);
}

public fun on_withdraw(store: &mut FungibleStore, amount: u64) {
    // Validation logic can block transfers
    assert!(compliance::is_kyc_verified(store.owner), EKYO_REQUIRED);
    farming::auto_unstake(store, amount);
}

The power of this approach is that existing wallets, DEXs, and DeFi protocols continue to work without modification. DFA tokens maintain full ABI compatibility with the standard FA interface—external contracts still call the same fungible_asset::transfer() function, but now that function can trigger custom business logic behind the scenes. This means existing infrastructure (wallet integrations, DEX smart contracts, analytics dashboards) automatically support DFA tokens without requiring updates or patches.

Let's see this in action with a practical example.

KYC-Compliant Token: A Step-by-Step Walkthrough

Building on the Move code above, here's how a regulated stablecoin would implement compliance checks using DFA:

  1. Create Token → Deploy a regulated stablecoin with KYC requirements

  2. Register Hooks → Attach a check_kyc_status() function to the deposit hook

  3. Transfer → Alice tries to send 100 units of the stablecoin to Bob's wallet

  4. Hook Triggered → The deposit hook fires before the stablecoins enter Bob's account

  5. Custom Logiccheck_kyc_status(bob_address) queries an on-chain whitelist

  6. If Bob is KYC-verified, the transfer completes normally

  7. If Bob is not verified, the transaction reverts with the "KYC_REQUIRED" error

From Bob's perspective, he receives the stablecoins like any other token—the compliance check happens automatically without extra steps. From a DEX's perspective, they're still calling standard FA functions, but compliance is now enforced at the token level rather than requiring DEX-specific integration.

By default, an Aptos FA token is not dispatchable; it behaves like a simple coin. When you "turn on" dispatchability, you can attach hooks using the register_dispatch_functions API (see developer docs), where you specify a FunctionInfo for optional withdraw, deposit, or derived-balance overrides. The default behavior is used if you pass option::none(). Hooks can also be registered when the Token is created, which is often preferred since registering the latter requires access to the constructor_ref, which may not be available after initialization.

Because handlers live inside the asset's module, they inherit Move's resource safety. They can call any on-chain library, opening the door to composable financial primitives built on a single token standard. For practical examples of implementing these patterns, check out the DFA code examples on Aptos Learn.

Instead of always using the built-in transfer rules, the framework calls these hooks when DFAs are moved. This enables features like fees, taxes, automated rewards, or access controls directly in the token logic. In short, DFAs let token developers inject custom logic during fungible asset transfers, enabling use cases like adding assertions, taxes, time-based locks, automated interest distribution, and more.

Case Study: xLPTs

Thala’s xLPT is an example of a Dispatchable FA in the wild. Thala Labs created xLPT as a staked liquidity provider token on Aptos. It represents locked liquidity provider (LP) tokens derived from Thala's liquidity pools that automatically earn farming rewards based on trading volume and potential token incentives. Typically, LP tokens are limited and non‑transferrable.

Thala’s xLPTs are structured, yield-generating products that are veTHL-boosted, transferable, and composable across any Aptos DeFi protocol.

How xLPT uses DFA

The xLPT Move contract registers specific dispatch functions during token initialization:

  • onDeposit hook: Calls farming::stake whenever xLPT transfers into an account, automatically staking the underlying LPT into the farm.

  • onWithdraw hook: Calls farming::unstake whenever xLPT transfers out of an account, automatically unstaking the LPT.

This creates an experience where farming balances update automatically with every token transfer, allowing holders to earn rewards continuously without manual claims. The result is a real-world user experience upgrade: xLPT behaves like any other token—usable as collateral or for transfers—while still earning yield.

For a deeper dive into how taxation mechanics work with DFA, visit Aptos Learn for similar dispatch patterns for fee collection and provides an end-to-end tutorial.

User Benefits and Scenarios Enabled by DFA

Dispatchable FAs unlock many user-friendly features and novel DeFi use cases:

  • Automatic Fee/Toll Tokens: A token can embed a fee on each transfer (e.g. 2% to a treasury). Users trade the Token as usual, and the payment is automatically collected on‑chain.

  • Interest-bearing Tokens: Like xLPT, tokens can accrue rewards for holders. An example is a "yield coin" that increases in value automatically or sends rewards to a separate balance on each transfer.

  • Time Locks & Vesting: Implement vesting schedules, such as a token that cannot be withdrawn or transferred unless a lock has expired (enforced in the hook). This is like an automatic escrow.

  • Automated Compliance/KYC: For regulated assets, a hook could reject transfers unless certain conditions are met (e.g., both parties are whitelisted), enforcing compliance at the token level.

  • Loyalty & Rewards: Tokens associated with retail brands could grant loyalty points or discounts when used, but they are all on-chain. A retail gift card token might add points to your account whenever you spend it (the hook credits a user's loyalty balance).

  • Dynamic Supply Mechanisms: A token could burn or mint additional supply based on usage patterns. For example, a deflationary token that burns a portion on transfer or a rebasing token that adjusts supply per transaction.

These scenarios improve user experience by coding the logic directly into the Token. Users don't need to interact with separate contracts or remember to claim rewards—the behavior is automatic. For developers, DFA means combining multiple steps into one. Instead of a two-step "stake LP → wait → claim reward" process, your user can simply hold xLPT-like tokens and see their rewards accumulate.

Ready to Build with DFA?

Dispatchable Fungible Assets redefine what a token can do by embedding intelligence into its core transfer logic. Whether building yield-bearing LP tokens, regulatory-aware stablecoins, or loyalty-backed gift cards, DFA lets you collapse complexity into a single, composable standard. Instead of stitching together dApps, contracts, and user flows, DFA lets the Token do the work.

The future of DeFi on Aptos isn't just faster—it's smarter, and DFA is one standard driving that shift.

Ready to build with DFA? Start with the official developer documentation and explore hands-on code examples to see these patterns in action.

Back to All Articles

Subscribe for Updates

Get the Aptos newsletter delivered to your inbox

Periodically receive network news, helpful resources, upcoming events and other offers you might be interested in.

Aptos Foundation is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please tick below to say how you would like us to contact you:

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit below, you consent to allow Aptos Foundation to store and process the personal information submitted above to provide you the content requested.