By taking advantage of the flexible 0x architecture, NFTs can enable innovative marketplace mechanics. Defi elements such as staking can help to stabilize price and rewards can be in the form of priority to future drops or NFT airdrops. Here's such a cool NFT primitive: random NFT distributions, powered by @chainlink ! This contract is a wrapper around ChainLink's VRF that makes it easier for others to build RNG distributions like lotteries. You can do two things:
- Distribute an NFT to one address from a list of addresses
- Distribute an NFT to a random holder of another NFT. No extra fees.
How to get started?
1) Acquire at least 2 LINK. Head over to the LINK token and approve the spending of at least 2*10^18 tokens for the NFTLottery address: 0x3Baa5AB805c7888e7A92Cf6D32c20938eDe344fb
2) Pick the NFT you want to distribute, and setApprovalForAll to true for the NFTLottery address: 0x3Baa5AB805c7888e7A92Cf6D32c20938eDe344fb
3) call distributeToAddresses if you want to distribute to a random address in a list. OR 3) call distributeToNftHolders if you want to distribute to a random NFT holder, with start and end indices (both inclusive) for the NFT. in both cases, the _fee is 2 LINK (2*10^18)
👁 ⚡️👁 So whether you're building a lottery system or need a provably fair way to distribute some prizes, check it out! Nicer front-end + lottery sale factory etc. etc. that builds on top of this coming soon. 🔥 Source
Things that are specifically missing from this release, which can be delegated to other contracts:
- "locking in" the reward in escrow until all recipients are finalized
- selling lottery tickets
- bundling rewards to handle multiple asset types