Tippable Q&A Forum on Polygon

1 minute read

Description

The Tippable Q&A Forum on Polygon is a prototype dApp that allows users to:

  • Post questions
  • Answer questions
  • Upvote/Tip answers using a native ERC20 Token
  • Swap the native token

All the above data lives on-chain on Polygon Mumbai.

The novel feature of this app is that everytime a user upvotes an answer, a “tip” is sent using the native ERC20 token, GOFLOW. If the answer creator has a native token balance of >= 10, they receive the tip, if not it goes to the address of the Forum’s smart contract.


I chose this implementation to incentivize participation in the tipping scheme, without forcing users to have to pay a fee upfront when posting a question. This way, users can freely post questions and answers with minimal transaction fees thanks to Polygon. But, if they want be elligble to receive upvote tips from other users, they have to acquire and hold the native ERC20 token. This also opens up other possibilities for the dApp itself to reward “power users” with the tips that the Forum contract address receives.

I also a built a simple swap tool/Automated Market Maker to exchange from a fake MATIC token, to the native GOFLOW token.

Live App & Code

The Tippable Q&A Forum on Polygon app is deployed live on Vercel, and on Polygon Mumbai:

Check out the code on GitHub for both the NextJS app, as well as the Hardhat Project files, Test files, and Solidity contracts »

More Info

This project was originally intended as a long-form tutorial for Pointer.gg before the company pivoted. I created a number of interactive explainer components to help explain the concepts of ERC20 tokens and Automated Market Makers (example above). Here are the drafts:

I’ve also distilled some of this information into an interactive, short-form blog article about ERC-20 tokens: