🐵 ApeSwap Integrates Chainlink VRF to Ensure Fair Weekly NFA Draws ⛓

4 min readJun 29, 2021


We are excited to announce that we have integrated Chainlink VRF (Verifiable Random Function) to select winners in our Non-Fungible Ape Holder Rewards Draw held every week. Chainlink VRF is the industry-leading random number generator (RNG), providing smart contracts an on-chain source of secure randomness that users can verify is tamper-proof. This means that our weekly distributions of BANANA tokens to random Non-Fungible Ape (NFA) holders are provably fair and unbiased, as the team has no influence over the process.

For those of you new to ApeSwap we provide a full suite of DeFi products on BSC for the average ape, including a decentralized exchange for liquidity, a yield farming program with up to 300% APY, BANANA staking pools, Initial Ape Offerings (IAO) for new tokens, Non-Fungible Apes (NFAs) for NFT collectors, and more. By making the DeFi experience more fun and community-driven, our ecosystem has grown to hundreds of millions of dollars in total value locked (TVL).

In order to give back to the community, we have started our “Saturdays are for the NFAs” program, where all NFA holders are automatically eligible to win an award paid out in BANANA tokens. In order to ensure all NFA holders have an equal chance at potentially winning this reward, we are now using an RNG solution that is tamper-proof and transparent. Unfortunately, many existing randomness solutions are vulnerable to manipulation.

For example, on-chain RNG solutions that solely use the blockchain’s blockhash are not sufficient because they can be easily manipulated by network validator nodes who withhold blocks with unfavorable blockhashes, essentially allowing them to reroll. Additionally traditional off-chain RNG solutions are highly opaque and provide no proof that the randomness data has not been manipulated. A different solution was needed to guarantee fair outcomes to all users.

We selected Chainlink VRF because it provides a tamper-proof randomness solution that users can independently verify is truly random. Chainlink VRF works by combining block data that is still unknown when the request is made with a user supplied seed and the oracle node’s pre-committed private key to generate both a random number and a cryptographic proof. Our rewards contract will only accept the random number input if it has a valid cryptographic proof, and the cryptographic proof can only be generated if the VRF process was not manipulated in any way. This provides NFA holders with automated and publicly verifiable assurances directly on-chain that winners are chosen in a provably fair manner without possible tampering by the oracle, users, or our team.

The addition of Chainlink VRF creates a truly unpredictable and exciting gamified experience for NFA holders, further incentivizing users to collect NFAs. Users today who own or acquire NFAs will be automatically entered into this reward program, and the winners will be chosen each Saturday.

“Integrating Chainlink VRF into the ApeSwap ecosystem was an extremely simple process that allowed us to provide our users with a large degree of transparency and trust that weekly draw winners are truly selected at random,” stated ApeSwap co-founder Apetastic. “This work has allowed us to expand the utility of NFAs and further add to their collectibility by adding in dynamic gamified elements.”

About Chainlink

Chainlink is the industry standard oracle network for powering hybrid smart contracts. Chainlink Decentralized Oracle Networks provide developers with the largest collection of high-quality data sources and secure off-chain computations to expand the capabilities of smart contracts on any blockchain. Managed by a global, decentralized community, Chainlink currently secures billions of dollars in value for smart contracts across decentralized finance (DeFi), insurance, gaming, and other major industries.

Chainlink is trusted by hundreds of organizations, from global enterprises to projects at the forefront of the blockchain economy, to deliver definitive truth via secure, reliable oracle networks. To learn more about Chainlink, visit chain.link, subscribe to the Chainlink newsletter, and follow @chainlink on Twitter. To understand the full vision of the Chainlink Network, read the Chainlink 2.0 whitepaper.

Solutions | Docs | Discord | Reddit | YouTube | Telegram | GitHub

About ApeSwap

ApeSwap is a leading decentralized exchange (DEX) on Binance Smart Chain focused on offering a premier trading experience. Users are incentivized to pool liquidity on ApeSwap through yield farming to earn the native currency, $BANANA. Additionally, apes can use their earned $BANANA to stake and earn other tokens and unlock exclusive features. Built by DeFi apes, for DeFi apes, we have a dedicated team with years of experience who are committed to the DeFi community and growing the ApeSwap Jungle.




ApeBond is a multichain DeFi Hub offering an accessible, transparent, and secure experience for everyone.