3

Non-developer here. I have just read Pundi X's blog post about their proposed forthcoming token split and I am curious about how they could implement this:

https://medium.com/pundix/rc-request-for-comment-pxs-token-split-f43c77b77a0b

They plan to give token holders an additional 999 PXS for every 1 PXS they already hold. However the current total supply of 36,104,947.59 PXS would not be nearly enough to cover the number of additional tokens required:

https://etherscan.io/token/0x358d12436080a01a16f711014610f8a4c2c2d233

I can't imagine that it would be possible for them to retroactively increase the total supply of an ERC20 token. Is this possible or would they have to create a second token with 1000x supply and airdrop this on a 1000:1 ratio to current token holders instead?

Many thanks

2

A "mintable" token has a function that lets the "minter" issue new tokens. It's simple arithmetic that increases the total supply and credits the new tokens to an address - usually the minter.

Functions can't be added to contracts after deployment.

So, if there is no minter function in a deployed contract, then the total supply can't be increased. If there is a minter function, then the author has reserved the option of increasing supply in the future.

In practice, mintable token contracts often implement an irreversible OFF switch. The minter can set the switch to indicate that minting is over at such time as they want to demonstrate that no further issuance is possible. For example, a flag - isMintable = false.

Hope it helps.

0

The total supply is a variable in a smart contract. So technically you can implement a function, that increases the total supply (and also generates new tokens in this process)

0

If they planned for this ahead of time, which I assume they did, it's just a simple addition to the total for supply of tokens.

uint public totalSupply = 100000;

function addTokenToTotalSupply(uint _value) public {
    require(_value > 0);
    balances[msg.sender] = balances[msg.sender] + _value;
    totalSupply = totalSupply + _value;
}
  • 2
    Probably set a modifier, otherwise it's free token for everyone :) – Linmao Song Apr 4 '18 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.