1inchProtocol icon indicating copy to clipboard operation
1inchProtocol copied to clipboard

Swap of DAI to USDT, DAI to USDC results in - Fail with error 'SafeERC20: low-level call failed'

Open SynergyNodes opened this issue 4 years ago • 5 comments

Hello,

I am trying to use the Swap function from OneSplit Contract - 0xC586BeF4a0992C495Cf22e1aeEE4E446CECDee0E

I was able to successfully perform the swap from DAI to TUSD and from TUSD back to DAI. Both have 18 decimal places.

However, the same does not work for DAI to USDT, or DAI to USDC. (USDT, USDC has got 6 decimal places and I have accounted for 6 decimal places in the code in JS file).

I have tested on testnet using ganache (live fork) and truffle. I get the follow error in this setup.

VM Exception while processing transaction: revert

I tried this on the mainnet too. On the mainnet, I get the following error.

Fail with error 'SafeERC20: low-level call failed'

What am I doing wrong? Hope get this this solved.

Regards, Harish

SynergyNodes avatar Oct 07 '20 02:10 SynergyNodes

@aries1504 I've tried with OneSplitAudit at 0x50FDA034C0Ce7a8f7EFDAebDA7Aa7cA21CC1267e, same errors

t4sk avatar Nov 17 '20 10:11 t4sk

Just conjecture but maybe this branch might hae some fixes as it is closer to the final product: https://github.com/1inch-exchange/1inchProtocol/pull/39 s closer

jimtje avatar Nov 17 '20 17:11 jimtje

Did you manage to solve this? Having the exactly same problem, but I am unable to make any swap, it always says SafeERC20: low-level call failed

LubomirKurpel avatar Jul 27 '21 21:07 LubomirKurpel

I solved it by just approving OneSplitAudit to spend my coins, and it worked with 0x50FDA034C0Ce7a8f7EFDAebDA7Aa7cA21CC1267e

trojanMcAfee avatar Aug 02 '21 09:08 trojanMcAfee

Hello,

I am trying to use the Swap function from OneSplit Contract - 0xC586BeF4a0992C495Cf22e1aeEE4E446CECDee0E

I was able to successfully perform the swap from DAI to TUSD and from TUSD back to DAI. Both have 18 decimal places.

However, the same does not work for DAI to USDT, or DAI to USDC. (USDT, USDC has got 6 decimal places and I have accounted for 6 decimal places in the code in JS file).

I have tested on testnet using ganache (live fork) and truffle. I get the follow error in this setup.

VM Exception while processing transaction: revert

I tried this on the mainnet too. On the mainnet, I get the following error.

Fail with error 'SafeERC20: low-level call failed'

What am I doing wrong? Hope get this this solved.

Regards, Harish

I HAVE THE SAME PROBLEM PLEASE CAN ANYONE HELP ME TO SOLVE.? THANKS

shahfayazkhan avatar Dec 05 '21 23:12 shahfayazkhan