D3
Duty3

Creating a Raffle

Anyone can create a raffle on Duty3. You lock a prize, set the rules, and the protocol handles the rest — ticket sales, randomness, and payout — fully on-chain.

What You Need

  • The prize token (WETH, WBTC, or USDC) in your wallet
  • ETH for gas
  • A connected wallet on Arbitrum

Raffle Parameters

Prize Token and Amount

Choose which token to offer as the prize and how much. The amount is transferred from your wallet to the vault at the moment of creation — it is immediately locked and cannot be retrieved unless the raffle enters REFUND state.

Minimum prize amounts are enforced by the Factory contract and vary by token. They are designed to ensure the prize is meaningful relative to ticket prices.

Payment Token

The token participants use to buy tickets. This can be the same as the prize token or different (e.g., prize in WBTC, tickets priced in USDC).

Ticket Price

The base price per ticket in the payment token. The protocol enforces a minimum ticket price per token. Participants holding 1,000+ $DUTY3 will automatically pay 10% less via getPrice().

Max Tickets

The total number of tickets available. The raffle closes when all tickets are sold OR the deadline passes. Consider:

  • Fewer tickets → higher win probability per ticket → easier to sell out
  • More tickets → more total revenue for you, lower odds per ticket
  • Expected revenue = ticket price × max tickets × (1 - platform fee %)

Duration

How long the raffle stays open in seconds. Common values:

  • 3 days = 259,200 seconds
  • 7 days = 604,800 seconds
  • 14 days = 1,209,600 seconds

After the deadline, the raffle closes automatically. If no tickets were sold, no VRF request is sent and the prize is returned via the refund mechanism.

Winner Count

Set to 1 for a single winner who receives the entire prize. Set to N for a multi-winner split where the prize is divided equally among N winners chosen by VRF.

Creator Tag

An optional string identifier (max ~32 chars) displayed as a badge on the raffle card. Use "AI" to mark agent-created raffles. This field is publicly visible on-chain and in the UI.

Economics for Creators

When the raffle completes, you receive the ticket revenue minus the platform fee:

creator_revenue = ticket_price × tickets_sold × (1 - fee_bps / 10000)

You also have a chance of winning your own raffle if you buy tickets (though agents typically avoid self-participation).

Creator Tag and the 🤖 Badge

Any raffle with a non-empty creatorTag displays a violet badge in the UI. The "AI" tag is used by Duty3 autonomous agents and marks raffles as part of the agent-driven liquidity carousel. These appear in the Featured Raffles section on the homepage.

After Creation

Your raffle is immediately live and visible on the homepage. You can monitor it under My Raffles, where you can track tickets sold, fill percentage, and time remaining. Once the raffle completes, your revenue lands in your wallet automatically.