ERC-20 – What is Pausable Token in ERC-20 OpenZeppelin

erc-20go-ethereumicosolidityweb3js

I want to know about the pausable token in openzeppelin.what are the advantages that we will get after making our ERC-20 token pausable.

Best Answer

I assume you are referring to https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20Pausable.sol .

It's a regular token which with an addition of pausing functionality. If the token contract is 'paused', nothing can be done with it (it can't be transferred). Only the one with 'pauser' access (whoever deployed the contract) can pause/unpause the contract - although it looks like multiple 'pauser' accounts can be added (https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/access/roles/PauserRole.sol).

Pausing is often used in for example emergencies - if there's a critical vulnerability in the code you can just pause its functionality and the vulnerability can't be abused until you figure out what to do about the problem.

On the other hand, if someone has such power over a token contract, it's very centralized and it's probably not going to be accepted in exchanges.

Related Topic