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

VM Exception while processing transaction: reverted with reason string 'Redeem failed' #146

Open
Samboy76 opened this issue Dec 22, 2022 · 1 comment

Comments

@Samboy76
Copy link

I´ve spotted a price difference arbitrage opportunity between two DEXs (both fork Uniswap) and use AAVE as flashloan. Swapping the 1 ETH flashloan borrowed amount to USDC on higher priced DEX comes out ok but when I convert the USDC swapped amount back into ETH on the cheaper exchange in order to yield an ETH token profit, which I know is one, it spits out the above error VM Exception while processing transaction: reverted with reason string 'Redeem failed' when executing uniRouter.swapExactTokensForTokens.

Chronology of events

I used a pricing JS bot to identify the arbitrage between the exchanges automatically.

It had correctly identified one and allowed the trx to go through into the smart contract in the back-end to perform the actual swap.

I was expecting the arbitrage to complete with a profit > 1 ETH for this transaction which hasn´t materialized given the above issue generated in the final swap on the cheaper DEX via execution of uniRouter.swapExactTokensForTokens

I´ve also checked the reserves were sufficient for both incoming/swapped tokens on the cheaper DEX which indeed was the case, before proceeding with the final swap.

Any ideas where I´m going wrong would be appreciated?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Samboy76 and others