The mechanics of DUST generation and decay

Avatar of the content author
Sign up now so you never miss an update
contributors
Avatar of the content author
Midnight
The Midnight protocol’s unique token-generates-resource model decouples transaction costs (DUST) from the capital asset (NIGHT). This ongoing series of blogs explaining the mechanics of DUST details the DUST cycle and explains how users manage resource generation.

The token-generates-resource model is a distinguishing feature of the Midnight network, offering functional advantages and new opportunities for developers.

The separation of capital asset (NIGHT) and operational fuel (DUST) unlocks distinct ecosystem benefits, one of which is self-funding DApps. This means developers can hold NIGHT to generate the DUST required to cover transaction costs for their users. This mechanism creates substantial opportunities to remove friction during user onboarding, as new users do not need to acquire fuel to interact with an application.

Keep an eye on this blog for an upcoming post dedicated to self-funding DApps. Anyone looking for a simple introduction to DUST can start with this introductory blog.

Ultimately, Midnight’s dual-component model changes how developers manage operational costs, making it highly useful to understand the mechanics of resource generation.

How DUST generation works

NIGHT tokens generate the DUST resource at a constant rate when associated with a DUST address by a NIGHT holder. To begin accumulating DUST, users explicitly designate a NIGHT address to a DUST address.

At the ledger level, a specific registration table maps a NIGHT address to a DUST public key. Once a user submits a registration signed with their NIGHT secret key, the ledger records this association. All existing and future NIGHT balances associated with that registered public key then generate DUST automatically in the designated wallet.

Those who hold NIGHT can update or remove this association at any time using a new signed registration from their NIGHT wallet.

The four phases of the DUST cycle

To help explain the mechanics of DUST, we can break down the four phases of the cycle.

  • Generation phase: Once a user registers a NIGHT address to a DUST address, the DUST value increases linearly over time. The accumulation rate is proportional to the amount of backing NIGHT (1 NIGHT generates up to 5 DUST). This continues until the DUST reaches its cap or the user spends the backing NIGHT.
    • Example: It takes approximately one week for 100 NIGHT to generate up to the cap of 500 DUST.
  • Constant-capacity phase: If the DUST reaches its cap before the user spends the backing NIGHT, its value remains constant. The DUST wallet holds this maximum amount for as long as the backing NIGHT remains unspent.
    • Example: Once reaching the cap, the same DUST wallet holds 500 DUST until a user spends the DUST, transfers the NIGHT, or deregisters the connection.
  • Decay phase: If a user transfers the backing NIGHT, de-registers or re-registers the generation to a different address, DUST generation immediately stops in the previous address. The DUST value then begins decreasing linearly at the same rate it previously increased. Users can spend their DUST as normal during this depletion period.
    • Example: If the user deregisters the DUST address from the NIGHT address, or if the NIGHT balance drops to zero, it takes approximately one week for a capped DUST balance to deplete to zero if the DUST is not spent on transactions.
  • Empty phase: Once decay completes, the DUST value remains at zero indefinitely. The DUST address will still exist, but it can no longer be used to execute transactions on the network.

Reassigning NIGHT for DUST generation

The explicit link between NIGHT and DUST addresses means users can assign their NIGHT to generate resources in any address, including newly created ones. De-registering an address initiates the decay phase for the current DUST balance. Connecting the NIGHT to a new wallet starts a fresh generation phase, accumulating at a predictable rate based on the assigned NIGHT balance.

NIGHT Generates DUST
NIGHT Generates DUST

This architecture supports advanced interactions, to read more about re-assigning generation capabilities, see the blog explaining the multiple pathways to generating DUST.


Managing DUST in practice

Understanding the mechanics of DUST generation clarifies how network operations function. In practice, users can manage these processes through Midnight software wallets, which automate the underlying registration, re-registration, and tracking tasks.

1AM wallet supports in-app DUST generation, try it out here.




Share