solana-labs / oyster

oyster.vercel.app
Apache License 2.0
116 stars 127 forks source link

Incorrect TOKEN mapping for SPWN(Bitspawn protocol) #316

Closed anthowen closed 3 years ago

anthowen commented 3 years ago

Problem:

The wormholebridge.com UI is presenting the wrong token pair for SPWN, and that results in moving funds from the OFFICAL SPWN ERC-20 address to the unofficial SPWN SPL address (compared with one in Coinmarkectcap)

image

the blurry token image(on Ethereum) is matched to the OFFICIAL address of SPWN ERC-20. the clear token image (on Solana) is matched to the OFFICIAL address of SPWN on Solana.

I'm not sure if this is just a UI bug or contract bug, but I'd appreciate if you could look into this issue and fix asap. Thanks!

leoluk commented 3 years ago

Wormhole is not a swap pool - wrapping ERC20-SPWN gives you SPL-wormSPWN. Wormhole can't mint the "official" SPL-SPWN, swapping SPL-wormSPWN for SPL-SPWN is not something Wormhole can do.

leoluk commented 3 years ago

(let me know if I misunderstood the issue)

anthowen commented 3 years ago

I think you misunderstood. I didn't want to swap the tokens. I just wanted to move the ERC-20 SPWN token to Solana CleanShot 2021-09-13 at 16 04 26

anthowen commented 3 years ago

CleanShot 2021-09-13 at 16 04 51

The bridge UI is populating the different address match. So when I select the ERC20-SPWN on Ethereum, it's pre-selecting the matched SPWN SLP on solana, but that's the incorrect address

leoluk commented 3 years ago

The wrapped assets addresses on Solana are derived deterministically from the Eth address, it's a fixed programmatic mapping - ETH-20 SPWN will always end up as wormSPWN on Solana.

anthowen commented 3 years ago

That's interesting. So wormSPWN is like a pegged SPWN on Solana? And as long as SPWN native token address is not the same as wormSPWN (according to Coinmarketcap), I need another pool to convert from wormSPWN to SPWN (on Solana)?

leoluk commented 3 years ago

Yes, Wormhole is just a bridge - it takes any ERC-20 and gives you a wrapped version of it.

anthowen commented 3 years ago

Yes, Wormhole is just a bridge - it takes any ERC-20 and gives you a wrapped version of it.

Ah, that makes sense now... So probably Saber is like a platform for this kind of pool? Could you recommend any pool to swap wrapped asset to the native asset on Solana?

leoluk commented 3 years ago

Saber has been great for this - for example, they have a pool that swaps wormSRM to native SRM.

anthowen commented 3 years ago

Saber

yeah, that's perfect. Thanks for the explanation, it educated me a lot!