Syncing thousands of addresses with Moralis

Hi there! I’ve been reading the Moralis docs to see if it’s suitable for a project I’m leading and would like to see if my understanding of the product is correct before making an official recommendation for my team to use it.

The problem

We have a database with thousands of contract addresses and would like to be notified whenever their ERC-20 + ETH Balances at scale.

How Moralis (seems to) fit in

The approach I was thinking about involves registering WebHooks on the Moralis DB after it has been told to sync the addresses we are interested in. That would be accomplished by:

  1. Sending watchEthAddress for all of the contracts addresses we wish to track
  2. Registering an afterSave webhook in the Moralis DB for the ERC-20 and ETH Transfer tables so our servers are notified transfers on the for watched addresses.

Questions

  1. Are there any limits to the number of addresses we can watch?
  2. How can we ensure it is Moralis calling our servers when it invokes the afterSave webhook?
  3. Are there any rate limits on the amount of webhook invocations made by Moralis?
  4. Is that the best solution for our use-case? Or are there better ways to leverage Moralis at scale?

Thanks in advance!

It depends on how many thousands of addresses you have: 2k, 6k, 9k, also on how many transfers they make

there is a limit now for the free plan on how many addresses you can watch

you can use afterSave hook, and use a http request to make that request to your server too
to make sure that you don’t skip data you can use a flag that is set to true when the data was sent successfully, and after that to use a job that runs every x minutes to check if there are transfers that were not successfully sent from the past and send them

you can also connect directly to mongo db and read from there every x minutes the new data

1 Like

Thanks for the clarification!

also on how many transfers they make

What are the limits affected by transfer count? Looking over the limits page, I couldn’t find anything related to that.

I mean that it will be more data if there are a lot of transfers, even if are 10 addresses, if they make 1M transfers per day then you will not be able to handle that easily

1 Like

Got it. The system that will be handling those messages will scale horizontally with load and implement backpressuring to ensure we don’t kill our vertically scalable systems :slight_smile:

So on our side, we are good.

Thanks for your help!