Inspiration:
Our inspiration for this project stems from the recognition of the tremendous potential of affiliate marketing and the desire to create a platform that incentivizes both buyers and sellers. We noticed that affiliate marketers who excel in selling products often earn higher commissions and gain elevated positions within the companies they work for. With this in mind, we envisioned a marketplace that people would love to patronize, where buyers receive governance tokens as compensation for their purchases, and sellers are rewarded for their contributions. By incorporating token rewards and incentives, we aim to create a unique user experience that fosters an engaged community of buyers and sellers.
What it does:
Our marketplace revolutionizes the traditional buying and selling experience by integrating NFT/token rewards and incentives. Buyers can browse a wide range of products and make purchases like they would on any e-commerce platform. However, in addition to acquiring the desired product, buyers receive NFTs as rewards for their transactions. These NFTs/tokens hold value and can be collected, traded, or used for various purposes within the platform. On the other hand, sellers are incentivized to list and sell their products in the marketplace through various rewards, fostering a vibrant ecosystem.
How We built it:
We build our marketplace, we utilized the Fantom blockchain, known for its scalability and low transaction fees. We developed a web3 application using technologies such as Django for the backend and a web3 wallet service provider MetaMask for seamless integration with users' wallets.
We implemented features such as user registration, product listing, order placement, checkout processes, and transaction processing. These functionalities are enabled through smart contracts written in Solidity, deployed on the Fantom blockchain using the Foundry framework. Our smart contracts handle various aspects, including product listing, order processing, reward distribution, and trust verification between buyers and sellers.
Connect Wallet:
- Web3 Registration, We enabled users to register and log in to the application using their connected web3 wallets MetaMask (we only integrate metamask wallet provider for now). ## *Selling Product: *
- When a user posts a product, the product details are sent to a smart contract.
- Every seller pays a Posting Fee (This fee is used to incentivize the buyer and also this fee is used to rank the product on our application product list page and home page for users to view) The higher the posting Fee the high-ranked the product.
- We developed a smart contract to receive and store the product details, as well as handle the necessary calculations for posting fees
- Django, our chosen backend framework, listened for events emitted by the smart contract to fetch the product details and perform any required business logic.
- The product information was then displayed on the frontend, allowing potential buyers to browse and interact with the listed products.
Buying Product
- Users could place orders for products they wished to purchase.
- The order details, including the product ID, name, price, and rewards, were sent to the smart contract.
- Django listened for events emitted by the smart contract to fetch the order details and displayed them in the user's cart on the frontend.
- This functionality enabled users to easily add products to their cart and proceed with the checkout process.
Checkout Product
- Once a buyer decided to proceed with the purchase, they initiated the checkout process.
- The checkout details, including the product ID, name, buyer's address, price, and rewards, were sent to the smart contract.
- We developed a smart contract function to process the checkout, which involved transferring the funds from the buyer to the smart contract address.
- Django listened for events emitted by the smart contract to fetch the checkout details and displayed them to the seller for further processing, such as shipment arrangements.
Cart and Checkout
- The Cart page displayed the list of products buyers wanted to purchase, along with the associated NFT rewards for checkout.
- The Cart page has two sections: ordered products for buyers and listed products for sellers.
- The Checkout History page had two sections: Buy Product History and Sell Product History.
- When a user bought a product, it appeared in the Buy Product History section, and when a user sold a product, it appeared in the Sell Product History section.
- The product status in the Cart page could be Order (default), Paid, or Received, reflecting the progress of the buyer's activities.
- The product status for the seller in the Cart page could be Listed (default), Paid, or Sent, representing the progress of their activities.
- Once both the buyer and seller changed the status to Sent and Received, respectively, the transaction took place, funds were transferred, and rewards were distributed.
- At this point, the product was removed from the Cart page and added to the Checkout History page.
Tokens used to buy items:
- Link : 0xfaFedb041c0DD4fA2Dc0d87a6B0979Ee6FA7af5F (for Testnet)
- USDT : 0x049d68029688eAbF473097a2fC38ef61633A3C7A (for mainnet)
Confirmation and Trust
- We implemented a mechanism for confirming the delivery or satisfaction of the product by the buyer. Payments were temporarily stored on the platform account.
- If a buyer paid for a product, the platform changes the product on the cart status to "Paid." on both sections, ordered products for buyers and listed products for sellers on the cart page.
- If a seller sent the product, they are able to change the product status from "paid" to "sent."
- If a buyer received the product, they are able to change the product status from "paid" to "Received."
- These status messages were displayed on the product in the cart, allowing users to track the progress of their transactions.
- If there were no conflicts, the platform allowed the seller to withdraw the payment, and the buyer received their rewards.
Transaction Processing
- Once the product was confirmed by both the buyer and seller, the funds were transferred from the smart contract to the seller's account and rewards were distributed to the buyer's account(70% of PostingFee).
- For selling products, the posting fee was initially transferred to the smart contract address, followed by the transfer of rewards from the smart contract.
- We implemented the necessary functions in the smart contract to handle these transactions securely, considering the confirmation process. ## Rewards
- We implemented a rewards system in the smart contract to track the buyer's and seller's transaction history.
- The reward amount is determined based on the amount of USDT spent or USDT amounts of product sold on the platform(We love to use a coin related to the fiat currency USD for transactions) and the corresponding reward tokens (TOM) is distributed.
- On the frontend, we created a UI component to display the rewards card, enabling or disabling it based on the buyer's and seller's transaction history.
- Clicking on an enabled rewards card triggered a function in the smart contract to handle the reward claim process.

