Skip to content

Massive USDT Approval costs #133

@laraschke

Description

@laraschke

Hey everyone,

i integrated the paraswap api into my dapp. Everything is looking good and running fine. I can approve and exchange various ERC20 tokens on Ethereum as well as Polygon with "normal" expected gas costs.

I am facing an unexpected problem by approving the paraswap api for USDT access. The fees for an approval transaction is 300 - 1000 times higher than for other tokens.

The function call looks like this:

await paraswap.approveToken("100", <senderAddress>, "0xdAC17F958D2ee523a2206206994597C13D831ec7");

To find the root of the problem i tried to fire the approve transaction separately on Etherscan. Weirdly, approving any random address has expectable gas cost except of the paraswap transferrer contract. By calling the approve function on USDT contract with paraswap contract as spender (0x216B4B4Ba9F3e719726886d34a177484278Bfcae) the gas costs are just exploding.

Hopefully anybody can help me out.

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