Homepage: micro-storage.xyz
Inspiration
Thinking about how cloud storage services charge you for a massive amount of storage whether you use it or not. Using blockchain and crypto payments, a subscription system can be created where a user can only pay for how much storage they need, and be able to increase and decrease the storage whenever they want.
What it does
Micro Storage is a cloud storage platform (think Google Drive) that uses NFTs to represent subscriptions. The user can subscribe to as little as 1GB of storage, which will allow for very cheap subscription prices (cents per month). Users will be able to increase or decrease their storage limit at any time to accommodate their changing requirements. Users will also be able to extend their subscription before it expires, and can unsubscribe at any time and get a refund for unused time.
In the app, users can create/edit rich text documents, spreadsheets, drawings, or upload/download any files.
How it works
The NFT stores a expiration date, so that the subscription can expire automatically. The NFT also stores the storage limit that the user selected for their subscription plan.
Chainlink Price Feeds are used to determine the number of coins needed to pay for a subscription in the user's choice of coin.
Chainlink Functions are used to sync information between the contract and the MicroStorage backend. The following calls are made to Functions:
- When a subscription is created, the function creates the user account with the chosen storage limit.
- When a user increases their storage, the function syncs the new limit
- When a user decreases their storage, the function checks whether this is allowed (the user is not using that storage space), and then syncs the new limit
- When a user unsubscribes, the function deletes the user account
All of these requests are idempotent since the contract state is merely being synced to the server.
Chainlink Automation is used to watch the contract for expiring NFTs, and when one is found, it burns the NFT and calls a Chainlink Function to delete the user account.
Sample flow for a user subscribing:
- User calls subscribe() function of the contract, choosing the storage limit and subscription length.
- Using price feeds, the user the subscription price is calculated and the user is charged.
- An NFT is minted that contains the storage limit and expiration date of the subscription.
- A request is sent to Chainlink Functions, which creates a new account for the user on the server.
- The user signs a message to prove ownership of the NFT, so they can communicate with the server API.
See more flows in the Technical Section of the docs.
How we built it
- Frontend is built using Astro Framework with React, and deployed to Cloudflare
- Docs pages are built with Astro Starlight
- Backend APIs are build with Cloudflare workers
- Using Chainlink Functions, Chainlink Automation, and Chainlink Price Feeds
Challenges we ran into
- Getting Function Secrets to work was tricky, and I couldn't find great documentation on it. But when it did work I celebrated hard.
- Chainlink Automation (custom logic) was acting weird sometimes. It wasn't running and giving me RPC errors in the admin console. It seemed to resolve itself after a couple days though.
- I couldn't seem to join the discord channel, which may have helped me through some of my issues faster.
Accomplishments that we're proud of
- Joined the hackathon late. Designed the app and implemented it in only 2 weeks!
- Created a unique use case for NFTs
- UI was created completely from scratch.
What we learned
- Chainlink is extremely powerful and there are a lot of potential use cases.
- Astro framework is really nice and way more flexible than NextJS
What's next for Micro Storage
Document Functionality Improvements. Most of the work went into the subscription part of the app, including the contract, and learning chainlink. The actual document management and editing functionality is very basic right now and can use tons of improvement, including but not limited to:
- Sorting / Filtering of documents
- A better rich text editor
- Faster performance by caching documents in indexedDB
- Bulk uploads and downloads
Client Side Encryption. Although the documents are encrypted during transit and at rest, it would be better if the platform offered client side encryption, so the user's didn't have to trust the backend server at all.
Account Sharing. Allow a user to create multiple accounts, with the intention of sharing some of the accounts for collaborative editing. The sharing would be done by sharing the NFT.
Links
- Polygon Mumbai Contract
- Avalanche Fuji Contract
- Polygon Mumbai Function Subscription
- Polygon Mumbai Upkeep
- Avalanche Fuji Function Subscription
- Avalanche Fuji Upkeep
Architecture Diagram

Sequence Diagram
A sample sequence diagram for creating and expiring of a subscription:

Built With
- astro
- chainlink-automation
- chainlink-functions
- chainlink-price-feeds
- cloudflare
- react

Log in or sign up for Devpost to join the conversation.