Inspiration
The inspiration behind creating a decentralized marketplace for E-vouchers and coupons stemmed from a recognition of the inefficiencies and limitations within traditional NFT Marketplaces. I have always been fascinated about private NFTs and Metadata control, and I wanted to create a mechanism where traditional NFTs can store secure information which can only be accessed by the token owner. The lack of decentralized marketplaces available for the trading of E-vouchers and coupons led me towards creating Scratch Marketplace.
What it does
Scratch Marketplace is a place where users can securely buy and sell E-vouchers and coupons as ERC721 NFTs in a decentralized way. Empowering users with the freedom to transact securely, the application was designed to redefine your E-voucher experience. Scratch uses AWS Lambda and API Gateway to ensure privacy and security. These technologies work together to verify user-signed messages, guaranteeing that only authorized users can access NFT data.
How I built it
By combining the technology of smart contracts, amazon web services and frontend integrations I was able to create Scratch. The smart contract which is responsible for all on-chain transactions was deployed to the XRPL EVM Sidechain testnet (0x8036156dB4Cf9D561e459B83c0b8Fc884482A9C4). A Lambda function was setup to verify the user-signed message using their public key and the API-Gateway helps the user to GET and PUT data.
When the user mints a Coupon (or) Voucher as an NFT, The secret Redeem Code entered by the creator is stored in Amazon S3 storage using API Gateway PUT method. Each file is given a unique UUID for its identification. Then the metadata of the NFT is uploaded to IPFS using Pinata. This will contain the NFT description with the UUID of the Secret Redeem Code file. Now when a user tries to fetch the Secret Redeem Code file through API Gateway (GET method) they must sign the UUID of the Secret Redeem code file they are trying to access with their private key. Then the Lambda function verifies the signed message using the NFT owners public key, and will return the Secret code only if the user is the owner of the NFT. This makes it impossible for anyone but the owner to access the Secret code, hence assuring the most robust security.
Challenges I ran into
This was my first time using amazon web services, so it took sometime to get familiar to Lambda functions and API-Gateway. But after getting the hang of it, I was able to build the key aspect of this project which was user verification. I was also new to the XRPL EVM Sidechain but the documentation and my previous experience with solidity made me quickly grasp it.
Accomplishments that I'm proud of
With minimal experience with AWS It is fantastic to have fulfilled a working version of a decentralized marketplace where users can buy and sell E-vouchers and coupons securely. I have made a mechanism that makes traditional ERC-721 NFTs contain sensitive information such as the Redeem code that is not available to the public and could only be accessed by the owner of the NFT.
What I learned
I had used a variety of tools to build my project, and learned a lot about Lambda functions and REST-APIs thorough this hackathon. I was also able to seamlessly integrate the Smart contract on the XRPL EVM Sidechain and the Lambda function on AWS with the frontend user interface.
What's next for Scratch Marketplace
I am very passionate about this project, and intend to continue to build it out. I am looking forward to making an incentive system which rewards users for purchasing and collecting similar E-voucher and coupon with unique NFTs. Then building a featured page for promoting the E-voucher (or) coupon and spend more time on making the user experience as smooth and easy as possible and reduce gas fees.

Log in or sign up for Devpost to join the conversation.