Stacks 2.0 and Skynet:
Bringing Reliable Data Storage to Clarity Contracts on Stacks 2.0
The Skynet and Stacks communities share long-standing commitments to decentralization. With this ethos in mind, both teams understand the importance of persistent data storage and accessibility as well as giving developers more seamless ways to build new decentralized applications.
Skynet is excited to expand upon the principles behind Stacks’ Gaia, a decentralized storage architecture for off-chain data: “Storing data off of the blockchain ensures that Stacks applications can provide users with high performance and high availability for data reads and writes without introducing central trust parties.”
With Skynet, Stacks and Clarity developers can reliably access data from anywhere and across applications. Storing these large amounts of data also won’t break the bank: storage on Skynet costs 10x less than centralized providers and bandwidth costs are 100x lower — without sacrificing performance.
These qualities make Skynet and Stacks natural complements in the growing dapp developer ecosystem. Now, Stacks apps can rely on Skynet’s storage foundation for data that is too large to be stored on-chain. When writing Clarity smart contracts, Stacks developers can also include Skylinks, immutable links to content uploaded to Skynet as well as pointers to SkyDB, a key-value store for mutable content.
To kick things off, our teams are sponsoring a bounty for the best tutorials on how to combine Skynet and Stacks.
Submission period: January 13th, 2021 – February 10th, 2021
Award: $2,000 in cash to the winner of the Best Tutorial. All eligible tutorials will win a participation prize of $200 in cash.
This walkthrough can be a simple web application with @stacks/connect to integrate Skynet and a Clarity smart contract, so long as it covers building an app that can:
- Authenticate into a web app using Stacks Authentication or SkyID
- Upload data (images, videos, text, files, or entire folders) to Skynet
- Write a Clarity contract that can store Skylinks
- Make a contract call that stores a Skylink in a Clarity contract
- Use SkyDB as a key-value store for mutable content
- Allow users to make a read-only contract call to fetch a Skylink pointer
- Download the file from Skynet, or
- Show the data from Skynet to the user.
You can build any application you’d like that leverages both Skynet and Clarity. The overall aim of the walkthrough is not to build a production-ready web application, rather to educate developers on our technologies.
As noted in Stacks’ blog, “With Clarity going live on Stacks 2.0 tomorrow, the possibility really opens up for developers to build applications and services that can benefit from the best possible security, unique incentive structures, and direct access to the state of Bitcoin. Combine that with the globally accessible, decentralized storage that Skynet offers and the possibilities become almost limitless. Further collaborations may focus on deeper integrations between the networks, storage drivers, developer tooling, and possible features for dapp users.”
The sky’s the limit, and we can’t wait to see what our communities come up with to build a freer internet for all.