Nantucket icon indicating copy to clipboard operation
Nantucket copied to clipboard

Subscribe to supply/borrow events rather than full update in Worker

Open haydenshively opened this issue 4 years ago • 2 comments

Even pulling from the local Geth node takes ~2 seconds for 50 accounts. This is horribly slow. If we subscribe to supply and borrow events and update on an as-needed basis, rather than re-loading all data for every account every time, we can speed things up substantially and increase the number of accounts that we're watching (e.g. take it from 50 -> 5000)

haydenshively avatar Aug 31 '20 02:08 haydenshively

We're missing out on liquidations because we can't watch enough accounts at once. When markets are volatile, this is extra bad.

haydenshively avatar Sep 06 '20 02:09 haydenshively

We're missing out on liquidations because we can't watch enough accounts at once. When markets are volatile, this is extra bad.

Have you checked if there are limits on adding listeners for example over 10, 20 etc contracts in order to watch accounts, comptroller, tokens etc Why we can't watch enough accounts at once?.

mpereiraesaa avatar Jun 19 '21 20:06 mpereiraesaa