Inspiration💥

Imagine the excitement of buying a ticket to see your favorite band, only to discover at the venue that your ticket is fake. Despite advances like blockchain technology, ticket fraud remains a prevalent issue, spoiling what should be unforgettable experiences.

Imagine you want to organize an event. It's a hard task, you have so many things to worry about, including ticketing. The available ticketing services either don't provide transparent price plans, or they lack transparency in the way their service works.

Imagine you attend a music festival and you are given a wristband that holds your funds. You waste time waiting in line to add funds to your wristband and you never know your actual balance.

Imagine you want to customize your event by scheduling price changes, choosing when a ticket can be bought and in what quantities, organizing raffles for your participants and offering them a good time. Already available services would charge a fortunate for these features.

Now imagine these problems are gone. That's what we are trying to achieve with Chain of Events. Our goal is simple: to turn today’s ticketing problems into things of the past by bringing them onchain. Event ticketing as we know it has too many flaws that are easily solvable with available technology. Our platform is designed to make attending and organizing events easier, transparent and more enjoyable.

What it does⚙️

Chain of Events makes organizing and going to events easier, transparent and more fun. Our platform uses blockchain technology to enhance the overall experience, ensuring security, flexibility, and endless possibilities for customization through innovative use of Chainlink products.

For Participants:

  • We offer an easy to use application from which they can buy tickets and other consumables to an event.
  • All items are tokenized as ERC721 NFTs, granting full ownership and the freedom to transfer assets securely.
  • Participants get to keep their NFTs after the event, maintaining the memory of the event forever, opening the door to future benefits and uses
  • Users get to participate in unique activities set up by organizers, such as lotteries, artist interactions, and exclusive behind-the-scenes experiences, with the sky being the limit.

For Event Organizers:

  • Easily set up and manage your event. Register events, add various ticket types, and bring all sales on-chain.
  • Thanks to Chainlink Price Feeds, all prices are in USD to make the transition from Web2 smooth and intuitive.
  • Freely adjust prices, set mint limits, pause selling, control the total number of tickets sold or many other features. Use Chainlink Automation to schedule these updates seamlessly.
    The sky is the limit by using "Templates".
  • Templates are smart contracts that use Chainlink products, like Automations or Functions, that can be attached to any event or asset. They enable everything from lotteries to dynamic changes in NFT characteristics based on off-chain events.
  • Anyone can create and share templates, expanding the functionality and versatility of events and opening the doors to limitless possibilities. Organizers can personalize their events to an unprecedented extent, providing unique experiences that were previously impossible.
    How are tickets or other consumables checked and validated?
    Come Redeem function
  • At the event, an authorized staff member, known as an "allowed person," will scan your digital wallet to view your event-related NFTs, such as tickets and consumables. They will then redeem the necessary NFTs directly in your wallet, marking them as used. Each redemption is securely recorded on the blockchain, ensuring a transparent and fraud-proof process.

How I built it 👷‍♂️

Building Chain of Events as a solo developer, I handled the entire development process, from smart contracts to frontend integration, using the Scaffold-eth repository as a starting point because it has a lot of stuff already set up.

Chainlink
Chainlink Price Feeds
The PriceFeedHandler contract fetches real-time AVAX prices, converting USD to AVAX to bridge the gap between familiar fiat pricing and blockchain transactions, enhancing user comfort and trust.
Chainlink Automations
The contracts that use Chainlink Automations are: PriceAutomatedUpdate, MintLimitAutomatedUpdate and PauseAutomatedUpdate. They are pretty similar to each other. They allow organizers to schedule price updates for an NFT, schedule the change of the mint limit of an NFT and schedule the pausing of selling of an NFT.
Chainlink VRF
Another Chainlink contract that I have created is the ExtraLottery contract. It is a smart contract that gets all current ticket owners of an event and picks a lucky winner. This one acts as a "Template", so it can be implemented by any organizer for their event. Although it is present in the GitHub repository, it is not used in the frontend. It can be easily deployed by the organizer using Remix and the organizer can easily interact with it through Remix.

Chain
All the smart contracts in this app were deployed on Avalanche Fuji. I chose Avalanache as I do believe it is a fast, reliable and easy to use chain. I have to say i barely scratched the surface in terms of how much I have used from its real capabilities, but I would love to explore more an potentially implement a subnet.

Smart contracts
EventCreation
Registers events and links them to their associated NFTs (tickets, drinks, snacks, etc.), also known as "Extras." It manages allowed persons such as bartenders or ticket validators who can redeem these NFTs.
ExtraNft
For any ticket or other consumables, the organizer would deploy this contract. Implements ERC721 standard for all event-related NFTs, utilizing OpenZeppelin libraries for enhanced functionality and security. Whenever an NFT is deployed it gets added to a mapping in EventCreation contract that keeps track of all NFTs associated to an event, thus making that mapping a source of proof and eliminating the risk of bad actors deploying NFTs in the name of the organizer.

