Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Incompatible address derivation leading to unrecoverable funds sent via IBC #79

Open
VictorTrustyDev opened this issue Jan 12, 2024 · 0 comments
Assignees
Labels
enhancement Enhancement / bug-fixes or re-work on old feature

Comments

@VictorTrustyDev
Copy link
Member

VictorTrustyDev commented Jan 12, 2024

Not a bug

Problem:

Every Ethermint-based/Evmos-based chains are using eth_secp256k1 and Coin Type=60 so the delivered address will be different with the other non-EVM compatible chains. Two cases can happens:

  • Users sending funds from an EVM-compatible chains, so address will be compatible and users can access to their funds.
  • Users sending funds from non-EVM-compatible chains, with different eth_secp256k1|| Coin Type, the address is in-compatible so they can not access to their funds.

But, this won't usually happens, can say rare due just from mistake of front-end developers or sometime user when manually convert address.

Solution:

Can choose one of the following options:

  1. Re-use x/recovery module from Evmos.
  2. Implement a light-weighted module that invokes "refund-to-sender" in certain conditions.
  3. Just ignore it.

In case of decided to implement a recover funds method, the following condition should be match.

  • Account must not sent any transaction before (nonce = 0).
  • Only base accounts are considered as source of funds that recoverable (non-contract, non-module, non-vesting,...)
  • Check ERC-20 token pairs to detect balance of already converted by IBC middleware.
@VictorTrustyDev VictorTrustyDev added the enhancement Enhancement / bug-fixes or re-work on old feature label Jan 12, 2024
@VictorTrustyDev VictorTrustyDev self-assigned this Jan 12, 2024
@VictorTrustyDev VictorTrustyDev changed the title Problem: incompatible address derivation leading to unrecoverable funds sent via IBC Problem: Incompatible address derivation leading to unrecoverable funds sent via IBC Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement / bug-fixes or re-work on old feature
Projects
None yet
Development

No branches or pull requests

1 participant