Build finalizer python script #13

Open
opened 2026-05-01 13:02:23 +00:00 by NakataModem · 1 comment
Owner

Finalizer purpose:

  • monero > check deposit statuses until it's finalized (just call /check endpoint periodically, maybe once in 5 minutes) -> then - if deposit is completed, just set used monero wallet address to be re-used (is_available to TRUE)

  • litecoin > check deposit statuses until it's finalized, same as monero, but with one critical difference: if payment is succeeded - DON'T set address available (to be reused).
    because address must not be touched until it's output is spent (UTXO consolidated on withdrawal) -> SO re-use logic for successful deposit addresses is in withdrawal module - when user spends coins from these addresses - then it sets is_available to TRUE - because coins are spent from this address - and also keep_track is set to FALSE after output is spent

(btw actually we can track unspent UTXOs by looking at confirmed statuses + is_available - false. ) so actually no need to add keep_track? though it can add explicitness. so better do it.

Finalizer purpose: - monero > check deposit statuses until it's finalized (just call /check endpoint periodically, maybe once in 5 minutes) -> then - if deposit is completed, just set used monero wallet address to be re-used (is_available to TRUE) - litecoin > check deposit statuses until it's finalized, same as monero, but with one critical difference: if payment is succeeded - DON'T set address available (to be reused). because address must not be touched until it's output is spent (UTXO consolidated on withdrawal) -> SO re-use logic for `successful` deposit addresses is in `withdrawal module` - when user spends coins from these addresses - then it sets is_available to TRUE - because coins are spent from this address - and also keep_track is set to FALSE after `output` is spent (btw actually we can track unspent UTXOs by looking at `confirmed` statuses + `is_available` - false. ) so actually no need to add keep_track? though it can add explicitness. so better do it.
Author
Owner

Theoretically finalizer should be replaced with something like zmq subscription server, so architecture is more like event-driven

Theoretically finalizer should be replaced with something like zmq subscription server, so architecture is more like event-driven
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
CryptoWrapAPI/CWcv#13
No description provided.