CORE DEFI PRIMITIVES AND MECHANICS

From Tokens to NFTs Core DeFi Primitives Explained

9 min read
#DeFi #Blockchain #Crypto #NFTs #Primitives
From Tokens to NFTs Core DeFi Primitives Explained

Tokens have become the lifeblood of decentralized finance, while non‑fungible tokens (NFTs) are pushing the boundaries of ownership and value representation.
In this article we walk through the core primitives that tie tokens and NFTs together, the standard interfaces that give them meaning, and the mechanics that let them interact in the wider DeFi ecosystem.


Tokens in DeFi: From Currency to Collateral

Tokens are the basic building blocks of any blockchain application. In Ethereum, they fall into several categories:

  • Fungible tokens – each unit is identical and interchangeable (the classic example is a cryptocurrency).
  • Non‑fungible tokens – each unit carries unique data and is distinct from all others.
  • Semi‑fungible tokens – a hybrid that allows a token to be partially fungible and partially unique (ERC1155).

ERC20 – The Standard Currency

ERC20 remains the de facto standard for fungible tokens, a core element highlighted in Building Blocks of DeFi Mechanics Token Standards and NFT Integration. Its interface defines a handful of functions:

Function Purpose
totalSupply How many tokens exist
balanceOf How many tokens a particular address holds
transfer Send tokens from one address to another
approve Authorise a third party to spend tokens
allowance Check remaining authorisation

The simplicity of ERC20 enables any wallet or smart contract to understand and interact with any ERC20 token. Its ubiquity makes it a perfect fit for trading pairs, staking rewards, and stablecoin reserves.

Beyond ERC20 – Tokens With Added Power

  • ERC777 adds hooks that allow contracts to react to token transfers.
  • ERC1400 introduces compliance features (e.g., holding periods, identity checks).
  • ERC223 mitigates accidental loss of tokens by making transfers to contracts require explicit acknowledgement.

These variants show how the community can extend a base token with specialized functionality without breaking compatibility.

Token Utility in DeFi

Tokens serve multiple roles in decentralized finance:

  1. Currency – The most obvious use; tokens are swapped on exchanges like Uniswap or Sushiswap.
  2. Governance – Token holders vote on protocol upgrades, parameter changes, or new product launches. Examples include Aave’s AAVE token or Compound’s COMP.
  3. Collateral – Users lock tokens into lending protocols to borrow other assets. The over‑collateralisation ratio protects lenders from borrower default.
  4. Staking – Validators lock tokens in proof‑of‑stake chains or yield‑farming contracts to secure the network and earn rewards.
  5. Insurance – Tokens back insurance products; holders pay premiums and receive payouts if a loss event occurs.

These utilities transform a token from a mere unit of value into a tool that powers entire ecosystems.


NFTs – The Building Blocks of Digital Ownership

While fungible tokens give us money, non‑fungible tokens give us property. NFTs enable the representation of unique digital items, ranging from artwork and collectibles to virtual real estate and intellectual property.

ERC721 – The Original NFT Standard

ERC721 defines a minimal interface, a concept explained in depth in Demystifying DeFi Foundations Token Standards Utility NFTs. The tokenURI typically points to a JSON file describing the asset: name, description, image URL, attributes, and any royalty terms. This design decouples the token logic from the data that represents it.

ERC1155 – Semi‑Fungible Flexibility

ERC1155 allows a single contract to host many different token types, a feature discussed in Tokenomics and NFT Standards the Backbone of Modern DeFi. A single transaction can move multiple types of tokens, reducing gas usage dramatically. This is why many game developers choose ERC1155 for in‑game items, where dozens of item types exist in the same contract.

ERC998 – Composable NFTs

ERC998 introduces composability, enabling an NFT to own other NFTs. This is a key feature for DeFi, where a single asset may be bundled with other rights or collateral. For instance, a “capped yield NFT” could contain a vault that holds collateral and a yield‑sharing token.


Linking Tokens and NFTs in DeFi

The power of DeFi grows when tokens and NFTs can interoperate. This section explores mechanisms and use‑cases that bridge the two worlds.

Wrapping Tokens Into NFTs

Wrapping turns a fungible token into an NFT that represents a specific amount of the underlying asset. This is useful for:

  • Fractional ownership – The wrapped NFT encodes ownership of a share of a high‑value asset, such as a piece of art or a tokenized real estate unit.
  • Collateral – Wrapped NFTs can be used as collateral in NFT‑based lending markets.
  • Voting rights – A wrapped NFT can grant governance rights that are tied to the amount of token it represents.

The most common wrapper is the ERC1155 contract that maps a token ID to a specific amount of an ERC20 asset.

NFTs as Collateral in Lending Protocols

Protocols like NFTfi or Rarible’s NFT Lending allow users to borrow against the value of their NFT. The borrower locks the NFT into a smart contract, receives a loan in a stablecoin, and can redeem the NFT upon repayment. The protocol estimates the NFT’s value via an oracle or a pool of recent sales.

Liquidity Pools for NFTs

