Inspiration

The high gas fees on L1's and the very high cost of storing and reading storage variables made me think, is this why we don't have large scale projects like how we do on centralized systems? The programs where there is a mountain of data being stored just to be interacted with users.

What it does

The "hybrid contracts" on L-1 import our StorkContracts as a library similar to openzeppelin's ERC-20, and now start querying data to and from StorkNet through queries. Queries are the CRUD operations, so you can say that the entire project is kinda like a database for smart contracts.

How we built it

After figuring out the parts involved the entire thing was coded on solidity, the L-2 chain essentially is any ETH fork but ontop of that has our implementation of a blockchain, it has its own consensus, networking, block production, proof of data and transactions (each transaction is just a query that is made to StorkNet) created using non-interacting ZK hashes.

Challenges we ran into

  1. The networking part was pretty tough,
  2. Figuring out the different smart contracts required as a monolithic approach would be ill suited for the project

Accomplishments that we're proud of

  1. Creating the database part
  2. The consensus mechanism that we used
  3. The fact the entire project was coded in just over a week

What we learned

  1. Creating a "common data storage type"
  2. Creating queries
  3. Batch operations on queries
  4. ZK proofs
  5. Oracle systems

What's next for StorkNet

  1. Increase the number of queries that are possible
  2. Maybe find a way to reduce the deployment cost of each hybrid contract (the extra code that you need to import while making the contract is about 2.6x the cost of a regular deployment)
  3. Improve the security of the protocol
  4. Do some hardcore testing, and patch up bugs
  5. Patch up security vulnerabilities using tools like slither and others from Crytic, trailofbits

Built With

Share this project:

Updates