anyswap / multichain-smart-contracts

multichain smart contracts
GNU General Public License v3.0
43 stars 38 forks source link

Can router not bridge other minters tokens? #5

Open sirpy opened 2 years ago

sirpy commented 2 years ago

I'm not sure this logic is the intended one. For example in our own use case, lets say we have another bridge that mints tokens, we would like the multichain bridge to be able to swapout these tokens even though it wasnt the original minter. this is specifically true for bridges between sidechains that use mint-burn type of bridge.

https://github.com/anyswap/multichain-smart-contracts/blob/1bd0f3fab7c17114fe421b0871667c562dac1ae9/contracts/wrapper/MintBurnWrapper.sol#L157

jowenshaw commented 2 years ago

because erc20 token is fungible, we can not distinguish the co-minted tokens, but we can refine this judge, make it under the minter's control.