Traditional liquidity pools rely on fungible tokens. To provide liquidity for NFTs, protocols such as NFTX or 0xRarity create liquidity tokens that represent a share of a basket of NFTs. Traders can swap the liquidity token for any constituent NFT, effectively allowing market making on the NFT side.

Synthetic Assets and NFTs

Synthetic platforms like Synthetix can issue synthetic tokens that track the value of real‑world assets. By tokenising an NFT that represents a real‑world asset (e.g., a tokenized share of a company), the protocol can create a synthetic derivative that is tradable on a decentralized exchange.

Governance and NFTs

Some projects use NFTs to grant unique governance privileges. A “super‑member” NFT might allow its holder to vote on a subset of proposals, whereas a standard token holder can vote on all. This introduces a tiered governance structure that blends scarcity with influence.


Standardization and Interoperability

Without shared standards, the DeFi ecosystem would become fragmented. The Ethereum community has created a suite of standards that promote interoperability.

  • ERC20 / ERC721 / ERC1155 – The foundation for tokenization.
  • ERC4626 – Defines a standard for tokenized vaults, building on the principles from Building Blocks of DeFi Mechanics Token Standards and NFT Integration. This allows vaults to issue share tokens that represent a claim on the underlying asset pool.
  • ERC2981 – Royalty standard for NFTs, ensuring creators receive a percentage from secondary sales.
  • ERC165 – Interface detection, allowing contracts to query whether another contract implements a given standard.

These standards are often used together: for example, a vault (ERC4626) might hold wrapped ERC20 tokens, which themselves could be wrapped into ERC1155 NFTs. The result is a complex yet fully interoperable system.


Real‑World Examples of Token–NFT Interactions

Project What it does How tokens & NFTs interact
Uniswap AMM for ERC20 tokens Allows users to swap ERC20 tokens that represent fractional ownership of NFT baskets (e.g., NFTX).
Aave Lending & borrowing Aave’s aToken represents the supply of a borrowed asset; users can mint a wrapped NFT that tracks the aToken balance.
Yearn Vaults Yield aggregation Vaults issue ERC4626 tokens; users can mint ERC1155 NFTs that represent a share of the vault.
Rarible NFT marketplace Rarible’s protocol includes an NFT‑based royalties system (ERC2981) and liquidity pools (NFTX style).
NFTfi NFT lending Users lock an ERC721 NFT as collateral; the platform issues a stablecoin loan to the borrower.
Mintable Create your own NFTs The platform issues ERC1155 tokens that can be sold, traded, or wrapped into other DeFi instruments.

These projects illustrate how tokens and NFTs can co‑exist in a single protocol, each providing a distinct form of value or governance.


Risks and Challenges

While token–NFT interactions open new opportunities, they also introduce complexity and risk.

  1. Oracle Dependence – NFT valuations are highly volatile and often rely on on‑chain oracles. Bad data can lead to under‑collateralisation.
  2. Smart Contract Bugs – The more layers of wrapping and composability, the larger the attack surface.
  3. Regulatory Uncertainty – Tokens and NFTs that function as securities or derivatives may fall under jurisdictional scrutiny.
  4. Gas Costs – Complex interactions (e.g., nested ERC1155 transfers) can be expensive on congested networks.
  5. Liquidity Fragmentation – While liquidity pools exist for NFTs, they are still niche compared to ERC20 liquidity.

A careful audit and a solid risk‑management strategy are essential for any DeFi protocol that incorporates NFTs.


Future Outlook: Tokens, NFTs, and the Next Generation of DeFi

The boundaries between fungible and non‑fungible tokens are blurring. New standards and protocols are emerging that blend their features:

  • Composable DeFi – Protocols that let you combine governance, collateral, and yield in a single contract, using a mix of ERC20, ERC1155, and ERC721.
  • Layer‑2 Scalability – Optimistic and zk‑Rollups are reducing gas costs, making complex NFT interactions more practical.
  • Cross‑Chain Bridges – Projects like Wormhole and Polkadot’s Substrate are enabling NFTs to move between chains, unlocking new liquidity pools and markets.
  • Token‑to‑NFT Swaps – Platforms are experimenting with instant swaps between fungible and non‑fungible assets, using automated market makers that support mixed assets.

As DeFi matures, we can expect more fluid asset classes, where a single token can embody a piece of art, a yield‑sharing share, and a governance right—all in one. The core primitives—token standards, NFT standards, and DeFi mechanisms—will remain the scaffolding that supports this evolving landscape.



In conclusion, tokens and NFTs together form the backbone of modern decentralized finance. By understanding the core primitives—ERC20, ERC721, ERC1155, ERC4626, and beyond—and how they interact, developers and users can build more robust, interoperable, and innovative financial products. The synergy between fungible and non‑fungible assets promises a richer, more inclusive financial future that extends beyond traditional money to encompass all forms of digital ownership and value.

Emma Varela
Written by

Emma Varela

Emma is a financial engineer and blockchain researcher specializing in decentralized market models. With years of experience in DeFi protocol design, she writes about token economics, governance systems, and the evolving dynamics of on-chain liquidity.

Contents