1

Have been using the safe-core-sdk to propose transactions containing a bunch of ERC20 token transfers. Is there a limit, or maximum amount of transfers, that can be part of this multisend transaction?

If so, how can this limit be worked out to ensure that all the transfers go through successfully? For example, can the limit be worked out, and then the transfers be split between to multisend transactions?

Cheers

jmulq
  • 51
  • 5

1 Answers1

2

The limit is the block gas limit, which is currently 30 million gas.

you would have to estimate the transfers and check that the total gas consumption is lower than this limit.

You could also make an assumption about the gas costs of the transfers you want to perform (which is not super accurate, see How much gas does an ERC20 transfer cost?) and estimate if you are below this limit.

E.g. if you assume 100k gas per transfer you can do 300 token transfers in one go without problem. In most cases the required gas for a transfer is below 100k, especially if you transfer the same token multiple times.

One thing to note is that it might get harder to be included into a block if your gas limit is the absolute maximum of the block gas limit. So you might have to up the priority fee.

Richard
  • 4,934
  • 2
  • 7
  • 25