Introducing AuthZ on Cosmostation Mobile

A deep dive into Cosmostation Mobile’s integration of Cosmos SDK module AuthZ.

Gorany
Cosmostation
4 min readSep 2, 2022

--

AuthZ Module

Modules define most of the logic of Cosmos SDK applications. Developers compose modules together using the Cosmos SDK to build their custom application-specific blockchains. Staking, governance, and IBC are common Cosmos SDK modules that contribute to the ecosystem as open source modules free to use.

AuthZ module is an implementation of a Cosmos SDK module, per ADR 30, that allows granting arbitrary privileges from one account (the granter) to another account (the grantee). A grant is an allowance to execute a Msg by the grantee on behalf of the granter. But why would the granter want to grant the grantee arbitrary privileges like sending tokens, claiming staking rewards, and voting on governance proposals?

To understand this, let’s consider a scenario where account ‘R’ has a huge amount of assets that it’s too overwhelming to expose the private keys to a hot wallet. But hot wallets like Cosmostation wallet offer various convenient features from simple send transactions to governance voting. ‘R’ can create a new account ‘E’ and allow it to take care of certain tasks on behalf of account ‘R’ on Cosmostation, using AuthZ.

By doing so, R will never have to worry about exposing its mnemonics or private keys while enjoying full features of Cosmostation wallet (the best hot wallet).

AuthZ on Cosmostation Mobile

As of V1.7 update, Cosmostation supports AuthZ on Evmos, Juno, Stargaze, Injective, Gravitybridge, Fetchai, and Bitsong wallets.

Overview

AuthZ detail page shows the balance of granter broken down into 4 categories — available, delegated, unbonding, and staking reward. Note that grantee is the ‘signer’ of transactions, so tx fees are coming out of grantee’s pocket.

There are currently seven AuthZ transactions available for grantee — send, delegate, undelegate, redelegate, claim reward, claim commission, and vote. AuthZ granted transactions send, delegate, claim reward, and vote are displayed in colors, while the unauthorized ones are displayed in monochrome.

  • AuthZ authorization has an expiration date which is shown at the top right corner of each feature.
  • The granter can limit the amount the grantee can operate on behalf of the granter.
  • The granter can limit addresses to which the grantee can send transactions.

Send

When the grantee makes an AuthZ send transaction that sends 1 $EVMOS to the grantee’s address, the grantee signs a transaction that transfers 1 $EVMOS from the granter’s address to the grantee’s address. Then the send limit amount is decreased by 1. UX is the same with normal send transactions.

Delegate

The granter can whitelist or blacklist validators to which the grantee can delegate. The grantee can only see whitelisted validators from the list if the whitelist is applied by the granter. In case of the blacklist, grantee can see all the validators but the blacklisted ones to choose from.

Claim Reward

The grantee can claim staking rewards from the granter’s validator.

Claim Commission

Most of the accounts do not have any commission to claim. But if the granter is a validator, it can let the grantee claim its commission.

Vote

The grantee can vote for the granter just like how the validators vote on the delegators’ behalf. UX is the same.

How to Grant AuthZ

For now, Cosmostation does not support granting AuthZ from an account to another. AuthZ privileges have to be granted through CLI — Command Line Interface.

AuthZ History

AuthZ grant, revoke, and execution transaction histories can be found in the HISTORY tab of Cosmostation wallet. ‘Authz Grant’ is the transaction of receiving a grant from the granter. ‘Authz Revoke’ is the transaction of losing a grant from the granter. ‘Authz Execute’ is any transaction executed by the grantee on behalf of the granter.

About Cosmostation

Cosmostation provides a purely streamlined access to the interchain through developing a suite of user-friendly applications for partner networks we help secure as an industry-leading validator node operator and investor. Our interchain products ranging from Mintscan Block Explorer, Cosmostation Mobile Wallet(iOS, Android), Cosmostation Web Wallet, Cosmostation Extension, to spacestation.zone serve as both a powerful set of tools for protocols/exchanges to onboard users and for developers/validators to efficiently navigate networks.

Links

Mintscan | Extension | Android | iOS | Web Wallet | Spacestation Bridge

Official | Github | Twitter | Telegram

--

--