Skip to main content

Extending ERC-20 Token for Enterprise

The exchange and transfer of tokens through smart contracts is a critical part of building blockchain applications. To make these operations more efficient to implement for developers, token standards like ERC-20 have been created. This allows our applications to run predictably. When building enterprise blockchain applications, we might need to have additional functionality outside of the defined standards.

For this reason, developers can extend the ERC-20 token standard with new features that fit their use case. In this article, we will explore 3 of these extensions: Pausable ERC20, ERC20Capped and ERC4626. First, let's define what an ERC-20 token is.

What is an ERC20 token?

A token is a representation of something on a blockchain. This could be real-world assets like shares of a company or currency like EUR or digital assets like customer loyalty points or items in a game. Like what they represent, tokens can share the same value as another token (fungible) or have their unique value (non-fungible).

ERC20 tokens are fungible tokens and are created by deploying an ERC20 smart contract. The ERC20 standard defines that the contract must: - Define the Contract Address (the creator of the token) - Define the total supply of the token (the amount of tokens created)

It also allows for these optional fields to be created: - The name of the token - (Ex: Ether) - The symbol of the token - (Ex: ETH) - The number of decimals for the token

To add new functionality to a smart contract that deploys an ERC20 token, formal extensions have been created to create increased security for both developers and their users.

ERC20 Pausable

A standard ERC20 token can be transferred at all times as soon as it is created. To have more control over the transfer of the token, ERC20Pausable was created. This is all transfer of those tokens to be paused. What this means is that the holder of the tokens cannot transfer or approve any transactions involving this token. The person who has deployed the contract is the only one who can pause or unpause the contract.

This extension is a useful control when operating with tokens that represent real-world value and where ownership of the token should be limited. For example, if you create a token to connect to your supply chain operations, you can pause the token if there is a break in operations. Another example is if you have an asset that represents an initial investment and only those who have made that investment are allowed to own this token.

ERC20Capped

Tokens are minted to a blockchain by calling the mint function within the smart contract. To have control over how many tokens can be minted, ERC20Capped allows developers to define a fixed cap. Limiting the supply can control the value of the token and the type of asset it represents.

The advantage of using ERC20Capped is that it allows you to be able to represent assets that also have a fixed amount. For example, a fixed amount of shares in a company or the fractionalization of an insured asset.

ERC4626

ERC4626 is a standard for creating token vaults. Token vaults are a way for users to store a collection of different tokens and a token back that is specific to that vault. The vault can then increase the yield of these tokens to create passive income for the users holding the vault token. These tokens back the shares of the vault. The amount of tokens a user contributes is correlated to the amount of shares they receive.

Token vaults are useful in the enterprise context when working with multiple tokens. These tokens could represent different assets that a company holds or invests in. To simplify the experience for customers, a token vault can be created and users only have to manage the token connected to the vault to manage the value from the other tokens inside the vault.

Conclusion

We just looked at 3 ways that developers can get more out of working with the ERC20 token standard. These extensions allow more control and visibility of assets that enterprise use cases may require. To get started deploying your own ERC20 smart contract on SettleMint, check out this guide on Connecting a frontend to a token transfer application.

Have more questions about the ERC20 tokens and extensions, hop into our Discord community!