Tables as a Protocol: Unlocking New Functionality

Luke Lamey
Kwil
Published in
3 min readJul 26, 2022

At Kwil, we are building scalable decentralized databases that will power the next generation of dApps and protocols. Today, data-intensive dApps do not have a decentralized solution for managing relational data. In order for crypto to onboard the next generation of users in Web 3.0 through decentralized social, gaming, and science, an infrastructure solution is needed to support decentralization while maintaining strong throughput, security, and extensibility.

Before diving into how KwilDB enables new types of decentralized applications, it’s important to define what we mean by “decentralized.” Decentralized means that application ownership, management, and access are not controlled by a single entity. In the case of a database, decentralized means that users have permissionless write access to an application’s database. Furthermore, if an entity/founding team fails to exist, the application and database will still run and function as designed. Decentralization means democratizing ownership, access, and management.

With this definition in mind, let’s take a look at how KwilDB can power the next generation of dApps and Protocols.

Introducing Tables as a Protocol

A key feature built into KwilDB v2 is what we call, “Tables as a Protocol.” If a dApp wishes to exist in perpetuity (meaning that it can still service its users even if the core team or company that built the dApp disappears), then it must have a database that can support permissionless data writes and access. However, a permissionless database does not mean that it is a free-for-all. Permissionless writes must still be passed through in a way that conforms to how the dApp uses data. This is where “Tables as a Protocol” is useful.

Just as Ethereum allows for programmable money, Kwil allows for programmable data sets with custom rules dictating how and when users can write to the database. With Kwil, developers can implement logic in their tables that transform database schemas for data intensive applications into permissionless protocols. Developers can decide whether the logic is subject to change in the future or if the logic is to be locked. Once a developer decides the logic is locked, other builders and application users can write to the database with the assurance that the schema and access rules will not change. In the same way that programmable logic led to breakthrough applications in decentralized finance, custom logic for databases will fuel the next generation of decentralized applications.

To illustrate the power of tables as a protocol, let’s use the example of a decentralized social media application. As mentioned above, with Kwil, developers can define rules for their tables and deploy them. In the case of a social dApp, developers could define rules for follower relationships within a table. Any user has permissionless write access to their follower relationships in the table. Developers can also add more complex logic, such as auto-blocking features or following/unfollowing rules based on on-chain asset ownership. With a decentralized database, users can continue writing to that table in perpetuity, regardless of if the original team that created the dApp is still working on it, maintaining it, or paying for it.

What is next for Kwil?

At Kwil, “Tables as a Protocol” is just a small part of the feature set we are building into KwilDB v2. Over the coming months, we will be working on building and releasing version 2 and collecting feedback from users.

Are you a developer interested in contributing to Kwil? Or do you have a project that could benefit from using KwilDB? Join our community here: https://discord.gg/dH6rVQvD

Are you interested in making the leap and building with KwilDB full-time? We are hiring! Open roles can be found here: https://kwil.com/careers.

--

--