Challenges we ran into:
During the development process, we encountered several challenges. Integration was a key area where we faced obstacles, as connecting various components, such as the web3 wallet service provider and smart contracts, required careful coordination and testing. Ensuring the seamless flow of data and transactions between the frontend and the blockchain posed technical complexities that we had to overcome. Additionally, ensuring the security and integrity of the platform and smart contracts demanded rigorous auditing and testing.
Accomplishments that we are proud of:
We are proud to have successfully built a New fully functional marketplace on the Fantom blockchain, providing a novel and engaging experience for users. Our platform leverages the power of NFTs and blockchain technology to create an ecosystem where buyers and sellers can benefit from their transactions in unique ways. We have implemented key features such as user registration, product listing, order placement, checkout processes, and transaction processing. Moreover, our focus on security and user experience has resulted in a robust and intuitive platform that we are proud to present.
What we learned:
Throughout the development process, we gained valuable insights and learned important lessons. We deepened our understanding of blockchain technology, specifically the Fantom blockchain, and its potential for building decentralized marketplaces. We acquired knowledge in smart contract development, including writing secure and efficient contracts, as well as integrating them with web applications. Additionally, we enhanced our skills in frontend and backend development, user experience design, and integrating web3 functionalities. The challenges we encountered also provided valuable learning experiences, improving our problem-solving abilities and fostering a stronger grasp of blockchain development best practices.
What's next for the project:
The future of our project is filled with exciting possibilities. We plan to expand our marketplace by attracting more buyers and sellers, fostering a thriving community. We will continuously enhance the user experience by incorporating user feedback and introducing new features. We aim to integrate additional functionalities, such as auction mechanisms, user ratings and reviews, and social features that encourage interaction among participants. Furthermore, we will explore partnerships and collaborations to expand the range of products available in our marketplace. Additionally, we envision integrating with other blockchain networks to provide more options and reach a wider user base.
Enhanced User Experience: Continuously improve the application's user experience based on user feedback, with a focus on streamlining registration, improving search and filtering, and enhancing overall interface design.
Scaling and Performance Optimization: Invest in scaling the application to handle increased traffic and transactions, including optimizing smart contracts, improving infrastructure, and implementing caching and load balancing techniques.
Integration with Additional Web3 Wallet Providers: Expand wallet integration beyond MetaMask to include other popular providers like Trust Wallet, Coinbase Wallet, or WalletConnect, offering users more options to connect their wallets.
By constantly iterating and evolving, we aim to establish our marketplace as a go-to platform for buyers and sellers, redefining the way people engage in e-commerce and rewarding them with valuable NFTs & governance tokens for their participation.
Log in or sign up for Devpost to join the conversation.