Skip to content

An application that enables companies and protocols get closer to their users by creating quests/competitions that users can participate in and earn rewards.

License

Notifications You must be signed in to change notification settings

NatX223/ChainQuests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChainQuests

live link - https://chain-quests.vercel.app/

Table of Contents

Problem-statement

Problem Statement: Organizers of web3 giveaways(Individuals and Protocols) lack a user-friendly and transparent platform for efficiently managing and equitably distributing giveaway amounts. Additionally, users face challenges in discovering legitimate giveaways and airdrops. The need is for a solution that streamlines giveaway organization, enhances transparency, and provides a reliable platform for users to find credible opportunities.

Solution

Solution: Introducing a platform that empowers both protocols and individuals to effortlessly organize giveaways and initiate airdrops. Through this solution, rewards are distributed randomly among participants, ensuring a fair and engaging experience for all involved.

How-it-works

For Organizers: Organizers can effortlessly initiate giveaways and airdrops through a user-friendly form, detailing the designated amount for each event. Upon completion, organizers will be prompted to sign a transaction, securely locking the specified amount of ETH or airdropped tokens in a smart contract dedicated to tracking each giveaway or airdrop.

For Users: Users can visit the app's Explore page, featuring a comprehensive list of available giveaways and airdrops. If not claimed previously, users can click the "Claim" button. Upon doing so, they will be prompted to sign a transaction, enabling a randomized allocation of their share in the giveaway or airdrop.

Technologies Used

Stack UsageSummary
Solidity Smart contract
LightLink Testnet Deploying smart contracts
API3 using QRNG to intruduce randomness
Node.js Backend
React.js & Next.js Frontend
  • Solidity smart contracts

    The smart contracts can be found here

    • Giveaway Contract The giveaway contract serves as the central hub for managing all giveaways created on the platform. It utilizes the OpenZeppelin Counters contract and defines various structs to monitor giveaway balances. Users can leverage the contract's functionality to create giveaways with ETH by invoking the createGiveaway function. This establishes a systematic and secure approach to organizing and tracking giveaways within the platform. The Giveaway contract code can be found [here](https:// github.com/NatX223/ChainQuests/blob/main/Smart-Contracts/contracts/Giveaway.sol). The deployed address of the Giveaway contract on LightLink Pegasus testnet is 0x8b576DAdF5b8ecE2DD38160448ABAF64fC70f062

    • Airdrop Contract The airdrop contract takes charge of creating, organizing, and facilitating the claiming process for airdrops on the platform. It streamlines the airdrop launch process for token creators by featuring the createAirdrop function. This function prompts creators to send and lock the designated amount of tokens in the airdrop contract. Leveraging OpenZeppelin Counters contract and the IERC20 interface, the contract ensures a systematic and efficient management of airdrop activities on the platform. The Airdrop contract can be found here. The deployed address of the Airdrop contract on LightLink Pegasus testnet is 0x434aD648975CBd38dFcc7381E0b2b15079bB7dE1

    • How to run clone the repo, enter the contracts folder and download the npm packages by running:

    npm install
    # or
    yarn add

    configure the hardhat.config file(default set to mumbai) then deploy to any chain of choice of using the commands

    npx hardhat run --network <your-network> scripts/deployGiveaway.js
    npx hardhat run --network <your-network> scripts/deployAirdrop.js
  • LightLink-Testnet

    • The smart contracts were deployed on the LightLink pegasus testnet and enterprise mode was also used to abstract gas fees for both organizers and users
  • API3

    • API3 QRNG was used to introduce randomness to the process of claiming both Airdrops and Giveaways by generating single uint256 numbers. The numbers generated were then trimmed down to numbers between 10 and 100 (representing 1% to 10%) and used to determine the amount to be claimed by a user.
  • Backend

    • Node.js was the framework used for the backend, I used the backend to handle the storage and retrieval of Giveaway and Airdrop details on a database(Firestore DB). The backend code can be found here

About

An application that enables companies and protocols get closer to their users by creating quests/competitions that users can participate in and earn rewards.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published