The Graph
I have also used The Graph to index the creation of events by the EventCreation contract and to index any changes performed on these events by the EventCreation contract.

Frontend
For the frontend I have used ethers.js to interact with most of my smart contract functions.
I have also used wagmi's useAccount hook a lot to get the wallet address of the current user.
Also I have used the Pinata API to pin the NFTs and the qr-scanner package for the redeem page.

Integration with Firebase Realtime Database
Although a centralized solution, it supports non-critical features like event bookmarking and storing deployment addresses, enhancing the app's UX without compromising core blockchain functionalities.

Challenges I ran into 🧗

Speaking of challenges, I would like to first thank the entire web3 community for being so supportive. There is always someone to help you out there and the response times are mindblowing.

I think the biggest challenge was having to adapt my implementation plan on the fly multiple times. At the start of the hackathon I had a broad idea about the problems I wanted to solve and what products I would use to solve them. However, there were many times when I would start implementing a feature according to the plan, but I would soon discover that something was not as I expected and I would have to adapt and choose a different way to do things. This was especially valid in the beggining. Looking back on it, this was actually a pretty fun part, as it challenged my problem solving abilities really well.

Initially, I experimented with ERC1155 for NFT implementation because of its ability to handle multiple token types in one contract. However, complexities and limitations led me to switch to ERC721, which better suited the project’s needs for individual token uniqueness and simplicity.

Figuring out an efficient way to scan and verify NFTs at event venues was crucial. This involved several trials and errors before settling on a solution that integrated seamlessly with the rest of the app.
Working alone on such a comprehensive project meant juggling multiple roles, from backend development to frontend design and everything in between. Balancing these responsibilities was challenging, but rewarding.

Accomplishments that I am proud of 🎉

Getting this project to a fully functional stage and to a stage at which I am pleased with it was challenging but very rewarding. Despite some doubts along the way, seeing it all come together has been incredibly satisfying.

I haven’t always been confident about my frontend development skills. Working on this project pushed me to improve significantly, and I'm pleased with the progress and the results. But in the end I've developed an application that's ready to go live. It's designed to solve real problems in event management, which is a big step forward in applying blockchain technology practically.

Also I am really proud of coming with the "Templates" feature. It wasn’t part of my original plan, but it’s turned out to be one of the most flexible and creative aspects of the project. It allows users to use Chainlink products in ways I hadn’t even imagined at the start.

What we learned 🧠

I have learned a lot about Chainlink products and learned how to implement them in my project and how they work.
I have learned a lot about product design and frontend implementation. Those are two areas I was less experienced in. But thanks to the great workshops that took place during the hackathon and by effectively using them I can say I saw improvements.
I have learned a lot about areas of product development that, as a developer, I was not that familiar with. Having to go through the entire development process, from designing to prototyping to analyzing flows to developing, deploying and documenting was also great.
Also I have gained a lot of experience in the web3 space as a whole, because I got to see better how different services interact and how you can better use them in your advantage.
On a broader scale, I've learned vital professional skills such as time management and accurate work estimation. These are skills that are crucial not only in project development but I think also in my overall career development.

What's next for Chain of Events 🔜

Although Chain of Events is ready to be used in real events, this was only the first step in making events better and bringing them onchain. A long series of challenges remain in front of us, but I am certain that the blockchain technology alongside Chainlink products is the best choice in solving those challenges.

I would like to develop more Chainlink contracts as "Templates", that would allow organizers to have even more ways in which they could customize their events.
Also I would like to create a "marketplace" where developers can publish and share their Chainlink contracts. This will not only ensure these templates are audited and safe to use but also foster a community-driven innovation hub. The "democratization" of templates is expected to spark creativity and generate unforeseen use cases.

Improving the UI and the UX would also be beneficial. I did my best to create the best frontend I could, but it is far from where an app that is commonly used should be. Especially in the events domain, I think UI/UX plays a big role in the app's adoption and usability.

Exploring the use of Avalanche subnets could offer event organizers further customization options, potentially revolutionizing event personalization.

Developing Farcaster frames that allow users to purchase tickets directly through the Farcaster network will enhance accessibility and user engagement.

And also some smaller implementations, like allowing the scheduling of Unpause in the selling of a ticket (right now we can only schedule the Pausing; Unpausing needs to be performed manually) and allowing users to select only one or more NFTs for redeeming (right now, the allowed person scans the wallet address and he gets all the NFTs owned by the participant, which can make it harder for the allowed person to find the right NFT to redeem)

Also, I will want to write some blog posts on certain challenges that I have faced and how I have handled them effectively. I really think it will help others.

My ultimate goal is to see Chain of Events adopted for actual event hosting, proving its efficacy and utility in the field.

Built With

Share this project:

Updates