One of the best ways to inspire developers has always been hackathons. Hackers get a full cup of coffee and prepare themselves for a coding marathon. We have run countless public hackathons, and every time the builders in the community surprise us with their out-of-the-box problem solving and innovative use of Stacks. However, we thought an internal hackathon would be a perfect way to leverage the brainpower of all the employees at Hiro while also having some fun!
In an unprecedented move at Hiro, we halted normal day-to-day work to give the hackathon three whole days of undivided attention. We truly wanted to give everyone the free time and flexibility to dream up the coolest possible ideas they could.
We broke down the rationale for an internal hackathon and set explicit goals. First and foremost, in the words of Spongebob Squarepants: F-U-N! 2021 has been heads-down for everyone at Hiro, so we wanted an opportunity for people to put normal work on the backburner for a bit and spend some time hacking on ideas they found exciting and enjoyable. Second, we wanted to try giving engineers unstructured time to explore passion projects and channel creative energy. Third, with a couple of new Hiros on the team and our operations still being remote-first, we thought it was important to catalyze some team bonding! Last but not least, we wanted to see what would happen when our engineers sink their teeth into our own products. Dogfooding is a fantastic way to learn more about the technology that is being developed, and the hackathon projects really took advantage of all the components Stacks offers.
What resulted was magical: Three whole days of uninhibited hacking with each and every Hiro collaborating to create immensely valuable projects. Github repositories lit up with activity, memes became the standard form of communication in the Discord, and all the teams buckled-down for a shot at the hackathon podium. Nobody was messing around with top-shelf prizes up for grabs like custom Stacks Crocs, personalized Nike shoes, or the grand prize of a choice between a WHOOP membership or Oculus Quest 2.
New toys are cool and all, but the real grand prize was a totally new, custom NFT created by Hiro Designer Eugenia Digon. This one-of-a-kind digital artwork represents all the hard work that went into the hackathon, and will live on the Stacks blockchain forever! It embodies the Hiro value that the theme of the entire hackathon: We Engineer Moonshots. Hiro has always thought far into the future, and has engineered technology to usher in the next era of the internet and digital interactions. This NFT signifies the radical thinking and futurist mindset personified by each and every Hiro.
When the dust settled, the entire Hiro team came together on Friday for a Demo Day celebration that left jaws on the floor. Each group of hackers had the chance to give a short presentation on their experience building their project, and some were even brave enough to show off live demos! Eventually, the cream of the crop rose to the top: A protocol to exchange BTC with any fungible or non-fungible token defined in Clarity. A memecoin implementing a new proof-of-meme protocol based on everyone’s favorite Hiro pet. Totally revamped deployment workflow and documentation for Gaia storage hubs. In just three days, Hiro made blockchain magic happen and cranked out some crazy crypto creations.
First Place: ???
As much as we would love to share with you details of the hackathon project that took the top spot in the internal hackathon, we’ll have to keep you on the edge of your seat a bit longer. This hackathon team came up with such a rockstar idea, that they want to continue to develop the platform and bring it to production! It’s an absolutely out-of-the-box idea, that lives at the intersection of NFTs, token economics, and fashion. The team is so excited to unveil their project to the community soon, and recommends you start to clear out some space in your wardrobe…
Decentralized token exchanges have exploded in popularity as trusted alternatives to centralized exchanges such as Coinbase, Gemini, or Binance. Being able to swap tokens or provide liquidity in a trustless, decentralized manner is a huge benefit blockchain offers. In the Stacks ecosystem, we take immense pride in our connection to Bitcoin and the way the Proof-of-Transfer consensus mechanism leverages BTC’s security. However, we want even more ways for Bitcoin and Stacks to interact, and incentivize BTC holders to experiment with other protocols.
WhaleStreet is hot on the scene, ready to pave Main Street in the Stacks (de)financial district. This team created an entire protocol to exchange BTC with any fungible or non-fungible token defined in Clarity.
Hiro Engineers Ludo Galabru and Pavitthra Pandurangan set out with two distinct design goals. First, they wanted WhaleStreet to be able to perform the token swaps with a single transaction, no daisy-chaining, wrapping, unwrapping, or conversion required. Second, they wanted to allow a BTC holder to perform a token swap without holding any native STX tokens in their wallet. Overcoming these two constraints would drastically reduce the barrier of entry for newcomers, and open up the Stacks ecosystem to even more Bitcoiners.
They started by implementing a direct, P2P orderbook. However, it could be difficult sometimes to find the exact, desired trade a user was looking to execute. The team decided to upgrade their design mid-hackathon based on learnings, which is what good development is all about! Their final, improved design evolved the P2P orderbook into a fully-fledged liquidity pool. This liquidity pool is managed by the WhaleStreet protocol, and allows for much quicker, specialized trades.
Let’s say Alice wants to trade her BTC for some of Bob’s Clarity tokens that he already added to the liquidity pool. Alice simply pings the Whalestreet node and receives template for structuring her swapping transaction. She then submits her transaction on the Bitcoin blockchain. The WhaleStreet node then automatically monitors the Bitcoin blockchain for when Alice’s transaction is confirmed. Once Alice’s BTC transaction is verified, the Clarity tokens she wanted are transferred to a new STX wallet that she controls. Finally, after all is said and done, the WhaleStreet protocol rebalances the liquidity pool, and will even halt transactions if there isn’t enough liquidity.
Stacks has always championed its unique connection with Bitcoin, and now we are truly seeing that potential be fully investigated by powerful applications such as WhaleStreet. Bitcoiners want to experiment with DeFi, token swaps, and other recent blockchain innovations. Enabling them to obtain Clarity tokens with a single transaction and no STX balance is efficient and accessible.
Once in a generation, humanity is gripped by a cultural movement so visceral, so captivating, that there is no stopping its upward potential. In 2021, one carefree canine emerged as the alpha dog. No, I’m not referring to the mascot of the infamously popular Dogecoin. Move over Shiba Inu, ‘cause this powerful Pomeranian is on the launchpad ready for takeoff.
Say hello to Bimba, the unofficial animal mascot of Hiro Systems PBC. Bimba is the trusted companion of Mark Hendrickson, Product Lead on Hiro’s UserX team, and is constantly making appearances in the background of Zoom calls. Bimba is such a positive, iconic force in the blockchain industry, that it just made sense to leverage her awesome cuteness as the foundation for the world’s next big cryptocurrency.
Enter $BIMBA coin, a prototype Clarity token on the Stacks blockchain. If implemented, $BIMBA would be a fungible token that uses a totally novel Proof-of-Meme (PoM) protocol, and incentivizes content creation. Conceptually, users would be rewarded with $BIMBA by spreading the message on social media with memes and tweets. Bimba not only embraces the power of memes, but leverages it to catalyze participation.
BIMBA is only as strong as its community, and the spirit of BIMBA should be alive within each and every crypto enthusiast. As outrageous as the proof-of-meme protocol appears, it is actually a genius way to bootstrap a community and incentivize involvement. People already spent hours on the internet creating memes, it is only fair they should be compensated for their content generation. The project also exemplified how easy it can be to spin up a token in Clarity on Stacks. In just three days, Team BIMBA took a funny idea and turned it into a polished product.
G^3: Great Gaia Guidance
Gaia has always been a powerful tool in the toolbox of Stacks developers. Having a dedicated location to quickly store and retrieve data is absolutely critical when building smart contracts or decentralized applications. The Gaia storage system allows you to store private application data efficiently off-chain, but still access it securely with Stacks applications.
One hackathon team, made up of infrastructure wizzes Charlie Cantoni and Jesse Wiley, took it upon themselves to give Gaia the makeover it truly deserved. Not only did they completely reconfigure the deployment workflow, but they also overhauled the documentation to assist developers every step of the way.
The entire Gaia workflow has been overhauled. The Amazon Machine Image (AMI) was update to be Debian-based, which is much easier to work with and presents drastically less constraints. Cross-cloud interoperability is also now possible if you wanted to use a different cloud provider like Azure. Last but not least, both EC2 and S3 storage support is baked directly into the template.
Deploying a new Gaia instance is as easy as ever. A new tutorial has been authored that provides guidance every step of the way. There is now a button directly in the docs that will take you to the new AWS Cloudformation template. Additionally, a docker-compose option has been added that will drastically simplifies the deployment that happens on the virtual machine. From the template, you simply enter various configuration details for the hub (such as instance type) and it’s deployed in a couple clicks. Now you’re all ready to upload or read data straight from the deployed Gaia storage hub!
A huge shoutout to Documentation Engineer Patrick Grey, one of Hiro’s newest additions, on his contributions to the Gaia revamp. He joined the week of the hackathon, and in just five days he had already submitted and merged his very first Github pull request! A whooping 403 lines of stale content were removed from the docs. The Stacks community can look forward to Patrick giving his undivided attentions to the docs in an effort to make them as informational and accessible as possible.
RxStacks is a reactive client library for the Stacks Blockchain.
A common pain point for many Stacks developers is the difficulty building apps that accurately represent the current state of blockchain operations. The best example is the lifecycle of a transaction. Consider all the states when you send some STX or make a contract call: pending broadcast request, broadcast success (or fail), transaction added to the mempool, and finally the transaction is mined and included in a block.
For example, let’s say a Stacks developer is building an app that has a user interface updating users as their transactions progress. This requires a handful of different components: HTTP polling requests, and a soup of logic to manage it. These can be cumbersome and not very fun to wrangle. Yet, to provide a compelling user experience, apps must give feedback of these actions.
RxStacks asks “how this can be easier?”. By thinking of these events as streams of data, we can utilize Observables, and compose independent events together to create a single lifecycle stream.
To do this we're using Socket.io in the Stacks Blockchain API to emit events as they happen, and have released @stacks/rx, a framework-agnostic client library using RxJS that exposes these events as data streams.
The marble diagram below demonstrates how multiple streams can be composed.
The RxStacks team launched this onto the Stacks testnet, and would love feedback from the community.
To get started with the beta version, simply run this command in a terminal window: npm install rxjs @stacks/rx
Best of the Rest
We had so many incredible projects come out of a week of uninhibited hacking that it was impossible for all of them to take home the coveted prizes. Here’s a glimpse of some of the other projects that may not have been as spectacularly sensational, but still solve a hard problem or leverage Stacks in unique ways.
Private Testnet On-Demand
Spawn a private, hosted testnet from a simple command line.
Hiro Employee User Guide
Compiled our internal employee resources, policies, practices, and benefits into a more navigable single source of truth for all employee information.
The content working group at Hiro buckled down for three straight days of authoring potential future blog posts.
A few Hiros took on the herculean task of reorganizing, cleaning up, and renaming the wealth of information we have buried in various Dropbox documents.
Smart Contract as a Backend
Tooling for having one contract, one static site, and no backend to maintain in a decentralized application.