On February 18, we launched our first Scrypto Challenge to let our growing developer community show off their skills – and show what Scrypto is capable of, even in its current early form. The results of the challenge are now in, and we’ve got some truly excellent winners to announce. The entries show that not only is great DEX functionality possible with Scrypto, but that our developer community can do it better than has been possible before with existing smart contract languages – in just a few weeks!
In the last few weeks, the Radix developer community has been hard at work on their entries to our first Scrypto challenge. A reminder on the rules: Participants had four weeks to build a Scrypto blueprint that implemented some form of exchange functionality. Anything was fair game, as long as it stayed within the realm of exchange.
The submissions were judged on the following criteria:
- Quality and asset-orientedness of the code
Did the developer follow asset-oriented design patterns such as identifying users with badges and letting the user withdraw instead of sending tokens directly to an address?
- Breadth of functionality
The more the user of the blueprint and component can do, the more points the developer gets.
- Creativity of the concept
Did the developer implement something that we didn’t think about or found original solutions to attack a specific problem?
- Quality of the documentation and comments in the code
Did the developer write a documentation explaining how the blueprint worked and how to test it? Did they write comments in their code to help people understand it?
- Usage of the transaction manifest
Did the developer use the transaction manifest, introduced with Scrypto v0.3, to showcase composability and allow easier testing of the blueprint and component?
The results were immensely impressive, in quality, creativity, and documentation – so much so that we needed an extra week to give the submissions proper attention and pick the three winners. The choice was truly difficult!
Huge congratulations to all who entered; you are among the very earliest of Scrypto developers (a fact which you will be able to prove immutably with the participant NFT after Babylon launch!)
Without further ado, let’s get to the winners…
1st place: Hareswap by devmannic
Devmannic really went all-in for this challenge, with their Hareswap blueprint. They implemented parts of AirSwap, a smart contract on Ethereum allowing users to match maker/taker exchange orders off-ledger, but securely resolve the trade on-ledger in a single transaction.
This approach has many advantages compared to other solutions like reducing counterparty risk, price slippage, and front running. But devmannic took it further than the original Airswap by making deep and clever use of the Radix transaction manifest to eliminate a huge amount of complexity required in the original implementation. Also included are cool features like tokenized orders for NFTs that a user does not yet possess. It’s an amazing demonstration of the advantages of the asset-oriented approach in both Scrypto and our transaction model!
The code is extremely well documented, offers a lot of functionality and flexibility to the user (much of which we didn’t even start to describe here - it’s worth reading the documentation yourself), and even offers helper scripts to generate transaction manifests with custom arguments. All around incredibly impressive work.
Devmannic will receive the first prize of $1000 in XRD.
[It took me] maybe about 8 working hours coding after 2 hours of planning to get the majority of the DEX developed (not including comments/docs/tests). That's kind of mindbogglingly efficient to get the idea on the table. I absolutely spent more time trying to figure out the inconsequential crypto library I used (which was poorly documented) than doing any Scrypto-specific on-ledger development. - devmannic
2nd place: RadDex by 0xOmar
RadDex is an automated market maker (AMM) exchange, just like Uniswap. Unlike orderbook exchanges, AMMs make trades against a pool of liquidity instead of matching two orders togethers. This pool-based-liquidity pattern gives DeFi huge advantages over traditional finance.
One thing that really stood out in 0xOmar’s submission was the modularity made possible by building the liquidity pool component separate from the main exchange component. This, for example, allows people to easily reuse the liquidity pool component for a totally different project.
0xOmar also did an amazing job documenting their code and made it really easy to test their example by providing seven transaction manifests for actions such as instantiating a component, adding liquidity and swapping tokens. It’s an example of a truly top-notch Scrypto blueprint that we think any developer should review closely.
0xOmar will receive the second prize of $600 in XRD.
For approximately 2 months now, I’ve been learning Scrypto and using it to build various dApps and I’m blown away by Scrypto and the Radix Engine as a whole! I believe that the fact that an AMM DEX can be implemented in 2 weeks or so speaks for how powerful yet simple and welcoming Scrypto is. - 0xOmar
3rd place: ChainDex by FR05T8YTE
ChainDex is a decentralized order book exchange – but with a clever twist. It uses linked lists of NFTs to keep the orderbook ordered, with each order represented as an NFT passed back to the user. When you place an order with ChainDex, the NFT returned contains data like the requested price, amount of tokens and a link to the next order in the chain. The component is then able to find the best order by going through the list of NFTs one by one until it finds the one with the best price for your order. This is a great example of the asset-oriented way by representing unique things as NFTs rather than elaborate internal tracking.
FR05T8YTE will receive the third prize of $400 in XRD.
While I was coding ChainDEX I found Scrypto to be powerful and easy to learn. I come from a background of Java and C so it took some getting used to the pickiness of the language, but once I did I found the compiler to be very helpful. It feels hard to do things wrong. I think the asset-oriented paradigm is easy to understand and works well, but some features do still need to be added to make sure there are no limitations. Which is understandable considering Scrypto is only at v0.3! - FR05T8YTE
Special mention: Nfddex by noelserdna
While it didn’t make our top 3 entries for prizes, we thought noelserdna’s entry deserved recognition for the creativity of its concept. Usage of NFTs to represent carbon credits and enabling the sale and purchase of these credits on an open market is a wonderful example of how DeFi can expand beyond its current form and start impacting important problems in the world outside what we might normally think of as “finance”.
We would like to congratulate everyone who submitted a blueprint to this first Scrypto competition – and hope you’ll join us again for the next challenge! Everyone will receive a special NFT representing their participation in this event (after Babylon launch when we can issue the NFTs properly).
We hope to launch our next challenge for another DeFi application area soon! If you would like to participate, we suggest joining our developer program to stay up to date with all events related to Scrypto.