We have an ERC20 contract which is not burnable, and migrating to a new chain.
So far the new “swap” contract has a function to swap which checks the balance of the user and allowance before transferring to burn address, emitting a log of the burn with sender, amount and nonce (no use for the nonce so I may remove this)
Then we monitor the events and mint on the new chain.
Is this a reasonable approach? Appreciate any ideas or samples of other contracts like this to look at.
With your proposed migration mechanism (one way bridge), your community have to trust that you will mint the appropriate tokens on the new chain. You may want to see what you could do to reduce the trust required.
Thanks for this, really useful, the erc20 to BNB bridge is very interesting, a lot more sophisticated than what we’re building.
As the project is community driven I believe there’ll be enough transparency to trust the one way bridge that simply burns, given as you say some audited and tested code that can be run to mint whenever needed.