Inspiration

Online discussion platforms are powerful spaces, but the benefit goes to the platform while the participants get near to no benefit out of it. Inspired by HackerNews and Reddit, we built Samvad, which is decentralized and incentivizes meaningful discussions.

What it does

Samvad gives you a strong financial incentive to post quality content. You earn when people reply either to you, or someone who replied to you. With this specific geometrically decreasing incentive, the upside of posting quality content is high. You stop earning if you cross a specific number of downvotes, which prevents spam and overly controversial discussions who want to game the system.

Samvad works cross-chain. While the base contract is deployed on Sepolia, you can interact with it from any supported chains. Currently our cross-chain contract is deployed to Avalanche Fuji, with more networks coming soon.

You can participate in Samvad by adding some CCIP-BnM coins (we call paycoins) to your custodial account. Posting is currently free for proof-of-concept. Replying however costs 0.01 paycoins. If the posts and replies are represented as a graph, half of the paycoins go to the parent reply, 25% to their parent and the remaining 25% further up. Your incentive to spend coins to reply is that if you add real value so people engage with your content, you break-even with just 2 direct replies. This kind of incentive doesn't dilute with how long the reply thread is, because only the 3 replies to the top of the current one will get the incentive, no matter the depth.

Samvad also shows you near real-time stats of how many people have opened a post in the recent past, so people can choose which extent of audience to reach. Samvad in it's current implementation also shows notifications when people engage with your content.

How we built it

From the ground up we built Samvad in a cross-chain fashion. While we have one central contract on the base chain (in this demo, Sepolia) which contains the on-chain graph and balance tracking of wallet ids, it was built to be interacted with from any chain which has our cross-chain contract deployed in it. We have our SamvadCC (Samvad cross-chain) deployed on Avalanche Fuji, from where you can add and withdraw paycoins and create posts and replies.

Our implementation of CCIP involves both token and data transfers. We support 4 main transactions: add coins, withdraw coins, create post and create replies. Coin addition transfers paycoin from source to destination through token and data transfer, with the data representing who's account to credit the balance to. Create posts and replies are data transfers. Withdraw is a bit more involved because it involves a CCIP data transfer from the source chain to the destination chain containing the balance of coins we want to withdraw, and when the destination contract (base contract) receives this request it issues a CCIP token transfer from base chain to cross chain with the token amount, which is credited to the user's wallet on the external chain.

Challenges we ran into

If we use CCIP functionalities, remix shows infinite gas. Often when we tried to execute the transaction, it shows errors while estimating gas fees. We thought the sender contract doesn't need to extend CCIPReceiver. However when we extended the contract with that and implemented _ccipReceive and a fallback coin accepting function, the transaction issue seemed to be fixed.

Another issue was deciding which chain to launch the base contract on. First we decided to do it on a L2 due to the low gas costs. We quickly discarded this idea when we realized the time needed for source finality is much greater from an L1 -> L2 than it is from L2 -> L1. We wanted a good UX, so decided to deploy the base contract on Sepolia (and later, Mainnet).

Accomplishments that we're proud of

In n terms of CCIP, our proudest accomplishment is realizing that instead of just using CCIP to transfer assets or data, we can also use it to trigger another CCIP request, sort of a talk back, or a request-response style communication. We are also really proud for coming up with this style of incentivization. The risk-reward and incentive for a replier is effortlessly simple and clear. Such a form of incentivization hasn't been tried before and we think a discussion platform where quality matters far more than quantity is the perfect domain to apply this to.

What we learned

We learned about Chainlink offerings. While we used CCIP for our use case till now, we do want to intergare with other Chainlink products like functions to bring more cross-chain functionalities or off-chain data onto our platform.

What's next for Samvad

Samvad is going to Mainnet. We didn't just build it for the hackathon. We want to transition into a DAO. Our token has buy pressure from the clear incentivization structure we provide, and strong token hold incentives for people to vote on proposals so they gain a longer term advantage. We expect this dual utility to add value to our token. We will bootstrap a liquidity pool at a slight undervaluation, and will have USDC deposit incentives there. All of this will follow an incentivised testnet phase and an airdrop. Therefore, in the near future we want to work with Chainlink in order to get our token contracts whitelisted and start transferring it cross-chain, BnM style.

Built With

Share this project:

Updates