A visual guide to DUST sponsorship on Midnight

Avatar of the content author
Sign up now so you never miss an update
contributors
Avatar of the content author
Midnight
Transaction costs, especially when it comes to onboarding new users, are a major barrier to DApp usage. Midnight solves this through DUST sponsorship, which decouples transaction sender from the sponsor so developers can deliver true gasless user experiences. This blog breaks down the user and sponsor flow, with an infographic to illustrate what the user sees and what happens in the backend, alongside a more technical video walkthrough to help you understand the full process.

Removing the friction of gas costs

One of the most common friction points for a user trying a new DApp is the transaction fee. Users must already have tokens available in a wallet to click a single button, interact with a smart contract, create an account, or test out an application.

Many DApps lose users at this first friction point. Over 80% of users are lost before they complete their first transaction. Requiring upfront token transfers and setup costs stops onboarding before users have a chance to test out the functionality and benefits of the application. On Midnight, transaction fees require DUST, which is a private, non-transferable and renewable resource generated continuously by holding NIGHT tokens that are registered for DUST generation. But if new users have to obtain NIGHT to charge a DUST wallet before using an application, this creates a significant barrier to onboarding new users.

DUST sponsorship removes this friction point completely. Anyone can cover transaction costs for their users through fee sponsorship. The sponsor holds NIGHT that is registered to generate DUST, allowing the user to experience an uninterrupted flow of a standard web application.

Separating payment from authorization

Most blockchains combine execution authority and fee payment into a single cryptographic signature. DUST sponsorship on Midnight allows these to be separated into two independent roles:

  • The User: Authorizes the contract action off-chain using a private key stored on the local device. The user controls what happens.
  • The Sponsor: Attaches the required DUST fee to the transaction. The sponsor covers the financial cost.

This separation enforces strict operational boundaries. Sponsors cannot perform actions on behalf of users because paying the fee grants no access to private user keys. Users cannot force sponsors to pay for unauthorized actions because sponsors only process pre-approved transaction payloads.

DUST sponsorship in action

The infographic below maps out the complete DUST sponsorship sequence. The following breakdown explains each numbered step across both the frontend user interface and the backend infrastructure.

DUST sponsorship detailed infographic
DUST sponsorship detailed infographic

What the user sees and authorizes

1. User clicks action:

The user opens the application with zero DUST in their wallet and taps an action button, mirroring a standard Web2 experience. Behind the scenes, the wallet immediately builds the zero-knowledge proof locally on the device using a secret key, explicitly excluding DUST from the transaction.

2. User signs the transaction:

A wallet prompt asks the user to sign the transaction, showing a transaction fee of 0 DUST. Signing and finalizing seal the proof, contract parameters, and asset state into an immutable payload. The secret key never leaves the device. The application transmits this sealed payload directly to the sponsor's backend service.

How the sponsor processes the transaction

3. Sponsor backend receives the payload:

The sponsor's service receives the sealed payload over HTTP POST. Because the transaction is already finalized by the user's signature, the sponsor cannot modify the contract call or tamper with the user's cryptographic proof.

4. Sponsor attaches a DUST fee:

The sponsor wallet balances the fee section, attaching a DUST offer from the DUST reserve generated by its registered NIGHT.

5. Sponsor signs and broadcasts

The sponsor signs off on the added DUST fee and broadcasts the complete, fully formed transaction to the Midnight network.

Transaction confirmation

6. User sees the confirmed action:

Network nodes verify that the user's proof satisfies contract rules and that the sponsor's DUST covers execution costs. Once validated, the network updates the on-chain state and sends an execution confirmation back to the user interface. The user sees their confirmed transaction hash with zero DUST spent and zero DUST remaining.

Security architecture and risk mitigation

Throughout the DUST sponsorship process, users retain full control over their transaction intent. The user generates the zero-knowledge proof and seals the payload locally. Any attempt by the sponsor to modify the contract call invalidates the cryptographic signature. Network nodes reject altered transactions immediately.

Sponsors protect their DUST reserves using standard web security tools. Users never access the sponsor's wallet directly. They only send structured requests to an application programming interface that accepts data according to defined system rules. Developers implement rate limits, authentication requirements, and abuse filters at this backend boundary before allocating DUST.

Protocol rules enforce mandatory fee validation across the network. Every transaction submitted to the network requires a valid DUST fee offer. Transactions broadcast without sufficient DUST fail automatically, preventing unpaid network execution.

Practical deployment scenarios

Fee sponsorship enables practical deployment models across diverse application types. For consumer DApps, direct Web3 onboarding allows new users to execute transactions immediately, bypassing exchange purchases and wallet funding entirely.

For commercial products, businesses can offer tiered usage models, providing specific transaction allowances to users based on subscription levels or daily usage limits. At the enterprise level, organizations can maintain central treasury wallets holding NIGHT, using one primary wallet to continuously generate DUST and fund daily operational transactions across internal systems and client applications.

Decoupling transaction sender from the sponsor removes a primary barrier to user adoption: complex onboarding. Holding NIGHT allows sponsors to continuously generate DUST and cover transaction costs behind the scenes, giving users instant access to application features.

To develop a deeper understanding of how DUST sponsorship works, watch the full technical walkthrough below as Midnight Foundation Developer Educator Idris Olubisi demonstrates how to build and execute a sponsored transaction end-to-end on Midnight.

Share