Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Pre-minted vouchers · Boson Protocol
Skip to content

Pre-minted vouchers

By default, a voucher (rNFT) is minted lazily when a buyer calls commitToOffer. Pre-minted vouchers let the seller pre-mint vouchers up to quantityAvailable before any commit, so the rNFTs exist immediately — listable on OpenSea, transferable, tradable. When a marketplace buyer "buys" the pre-minted voucher, ownership transfers and the on-chain exchange is created lazily inside the ERC-721 before-transfer hook, which calls the protocol's commitToPreMintedOffer. From the buyer's point of view, they bought an NFT; from the protocol's point of view, they committed to an offer and started the redemption clock fresh.

The seller pays the buyer's price and their own sellerDeposit at pre-mint time (out of their treasury), since the buyer doesn't interact with the protocol directly. Funds for completed exchanges flow back into the treasury automatically, so capital recycles.

Workflow

createOffer

Normal offer creation.

depositFunds (seller treasury)

Cover the seller deposit + price for each premint.

reserveRange(offerId, length)

Reserve token IDs in the voucher contract.

preMint(offerId, amount)

Mint in batches; vouchers are now transferable as ERC-721.

List on OpenSea / wrap in AMM (optional)

Treat the pre-minted vouchers as ordinary ERC-721 tokens — any marketplace that supports ERC-721 will list them.

Buyer receives voucher via ERC-721 transfer

The first transfer triggers commitToPreMintedOffer, creating the on-chain exchange.

Normal protocol flow continues

Redeem / dispute / complete as if the buyer had committed directly.

For convenience, the Orchestration mixin bundles offer creation, range reservation, and (optionally) pre-mint into a single transaction — for example createPremintedOfferWithCondition, createSellerAndPremintedOffer.

Reserve a range and pre-mint

SDK
// 1. (assumes you've created the offer and funded the seller treasury)
 
// 2. Reserve a range: length must beoffer.quantityAvailable.
await (await sdk.reserveRange(offerId, /* length */ 100)).wait()
 
// 3. Pre-mint, possibly in batches if block gas limit is tight.
await (await sdk.preMint(offerId, /* amount */ 100)).wait()
 
// 4. Check what's left to mint.
const remaining = await sdk.getAvailablePreMints(offerId)
 
// 5. (later) Burn unused pre-minted vouchers after the offer expires or is voided.
await (await sdk.burnPremintedVouchers(offerId)).wait()

Reserve-range mechanics

  • Single reservation per offer. You can only call reserveRange once per offer — pick the length up-front.
  • Range owner. The voucher contract or the seller's assistant address. Pre-minted vouchers transfer from this owner to the buyer.
  • Token IDs are reserved on the protocol side too — exchange IDs and token IDs stay in lockstep, even though some exchanges are created out of order as buyers commit to pre-minted vouchers.
  • Partial pre-mint is allowed. Reserve 10 000, pre-mint 1 000 per month. Useful for drip releases.
  • quantityAvailable decreases when you reserve, not when you pre-mint.

Capital implications

You're not just minting an NFT — you're committing the seller-side funds. For each pre-minted voucher:

Pre-mint encumbersSource
offer.priceSeller's protocol treasury (released to buyer if seller revokes)
offer.sellerDepositSeller's protocol treasury (released to seller on success)

If your treasury runs dry the pre-mint reverts. Top up via depositFunds(sellerId, …). As exchanges complete and price flows back into the treasury, that capital can cover further pre-mints — you only have to front the price for the float of unredeemed vouchers.

Burn unused pre-minted vouchers

After an offer expires (or you void it), the pre-minted vouchers in your contract are dead inventory — they can't be committed to. burnPremintedVouchers(offerId) removes them so they don't appear in your wallet or on marketplaces.

When to use pre-minted vouchers

  • Limited drops with secondary-market-listable NFTs from day one.
  • Listing on existing NFT marketplaces (OpenSea, Blur) before any buyer commits.
  • AMM / bonding-curve sales — deposit pre-minted vouchers into a liquidity pool.
  • Wrapped auctions — see Price discovery → Wrapper flow.

When not to use

  • High-volume, low-value offers — lazy minting is cheaper and avoids capital lock-up.
  • Offers where the buyer never sees an NFT pre-redemption — no benefit.

Related