FlowFuel

FlowFuel – Fuel creators with milestone NFTs & earn royalties on Flow

FlowFuel

Created At

ETHGlobal New Delhi

Project Description

FlowFuel is a milestone-driven crowdfunding + NFT platform built on Flow. Creators launch campaigns made of sequential milestones and mint a fixed supply of Milestone NFTs that represent backer ownership of those campaigns. Fans buy these NFTs to fund projects; those funds accumulate in on-chain campaign vaults and are released to creators per-milestone. Every Milestone NFT carries royalty metadata so creators continue to earn royalties on every secondary sale via Flow’s NFTStorefrontV2—no extra marketplace logic required.

Key user flows

  • Creator creates a campaign (title, description, image, goal, milestones, total NFTs).
  • Fan buys one or more Milestone NFTs at a per-NFT price = goalAmount / totalNFTs.
  • Payments go into a campaign-specific FlowToken vault managed by the contract.
  • When enough funds are collected, creators can withdraw milestone-sized payouts (goalAmount / milestones.length), with the system emitting events.
  • Milestone NFTs are tradable on marketplaces that support Flow’s MetadataViews.Royalties standard; NFTStorefrontV2 pulls royalty info from the NFT metadata and pays royalties automatically on resale.

How it's Made

How it’s made High-level architecture Cadence contracts

MilestoneNFT.cdc — custom NFT contract that:

Implements NonFungibleToken, MetadataViews (Display & Royalties), and ViewResolver.Resolver.

Stores NFT fields: id, name, description, image (HTTP URI), royaltyReceiver capability, and royaltyCut.

Collection conforms to ViewResolver.ResolverCollection so off-chain UIs/marketplaces can resolve Display and Royalties.

CampaignManager.cdc — campaign lifecycle logic:

Create campaigns, track funding, mint milestone NFTs, and manage campaign vaults (dictionary keyed by campaign ID).

contributeAndMint: verifies payment equals NFT price, deposits funds into campaign vault, mints NFT to buyer while embedding creator royalty capability and cut.

Vault management: campaign vaults are stored as actual FlowToken.Vault resources inside the contract (campaignVaults: @{UInt64: FlowToken.Vault}), removed and re-inserted when depositing/withdrawing to respect Cadence resource rules.

Milestone withdrawals: withdrawNextMilestone withdraws exactly one milestone amount if enough funds exist; emits MilestoneWithdrawn.

Safe patterns: strict pre/assert checks and careful <-/<-! resource moves to avoid leaks.

Marketplace integration

Relies on the global NFTStorefrontV2 contract (already deployed).

Helper transactions:

SetupStorefront (user-level) — create storefront in user account storage.

CreateListing — seller issues provider capability from their MilestoneNFT collection and calls Storefront.createListing(...) with saleCuts and salePaymentVaultType.

PurchaseListing — buyer provides a FlowToken vault to the purchase API; NFTStorefrontV2 distributes saleCuts (including royalties) automatically.

Royalties are surfaced by the NFT via MetadataViews.Royalties; NFTStorefrontV2 reads these views and transforms them into saleCuts at listing time.

Nuance: saleCut supports only one token type per listing; to accept multi-token saleCuts, integrate the FungibleTokenSwitchboard pattern.

Frontend & UX

Next.js app with Flow Client Library (FCL) for wallet discovery and transaction signing.

React hooks map 1:1 to Cadence scripts/transactions:

useCreateCampaign → CreateCampaign.cdc

useContributeAndMint → ContributeAndMint.cdc

useSetupNFTCollection → SetupNFTCollection.cdc

useSetupStorefront → SetupStorefront.cdc

useListNFT → CreateListing.cdc

useBuyNFT → PurchaseListing.cdc

useCampaigns / useCampaign / useUserNFTs → read-only scripts (GetCampaigns, GetCampaign, GetNFTMetadata, GetNFTCollection)

Off-chain assets (images + metadata) are stored on IPFS/Pinata and referenced by HTTP URIs in the NFT Display metadata.

background image mobile

Join the mailing list

Get the latest news and updates