How to upgrade an already-deployed token contract
Here's my trick: create a new token that is price-pegged against the old token. The old tokens can be converted into new tokens using a special function inside the smart contract. The new token can also be redeemed back into the old tokens by using another special function. It works a lot like stablecoins, but everything is on-chain. An example of this would be creating an ERC-223 version of an ERC-20 token. The new ERC-223 token would be issued when the old ERC-20 tokens are sent to the smart contract by approving the contract to spend the old ERC-20 tokens and calling a special function inside the contract. Also, it should be possible to downgrade the new ERC-223 tokens back into their old ERC-20 form. Also, it's possible to make this one-way, for example, burning the old tokens to get the new tokens, or the old tokens get sent to its developer instead of the contract's address. This idea allows tokens to be developed incrementally. When a new token upgrade is released, holders simply upgrade their tokens to the latest version, and when dealing with an exchange that doesn't support the new version, they can simply downgrade their tokens.
In this example, I created an ETF using a very similar mechanism
submitted by /u/jessielesbian
[link] [comments]