DeCode
Languages, Libraries & Stacks
Share project
About DeCode
DeCode is an experimental decentralized coding contest platform designed to bring an alternative to existing coding platforms like codechef.com and codeforces.com.
Traditional platforms often lack transparency and trust in their judging and ranking processes. DeCode aims to address these issues while providing a secure, decentralized environment for competitive coding contests.
Since running a competitive coding platform involves high traffic and extensive computation, it's not feasible to simply run it on a smart contract. To overcome these limitations, DeCode makes use of Cartesi, a Layer 2 solution for Ethereum and other L1 blockchains based on the EVM.
Cartesi's Optimistic Rollups provide higher processing power at lower expenses without compromising on speed and languages supported. In fact, DeCode's Cartesi code is written in JavaScript.
DeCode also utilizes Covalent for creating a leaderboard of people owning their token and the Push Protocol for sending important notifications.
Technical Details
DeCode uses the ELO Rating System to update user ratings after a contest ends. Implementing this system on a Solidity smart contract can be computationally intensive and expensive. To tackle this, the team uses the "calc-u-rating" npm package for ELO Rating logic, which is compiled using webpack to create a single entry point (dist/main.js) for execution on the Cartesi Machine.
Key Technologies:
- Cartesi: providing computational power on Linux VMs for better performance and concurrent job processing
- Covalent: A unified API for increased visibility across Web3 data points
- Push Protocol: A Web3 communication network enabling cross-chain notifications and messaging for DApps, wallets, and services
DeCode's platform also integrates Web2 technologies, such as Next.js with Tailwind CSS, DigitalOcean, and MongoDB.
Challenges Faced
The team faced a few challenges during the development process:
- Bulk transfer of ERC20 tokens failing frequently.
- Setting up the environment for the Cartesi Machine and deploying it.
- Implementing push notifications when the user is still active on the website.
Despite these challenges, DeCode's experimental and decentralized coding contest platform demonstrates a promising use case for Cartesi's Optimistic Rollups and other Web3 technologies in the competitive coding space.