Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

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

@SynergyNodes

Description

@SynergyNodes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions