DEV Community

mujin
mujin

Posted on Edited on

What one NFT actually costs to make, start to finish

I run a small pipeline: SD1.5 on a 4GB GTX 1650, my own ERC-721 contract, hand-built Seaport listings, a daemon that restocks, and a bot that checks everything. When people ask what a piece costs, they usually mean gas. Gas is the small part. Here's the real breakdown from the first run of 22 pieces.

The compute side

Each image is 512x768 at fp32 with model offload. On the 1650 that's about 150 seconds per image. The first run was 22 pieces, so roughly 55 minutes of pure generation, spread over a couple of evenings because I wasn't leaving the card pinned.

Electricity is where I'd rather not fake precision. I didn't meter the wall. Qualitatively: a 1650 under load draws a modest amount, and 55 minutes of it is cheap enough that I stopped thinking about it. If you want a number, measure your own draw. I won't invent one.

The on-chain side

The preload is the part I track. Every piece carries about 0.0000008 ETH of on-chain preload on Base. That's not a typo. At 22 pieces the preload total is under 0.00002 ETH. Mint price is 0.00063 ETH per piece, so the preload is roughly a thousandth of the mint price per token.

Item Per piece Notes
Generation time ~150 s 512x768, fp32, offload
On-chain preload ~0.0000008 ETH Base
Mint price 0.00063 ETH
Preload / mint price ~0.13%

The part nobody prices

The contract, the Seaport listing builder, the restock daemon, and the self-checking bot are all mine. That work doesn't show up on a per-piece line item, but it dominates the timeline. The test suite has about 125 tests. Those tests exist because hand-built Seaport listings fail in ways that look fine until they don't, and because a daemon that restocks needs to be boringly correct.

Here's the shape of the preload step, stripped down:

PRELOAD_WEI = 800_000_000_000  # ~0.0000008 ETH

def attach_preload(piece, account):
    tx = contract.functions.preload(piece.token_id).build_transaction({
        "value": PRELOAD_WEI,
        "nonce": account.get_transaction_count(account.address),
    })
    return account.sign_transaction(tx)
Enter fullscreen mode Exit fullscreen mode

Nothing clever. That's the point. The expensive parts were the contract surface, the listing builder, and the tests that keep both honest.

What it actually costs

Per piece, the marginal cost is generation time plus a rounding-error amount of ETH on Base. The fixed cost is the pipeline itself: the contract, the daemon, the bot, the 125 tests. If you count your own hours at any sane rate, the fixed cost dwarfs the marginal cost by orders of magnitude. The 22 pieces made that obvious to me. The next 22 will be nearly free by comparison.

So when someone asks "what does one NFT cost to make," the honest answer is: almost nothing per piece, and everything up front.

Takeaway: measure your marginal cost (seconds of compute, wei of preload) separately from your fixed cost (contract, tooling, tests). Only one of them scales with collection size, and it's not the one that hurts.

The collection this comes from is at https://charming-llama-47b816.netlify.app if you want to see the output.

Top comments (0)