This project aims to address challenges faced by Chiliz, such as fan engagement, ownership, and limitations in interactivity, by distributing fan tokens issued on the Chiliz Chain based on fan contributions and issuing attendance proof NFTs. The token distribution contract based on fan contributions is highly suitable for this purpose due to its versatility, security, and portability. These attributes make it ideal for enhancing liquidity supply of existing fan tokens on the Chiliz Chain. Furthermore, by integrating with Move to Earn platforms like PUML and staking contracts, it can significantly expand opportunities for fan contributions to clubs, thereby greatly enlarging the fan community.
-
Stadium Attendance
- During stadium attendance, we issue fan tokens and attendance proof NFTs based on contributions, providing access rights to perks and exclusive entry gates. We establish a scheme where seats closer to the cheering leaders can earn more fan tokens through MOM voting at halftime, with winners receiving fan tokens distributed proportionally to their contributions, thereby enhancing fan engagement.
-
NFT Owner Exclusive Community
- The NFT owner exclusive community issues NFTs as proof of participation to users attending stadium events, granting access to fan community privileges and exclusive entry gates.
-
NFT Games
- In NFT games, fans can exchange fan tokens for club player NFTs to assemble squads and compete in games against other clubs issuing fan tokens on the Chiliz Chain.
- The Admin deploys the
CreateFanTokenContract
,SendFanTokenContract
, andNftContract
. - When a User scans the QR code assigned to their seat and performs a MOM vote, their address, seat block, and voted player are registered in the system, triggering the
CalculateContributionRateMethod
. - Using the address and distribution ratios calculated by
CalculateContributionRateMethod
, a Merkle tree is constructed using theCreateMerkleTreeMethod
. - A Merkle tree is also constructed using the
CreateMerkleTreeMethod
for an array composed of addresses and distribution quantities. - The Merkle tree and Merkle proof obtained from
CreateMerkleTreeMethod
are provided to the Admin. - After the match ends, the Admin registers the Merkle root with
SendFanTokenContract
andNftContract
. - The Admin distributes tokens using
SendFanTokenContract
. - The Admin distributes NFTs using
NftContract
.
The QR code scanning functionality
verifies that spectators have indeed attended the stadium by designing a flow to scan QR codes attached to stadium seats and execute subsequent processes.
The CalculateContributionRateMethod
is designed to increase the distribution rate of fan tokens based on two factors: proximity of the fan's seat to the cheering leader's seat and the success of MOM voting results. This allows for distributing rewards commensurate with supporters' levels of contribution.
The CreateMerkleTreeMethod
builds two types of Merkle trees and makes the resulting Merkle root and Merkle proof available to the operating entity's administrators:
- It calculates the distribution amount of fan tokens for each address using the
CalculateContributionRateMethod
, converts them into an array, and constructs a Merkle tree. - It sets the issuance quantity of 1 NFT for each address, converts them into an array, and constructs a Merkle tree.
These processes enable administrators to manage and utilize the Merkle root and Merkle proof accordingly.
The CreateFanTokenContract
can issue fan tokens for any club on the Chiliz Chain.
The SendFanTokenContract
can be executed following these steps:
- Utilize the fan tokens issued by
CreateFanTokenContract
. - Register the Merkle root calculated by
CreateMerkleTreeMethod
with the contract. - Call the fan token transfer function with the Merkle proof as an argument, enabling the transfer of fan tokens to appropriate addresses based on their allocated amounts.
The NftContract
can be executed following these steps:
- Register the Merkle root calculated by
CreateMerkleTreeMethod
with the contract. - Call the NFT issuance function with the Merkle proof as an argument, enabling the distribution of NFTs to appropriate addresses based on their allocated quantities.
In this hackathon, we developed a prototype of the Features and created a flow scenario demonstrating the interaction of CalculateContributionRateMethod
, CreateMerkleTreeMethod
, CreateFanTokenContract
, SendFanTokenContract
, and NftContract
.
The flow involves:
- User executing
CalculateContributionRateMethod
andCreateMerkleTreeMethod
. - Admin executing
CreateFanTokenContract
,SendFanTokenContract
, andNftContract
.
Users log in to the site using MetaMask and can verify the distribution results of fan tokens and NFTs.
git clone [email protected]:ikmzkro/Chiliz-Sports-Hackathon.git && cd Chiliz-Sports-Hackathon
cd frontend && yarn && yarn dev
- The user accesses the main screen and logs in with MetaMask.
- The user checks the screen after logging in.
- The user selects a seat and MOM vote, clicks the Submit button, and informs the administrator.
-
The administrator distributes fan tokens and NFTs.
-
The user checks the balance of fan tokens in MetaMask.
-
The user checks the received NFTs on the screen after logging in.
Contract Name | Address |
---|---|
NFTContract | 0xA65DbdB04BBF78859AD7F17188D8f3663592b62B |
CreateFanTokenContract | 0xc0f9c4C6c0F426E145d2ba3D3Ef7218950813610 |
SendFanTokenContract | 0x19D72055277B0C97d26008E4c922354998eF92dB |
Contract Name | Address |
---|---|
NFTContract | 0x0FD92fb94f827B0C7CdC4e673ECC1668457B447d |
CreateFanTokenContract | 0xfc5B5058b2D159a01dc400891C67B40C27Ede1D3 |
SendFanTokenContract | 0x746C1D78e0F428867325bEF9A5f9a46Ab7750A67 |
npx hardhat run scripts/deployMyNFT.ts --network chiliz
https://testnet.chiliscan.com/token/0xA65DbdB04BBF78859AD7F17188D8f3663592b62B
npx hardhat run scripts/deployFanToken.ts --network chiliz
https://testnet.chiliscan.com/token/0xc0f9c4C6c0F426E145d2ba3D3Ef7218950813610
npx hardhat run scripts/deploySendChilizFanToken.ts --network chiliz
https://testnet.chiliscan.com/address/0x19D72055277B0C97d26008E4c922354998eF92dB
This project is licensed under the MIT License.
For an introduction to our team, click here.
Email: [email protected]
Project Link: https://github.com/ikmzkro/ChilizProof