freighter icon indicating copy to clipboard operation
freighter copied to clipboard

[SPIKE] Explore Blockaid monitoring system (webhooks)

Open Keeeeeeeks opened this issue 2 months ago • 3 comments

Internal discussion: https://stellarfoundation.slack.com/archives/C03347FNAHK/p1761059300703979?thread_ts=1760983841.338709&cid=C03347FNAHK

Blockaid thread: https://stellarfoundation.slack.com/archives/C065T73DT60/p1761067311896649?thread_ts=1760981784.595049&cid=C065T73DT60

The initial idea here would be to poll less and use webhooks instead to update token states, and probably cache this info in our backend so that the frontend won't need to wait for a heavy request to finish every time.

Blockaid will show us a demo of their monitoring system on Nov 3rd so we should probably only start working on this ticket after that.

Keeeeeeeks avatar Oct 27 '25 17:10 Keeeeeeeks

Lowering priority since Blockaid actually does not still have stellar support for the webhooks. They'll let us know once they have support to it.

CassioMG avatar Nov 03 '25 18:11 CassioMG

notes from blockaid sync -

webhook support is coming. once webhooks are available for Stellar, we should implement the following changes:

  • Add a cache key for blockaid scans(map of canonical ID to scan)
  • Add route for blockaid to use as a webhook, route will consume scans and cache results
  • On scan requests, our backend will check the scan cache and return results if available
  • if no scan in cache, backend will scan and return/cache results

aristidesstaffieri avatar Nov 03 '25 18:11 aristidesstaffieri

Doc on how to create the webhook: https://docs.blockaid.io/reference/create-hook-1

CassioMG avatar Nov 03 '25 18:11 CassioMG