Project Description: Astra ✨
The Big Idea
Astra is a decentralized data vault that flips the script on the current data economy. We provide a platform where users can own their digital footprint, control who accesses it, and get paid for its value. In our ecosystem, the user is the owner, not the product.
The Problem We Solve
The modern internet operates on a broken model. Our personal data—our searches, clicks, and conversations—is harvested and sold by large corporations in a $600 billion digital advertising market. This system leaves users with:
- No Ownership: Your data is an asset on a corporate balance sheet.
- No Control: You give away your rights through opaque terms of service.
- No Value: You receive zero compensation for the immense value your data generates.
This creates a massive privacy risk and an unfair distribution of value.
Our Solution: The Astra Data Vault
Astra is a Web3 application that allows users to create a secure, self-sovereign "Data Vault." This vault contains a profile of the user's interests, represented by tags, giving them full control over how their digital identity is presented.
How It Works for the User (The "Sell Side"):
- Connect & Create: A user connects their wallet and directly enters the tags they want to associate with their profile (e.g., "DeFi User," "Frequent Traveler"). This self-attestation model gives the user complete and explicit control over what data they share.
- Build Vault: The user signs a transaction to create their vault on the Flow Testnet, locking in their chosen tags.
- Earn: The user's vault is now part of the Astra network. They will automatically earn FLOW every time their data is included in a company's query. They can view their earnings in real-time and withdraw them at any time.
How It Works for the Company (The "Buy Side"):
- Build an Audience: A company connects its wallet and uses our dashboard to select tags, seeing a live count of how many users match their criteria.
- Pay & Access: To get the list of matching users, the company pays a fee directly in FLOW. This single, on-chain transaction is sent to our smart contract.
- Reward Users & Receive Data: The smart contract automatically and instantly distributes 100% of the FLOW payment equally to the earnings pools of the users whose data was accessed. The company receives a list of ENS names and wallet addresses, perfect for targeted airdrops or whitelists.
By building on a transparent, smart contract-based system, we eliminate the risk of being cheated and ensure fair, instant compensation for all participants.
How We Built Astra
Astra was built from the ground up as a decentralized application (dApp) with a "serverless" architecture, meaning our frontend communicates directly with the smart contracts on the blockchain. This approach allowed us to build a robust and transparent system rapidly.
The Technology Stack
- Frontend: We used Next.js (React) with Tailwind CSS to build a responsive, minimalist, and fast user interface. The entire application lives on a single page, using React's state management to toggle between the "User View" and "Company View" for a seamless demo experience. We used v0.dev to rapidly generate our initial UI components, which saved us hours of styling work.
- Web3 Libraries: We used wagmi and viem to handle all Web3 interactions. These powerful libraries made it incredibly simple to connect to user wallets, read data from our smart contracts in real-time (like earnings and user counts), and trigger on-chain transactions for creating vaults and paying for data.
- Smart Contracts: We wrote our backend logic in Solidity and structured it into two core contracts:
- AstraVault.sol: This contract acts as our data registry. It contains the logic for users to create and update their profile tags and for companies to query which users match a specific set of tags.
- PaymentManager.sol: This contract is the financial engine of Astra. It handles all the logic for companies to pay for data access in FLOW and automatically distributes the FLOW rewards to the users' earnings pools.
Partner Technology Integration & Benefits
We strategically chose our technologies to align with our partner's goals.
- Flow: Our entire on-chain infrastructure is built on and deployed to the Flow Testnet. We chose Flow for its EVM compatibility, which allowed us to write our contracts in Solidity, and for its focus on consumer-grade applications. The Astra financial model is powered by FLOW, the native token, which is used for all payments and rewards within the app. This deep integration makes our project a native citizen of the Flow ecosystem.
- Zircuit: While our MVP is deployed on Flow, our architecture is chain-agnostic. We are submitting to the Zircuit "Best App Idea" prize because Astra represents exactly the kind of "killer app" that could thrive on their network. Our detailed documentation, working demo, and robust economic model serve as a comprehensive blueprint for how Astra could be a cornerstone application in the Zircuit ecosystem.
- Hardhat: We used Hardhat as the core development environment for our entire backend. All of our Solidity smart contracts were compiled, tested with ethers.js on a local Hardhat chain, and managed within the Hardhat framework, making it essential to our build process.
Notable "Hacks"
To deliver a fully functional end-to-end demo in a short timeframe, we made one notable architectural decision:
Non-Scalable On-Chain Query: Our getUsersByTags function in the smart contract loops through an array of registered users to find matches. While this works perfectly for our demo with a small, pre-loaded dataset, it is not scalable for production. In a real-world application, this query logic would be moved off-chain and managed by an indexer for efficiency. This was a deliberate trade-off to showcase the complete financial loop within the hackathon's constraints.