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

Block smart contract receive addresses for SwapOut longtails #5805

Closed
gomesalexandre opened this issue Dec 7, 2023 · 2 comments
Closed

Block smart contract receive addresses for SwapOut longtails #5805

gomesalexandre opened this issue Dec 7, 2023 · 2 comments

Comments

@gomesalexandre
Copy link
Contributor

gomesalexandre commented Dec 7, 2023

Overview

We currently have safety for smart contract addresses on the sell side

However, with longtail in the works, we may now be in a state where the receive side is a custom receive addres for SwapOut long tails
i.e User -> Deposit into THORChain -> Swap to Base Asset -> Call into Aggregator -> Swap Via AMM
e.g BTC -> CRV

While the receive address wouldn't be an issue for us for regular THOR trades, and we don't have any risk of running into such issue at the moment, it's an issue for longtails:

image

It's not entirely clear if this flow could happen with our current wallet support and custom receive address logic, as there should be no wallet that has support for non-EVM assets e.g UTXOs/Cosmos/RUNE, but no support for EVMs.
Keplr comes to mind, however, swapper is disabled for Keplr.

There could be a flow in the future where we consistently allow custom receive addresses, and we should definitely be prepared for it and err on the side of safety by blocking smart contract receive addresses too.

For the time being, implementing this will just be a no-op, since the sell and receive addresses are the same, and the calls are cached.

References and additional details

#5716
#5724

Acceptance Criteria

  • Both sell and receive addresses are checked against being smart contract wallets in swapper

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

@gomesalexandre
Copy link
Contributor Author

Implemented in #6072 but cannot be tested yet. Dependant on #5892

@0xean
Copy link
Contributor

0xean commented Jul 22, 2024

closing since thorchain axxed the WL

@0xean 0xean closed this as completed Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants