deShare is a new sharing platform to share thoughts, projects, and ideas. It is decentralized, on polygon chain.
Our team members, being brand new to web3, wanted to remake a web2 product we love in web3. Enter deShare, a sharing platform that is completely decentralized, onchain. It is deployed via smart contracts on the Polygon network. deShare works off of two NFTs, deShare Posts and deShare Members. To create a post, a user must hold a deShare Member NFT. This is to prevent bot wallets from creating spam posts. As well, only members may upvote posts, also to prevent bots from spamming the upvotes. For now member tokens can be minted by anyone, but before deploying to mainnet we would like to iron out our token economics first. We ideated many ways to distribute deShare Member NFTs, but for now we think a random lottery could work - every week, our smart contract could choose a random selection of wallets that are allowed to invite 3 members.
How it's made
Writing contract to contract interaction in our first days using Solidity was a fun challenge but we pulled it off. Our Posts NFTs have a few additional features to ERC721 - upvotes (which emit custom log events with the updated vote count to enable dApps to quickly get updated vote counts), and custom user created post metadata. Our frontend was completely built from scratch, first designed in Figma, then built in React. Our React app is deployed on Firebase, and uses ethers.js to interact with the blockchain. We only use ethers to write to smart contracts, ie minting member tokens and minting posts. Covalent is used to read any onchain data. When a user creates a new post, this first uploads the post title and description to an ipfs storage. Then the metadata uri is used to mint a deShare Post (using ethers.js) To display all the posts efficiently without needing to read directly from the blockchain, we used Covalent. We take advantage of the Class-A/Get-NFT-token-IDs-for-contract/ endpoint (and the starting/ending block to display newer posts) and the Class-A/Get-NFT-external-metadata-for-contract/ endpoint to get the posts name and description. We also wanted to use Class-A/Get-log-events-by-topic-hash(es)/ to view our custom Upvote event (has newest upvote count) emitted from our smart contract, but the endpoint was not working (the decoded info was null) Our smart contracts currently hold a vote function that emits an Upvote event that we hoped would be logged by blockchain aggregators such as Covalent and Moralis, enabling quick lookup for upvoted posts. We didn't have time to implement the voting button or counts on the front end, as we had some trouble with the log events by topic endpoints.