Off-Chain Tracker

Fluxity API tracks all streams and stores them in the database. This way, it will be easier for users to access their data on the dashboard. Other than that, each data entry on the Soroban network has a TTL (time to live), and if nobody extends that TTL, the data will expire from the ledger. The API is responsible for extending all streams' TTLs to make sure that all streams and everything related to them will stay on the ledger for a long.

Also, the server checks whether each stream is fully settled, and if so, the server would call the withdraw_stream function for that stream, and the receiver would get their remaining tokens. This is possible because anyone can call withdraw_stream every stream, even if they are not the receiver.

The motivation behind withdrawing someone else's stream is that after a stream is marked as "settled", then there would not be a need to extend its TTL anymore. This way, the API would not be spending XLM, and the receivers would automatically get their remaining tokens.

Last updated