As Scrypto v0.5 got released and we are working hard on bringing the Radix alphanet up (more info on how this influences the challenge below), we are once again launching a Scrypto competition. This is a great opportunity for you to learn Scrypto and be among the first to build awesome stuff with this technology. For this fifth challenge (yes time flies), you will have until October 11th to build a Scrypto package representing a Decentralized Autonomous Organization (DAO).
DAOs became popular with the invention of blockchain technologies and allowed groups of like-minded people to work together in a decentralized and trustless way. Do not worry if you don’t know much about DAOs. We will give more explanation of what they are and give examples in the next section.
Like the previous competition, a total of $15 000 worth of XRD will be divided between the author of the three best submissions. Also, everyone will get a DAO edition of the Scrypto competition NFTs (delivered once Babylon is out) and random participants will receive Radix-themed t-shirts!
The invention of smart contracts made the creation of trustless organizations (or DAOs) easier than ever. These organizations, whose rules are enforced by code stored at the smart contract level, allow a group of people to work together without having to trust each other and in a transparent manner.
A very popular DAO on Ethereum is MakerDAO and is the decentralized autonomous organization that governs the DAI stablecoin. Owners of the MKR tokens are able to participate in community votes to alter the different parameters that allows DAI to stay correlated to the US dollar. The parameters that you allow the community to vote on depends on what kind of DAO you are building. In the case of MakerDAO, MKR token holders are able to vote on the addition or removal of collateral types and the different global or vault-specific parameters for example. They can even vote on replacing certain modules (smart contracts) that are part of the MakerDAO ecosystem in case an update is required. With all that said, another part of this challenge will be to implement a governance system that allows on-chain voting in novel ways and with as much decentralization as possible while thinking about how your system will react when bad actors try to take control of it.
There are multiple ways of conducting on-chain governance. One popular way is for projects to create a new token that represents voting power. This is what the UNI (Uniswap), MKR (MakerDAO) and APE (ApeCoin) tokens are used for. The voting rights of someone increases linearly as they accumulate more of it. This incentivises the voters to vote on things that would be good for the protocol otherwise their stack of tokens could lose value. To distribute the token, projects can airdrop it to contributors, give them as rewards to the users of the platform or just sell them on a decentralized exchange.
A disadvantage of giving voting power linearly like this is that the system can easily get controlled by a small set of whales who have access to most of the token’s supply. People have thought of different ways to minimize this problem. For example, instead of making each token equal to one vote, you could use the quadratic voting algorithm in which votes are weighted quadratically. 1 vote could cost 1 token, 2 votes 4 tokens, 3 votes 9 tokens for example. This reduces the inequality of the system and gives more power to the minorities.
There are many other ways to design the governance system as you are working on your Scrypto package. We suggest you try and find an original way of doing governance. For example, if your idea permits it, instead of relying on the number of tokens that a user has you could use the concept of conviction voting where users vote on a set of proposals in a continuous manner and the longer they keep their preference for the same proposal, the “stronger” their conviction score gets. You can also implement other features on top of the governance system. An example of this is how Uniswap implemented a system of vote delegation in their voting design. This allows users to choose a trusted third-party to vote for them.
There is no governance system that is 100% perfect. While designing a governance system, you will have to make some compromises. How will you handle bad actors trying to take control of the DAO? How will you reduce inequality? How do you work with the idea that bribery can happen? Those are all questions that we suggest you ask yourself while designing your submission to this competition.
Examples of DAOs
Here are some examples of DAOs in the real world to help you as you are planning your submission for this competition. Please note that the examples listed here are simply ideas and that the definition of a DAO covers a vast set of different applications. Don’t hesitate to come up with an original DAO application or take inspiration from a dApp that isn’t listed below.
We talked briefly about how MakerDAO works. This could give you some inspiration to build a DAO that manages a protocol’s parameters like a decentralized exchange or a lending protocol. Or another type of DAO that might interest you are DAOs that allow a community to manage and distribute funds to various projects like Aave grants and gitcoin.
Another interesting use case for DAOs that you could explore is a service DAO. You could build an organization for a community of web3 developers or NFT artists to find projects to work on and get paid in a transparent and predictable way while removing the middlemen like the Developer DAO did. This idea of removing the middlemen is in part what makes DAOs so powerful. A good example of that is Audius which is a decentralized music-sharing protocol that puts the control in the hands of the artists and the music listeners using a DAO to offer a fairer alternative to existing streaming platforms. Another example of removing the middle people is how Decrypt is decentralizing media and offering a DAO platform that helps directly connect both writers and readers around the world.
As you can see, you have many options and directions that you could take when planning your submission. The limit is your imagination. What will you build?
Why Scrypto is perfect for designing DAOs
Scrypto is perfect for building DAOs because it makes it easier to write secure code. Code security is a very important aspect as DAOs define the core rules of an organization and they potentially manage a lot of money. One of the first DAOs (called The DAO) on Ethereum shook the whole crypto community when an attacker drained 3.6m ether from the contract. In response to this event, the Ethereum team proposed a hard fork where the stolen funds were returned to their owners.
Also, Scrypto makes many parts of your dApps easier to write and reason about - thanks, in part, to the asset-oriented approach of the Radix Engine. With Scrypto, just like assets are built into the platform, the authorization system that restricts access to your component methods can also be defined at the platform level. No need to write complex functions and handle user addresses just to authorize access to your dApp. Scrypto also has primitive types for handling resources. It is thus very easy to model the asset movement flow in an intuitive and safer way. No need to communicate with external components to fetch and update the balance of the DAO funds like on EVM chains, for example.
For the monetary prizes, we are going to split $15 000 worth of XRD between the three best submissions. First place will get $8500 XRD, second gets $4500 XRD and third gets $2000 XRD. All participants will also receive a one-of-a-kind non fungible token representing their participation to this competition (sent to your wallet after Babylon) and we will randomly select 10 participants to receive Radix-themed t-shirts.
The greatest prize will be the knowledge you will acquire by participating in this competition. We often hear, from people participating in the Scrypto competitions, that it allowed them to one-up their Scrypto skills and become more confident writing Scrypto blueprints in preparation for Babylon. But don’t take it from us. Read this quote from NellySayon who participated in the previous competition with only a couple of weeks into learning Scrypto:
“I’m part of the ScryptoClassOf2022 and we just finished the basics of Rust when [the portfolio management and yield farming] challenge was announced. Anyway I just needed to give it a try and I can honestly say I would never have learned that fast without the participation” - NellySayon
The Judging Criteria
When the challenge is closed for submissions, the RDX Works Scrypto team will review the submissions and decide on the three winners based on these criteria:
- Quality and asset-orientedness of your code. Refer to our design patterns page.
- Breadth of functionality
- Creativity of the concept
- Quality of the documentation and comments in the code for others who wish to use the blueprint
How to participate
To participate in this Scrypto competition, please do the following:
- Register for the challenge by reading and reacting to the message in the #scrypto-challenges channel on our Discord server. This will give you access to a voice channel where we will be regularly answering questions about Scrypto and the competition.
- Install the Scrypto toolchain and make sure you are on version 0.5.1 with “scrypto --version”.
- Fork the challenges repository.
- Clone the forked repository on your local environment.
- Start a new scrypto project with the command “scrypto new-package [name]” inside the “5-DAO” directory.
- Before the deadline on October 11th, 2022 at 11:45 pm UTC, commit and push your project folder and create a pull request here.
- Come say “Hi!” in the #scrypto channel of our Discord server. The community will give you a warm welcome and help you with whatever question you might have.
Here are some resources to get you started with your submission:
- Get started with Scrypto by reading the documentation.
- Read about governance designs. This article by CoinTelegraph outlines different things to think about when designing a DAO.
- Read about popular DAOs like UniSwap, MakerDAO and AAVE
- As always, the Radix Discord and developer Telegram are the best places to ask your questions.
- We are going to hold weekly voice calls in the private competition voice channel. You will need to react to the message in the #scrypto-challenges channel to have access to this voice channel!
Details of the Challenge
- Your entry must be built with Scrypto v0.5 or later.
- You can submit multiple entries but only one will be considered for the prizes.
- The competition starts on September 13th, 2022 at 9:00 am UTC. All entries must be submitted no later than October 11th, 2022 at 11:45 pm UTC. The winners will be announced by October 19th, 2022.
- $15,000 value of XRD will be shared between 3 winners. 1st gets $8,500 XRD. 2nd $4,500 XRD and the 3rd $2,000 XRD. The value of XRD will be based on the spot price when we send the tokens.
- Decisions on the winners are at the sole discretion of the RDX Works team and the decisions are final.
- We will keep track of the NFTs and their owners internally until after Babylon release when they will be minted and sent to Radix addresses provided by each participant.
- All entries are subject to the Radix competition terms and conditions. Winners will be required to disclose their name, DOB, and country of residence to receive any XRD prizes.