The modular design of the Cosmos SDK is one of its most powerful features.
As the SDK upgrades and improves, exciting new features are introduced to the Cosmos stack as modules, similar to how the
Blockchains in the Cosmos ecosystem and their end users are excited to adopt new upgrades to the SDK, but at times aren’t fully aware of the huge benefits some of these modules can provide.
In light of that, we’d like to highlight two highly powerful modules that were part of the
Short for Authorization, Authz allows you to authorize an address to perform a specific action on your behalf.
Imagine you have a wallet with a lot of funds stored on it but there are regular transactions you might need to perform, like voting on governance proposals or claiming your staking rewards. You might get a bit annoyed each time you have to connect your Ledger or try to access your wallet in cold storage and, understandably so, you’d prefer to just use a browser wallet like Keplr whenever possible.
With Authz, you can authorize a different address to perform these specific transactions for you, without worrying that this address will be able to take any other actions with your funds. This effectively allows you to perform your regular activities without worrying about compromising your valuable wallet.
App developers can also create their own custom authorization types for their own SDK modules. You are welcome to read the full technical specification
In many ways, the Fee Grant module can be seen as a companion to Authz. This module enables users to grant other people an allowance to be used to pay for gas fees, without actually transferring any tokens to the other address. The beauty here lies in the fact that the funds remain in control of the user who created the allowance.
Imagine you are building the next best NFT marketplace using the Cosmos SDK. You might be worried about user adoption knowing people will have to buy your token on an exchange just to pay gas fees on the platform — a significant barrier to entry for new blockchain users though generally fine for users who have already been onboarded to the ecosystem.
With the Fee Grant module, you can create an allowance for new users so that they can start using your application without worrying about gas, streamlining the onboarding to your dApp. It’s a much better alternative than directly sending tokens to new users because you don’t have to worry about tokens being used for anything other than gas fees, and unused tokens are never wasted.
In fact, you can even find a great example of this in the wild right now!
These Fee Grant allowances can be a one time grant that gets depleted or a recurring grant that refills at specified intervals. As with the Authz module, these allowances and permissions can be revoked at any time, but in the case of the Fee Grant module, they can have an expiration date too.
The full technical specification of the Cosmos SDK Fee Grant module is available
Many Cosmos blockchains have already implemented these powerful features, including the Cosmos Hub. However, the end user friendly UI/UX tooling around them is mostly still in the works.
We’re seeing great progress being made on an Authz web interface in development by
Many more use cases than the few described in this blog post do exist and we encourage you to explore all potential possibilities available to users.
If you’re a builder and would like to experiment with these modules, we have some great tutorials up on the