arrows-spinRaffle Lifecycle

Every raffle on Raflux follows a fully on-chain lifecycle — from listing an asset to winner selection and prize claiming.

1

Asset Listing

The seller creates a new raffle by locking an NFT or token into the EscrowVault smart contract.

They define:

  • 🎯 Target amount — minimum goal for successful raffle.

  • 🎟️ Ticket supply — total number of NFT tickets.

  • ⏱️ Timeframe — 7, 14, or 30 days.

Once listed:

  • The asset is transferred to the escrow contract.

  • A new raffleId is generated and registered in RaffleManager.sol.

  • The raffle’s initial status = Listed.

2

Ticket Sale

When the raffle goes live:

  • Users can start buying NFT tickets.

  • Each purchase mints an ERC-1155 ticket (fungible-per-raffle model).

  • Payment accepted in USDT.

3

Raffle Close

When the timeframe ends or sold out:

✅ Case 1 — Target Met

  • Asset transferred from escrow to the randomly selected winner.

  • Seller receives 90% of total collected funds.

  • Platform receives 10% fee.

  • Status becomes: Item Raffled

⚖️ Case 2 — Target Unmet (Partial or No Sell)

If the goal isn’t reached:

  • Collected funds are raffled among ticket holders instead of the asset.

  • Winner receives 95% of raised funds.

  • 5% fee sent to platform wallet.

  • Status becomes: Fund Raffled

🚫 Case 3 — No Tickets Sold / Cancelled Raffle

If no ticket is sold:

  • Seller can claim back the locked asset from escrow.

  • No funds are exchanged.

  • Status becomes: Cancelled

4

Winner Selection

Raflux uses Chainlink VRF to ensure randomness is verifiable and tamper-proof.

5

Prize Claim

Once a winner is determined:

  • The winning wallet can call the claim function to receive the prize.

Claim Scenarios

Scenario
Claim Result

🎁 Item Raffled

Winner receives NFT or token asset.

💰 Fund Raffled

Winner receives raised fund balance (after fee).

🚫 Cancelled

Seller reclaims original asset.

🧾 Status Explanation

🟢 Listed

Raffle is created and ticket sale is ongoing.

Seller lists asset and buyers can purchase tickets.

🟡 Raffling

Raffle ended; waiting for Chainlink VRF result (winner selection in progress).

Raffle duration ends/ticket sold out.

🟣 Item Raffled

Target met, asset distributed to winner.

VRF selection complete.

🔵 Fund Raffled

Target unmet, funds distributed to winner.

VRF selection complete.

🔴 Cancelled

No sale or cancelled raffle, asset returned to seller.

Seller/admin action.

Last updated