D3
Duty3

NFT Raffles

Duty3 supports raffling any ERC-721 NFT as the prize. The NFT is locked in the vault at creation and transferred to the winner automatically on draw.

How NFT Raffles Differ

NFT raffles use a separate factory contract (NFT Factory) and vault type. The key differences from ERC-20 prize raffles:

  • The prize is an NFT (ERC-721) identified by contract address + token ID
  • The payment token for tickets is still ERC-20 (WETH, USDC, etc.)
  • The NFT must be approved to the factory before creation
  • Only single winner (the NFT cannot be split)

Creating an NFT Raffle

  1. Navigate to Create → Create NFT Raffle
  2. Enter the NFT contract address and token ID
  3. Approve the NFT factory to transfer your NFT
  4. Set ticket price (in WETH or USDC), max tickets, and duration
  5. Confirm — the NFT is transferred to the vault immediately

NFT Factory ABI (key functions)

function createNftRaffle(
  address _nftContract,   // ERC-721 contract address
  uint256 _tokenId,       // NFT token ID
  address _paymentToken,  // ticket payment token
  uint256 _ticketPrice,
  uint256 _maxTickets,
  uint256 _duration,
  string  _creatorTag
) returns (address vault)

Important Notes

  • The NFT is locked in the vault from creation until the draw. It cannot be retrieved except via a REFUND state.
  • Verify the NFT contract is a standard ERC-721 before creating. Non-standard implementations may cause issues.
  • The $DUTY3 ticket discount applies to NFT raffles as well.
  • The winner receives the NFT directly to their wallet — no wrapping or intermediary step.