By Az
Tip the author

Kwil Extensions - Redefining the Future of Decentralised Databases

Kwil has once again led the charge in transforming the blockchain landscape with the introduction of Kwil Extensions.

Kwil Extensions opens up a whole new world for decentralised databases by enabling developers to connect to any blockchain, implement advanced logic, and more. With the added potential of an extension marketplace in the future, we step into the new era of modular database software.

Let's take a closer look!

We're really excited about what people are already building with extensions. In particular, we have seen builders create extensions that enable data access control based on on-chain state, as well as accrue the value of data in their database back to on-chain assets. This is a fundamentally new method of value accrual in web3, enabling entirely new business models for dApps, DAOs, and protocols. We're beyond excited about what this unlocks for the space - Brennan Lamey, Kwil, Founder

Kwil Extensions

With extensions, you can:

  • Token-gate access to data, for any token, on any chain.

  • Create automated token incentives for sharing and composing on data.

  • Implement fine-grained access control mechanisms and implement advanced credentialing systems for data access.

  • Execute stateless functions to manipulate data as it is passed to a database.

Decoding Extensions

Kwil Extensions are stateless applications that function alongside a Kwil database. The genius of these extensions lies in their ability to inject custom functions straight into database queries. This allows developers to compose complex logic that SQL alone cannot achieve. They offer the convenience of automatically injecting data from external sources into your database, pushing data from your database to external targets such as smart contracts, and enabling intricate access control and verification mechanisms.

Being containerised applications, extensions can be authored in any language and subsequently imported into a Kwil database. While queries are executed on the database, the corresponding action logic also runs simultaneously.

An average of 100 lines of code is needed for an extension.

The Power of Extensions

The creative possibilities that extensions bring to the table are virtually boundless. They enable you to connect to any external data source and construct logic surrounding that data. This allows functionality such as such as Token Gating, Token Incentives, Access Control, and Stateless Functions.

  • Token Gating empowers developers to limit data access based on on-chain assets. Extensions can establish requirements like token possession, fund deposits, NFT ownership, etc., for database access. In other words, a user needs to be holding a certain asset in the wallet that is trying to access the Kwil database.

    • Example: Private companies call sell memberships to users to access their databases. The memberships come with an NFT that allows access to the private data.

  • Meanwhile, Token Incentives can autonomously distribute token rewards to users for generating data, encouraging protocols around incentives for sharing composite data and earning automatic rewards.

    • Example: A charity asks users to help make a complete database of nutritional data for all major food groups to benefit and promote healthier eating. In order to get people actively adding to the database, they incentivise them by distributing tokens in exchange for that data.

  • Through Access Control, extensions can link to external authentication sources to supervise data access, providing robust privacy and authentication for decentralized data.

    • Example: A Web2 company can instantly start using Kwil decentalised databases to store their data and simply require users to complete a text message verification via its internal centralised system.

  • Finally, Stateless Functions allow developers to craft stateless functions callable from within a Kwil database, useful for creating intermediary logic to manipulate data sent to the database before storage.

    • Example: Though users might submit data to a Kwil database in various formats, an Extension could automatically reformat the data so that it follows a similar structure to the existing data within the database.

Starting with Extensions

To deploy a custom extension, it must be embedded directly into a deployed Kwil network. This process requires running a local Kwil node with an extension server. Kwil also offers managed hosting for Kwil nodes equipped with an extension server for production purposes.

For creating extensions, Kwil offers Golang and TypeScript/JavaScript SDKs. Once an extension is deployment-ready, it can be plugged into the Extension Deployment Script to run on a local Kwil node.

Tagged with In kwil Blockchain


Author and blockchain enthusiast.

Sign up for newsletter

Sign up here to get the latest news and updates delivered directly to your inbox.