Refuse to pay on a stale price
The guard that turns a dead price feed into a delayed payout instead of a wrong one. Fail closed, log loudly, retry later.
9 entries
The guard that turns a dead price feed into a delayed payout instead of a wrong one. Fail closed, log loudly, retry later.
One API returning a wrong number should not decide what you pay. Three sources and a median makes a single bad quote irrelevant.
sendtoaddress against bitcoind, litecoind or dogecoind, with the wallet passphrase handling and the error codes that matter.
Compute the fee once, show the net before they confirm, and keep every threshold in the settings table so repricing is not a code change.
Auto-pay when the API answers, hold when it does not, and never refund on a timeout. The three-state queue that keeps a faucet solvent.
One call that stops the worst failure mode on a faucet: telling a user they were paid when the wallet was already empty.
Debit on request, not on approval. The state machine that makes double payouts and phantom balances impossible.
If your ledger is in dollars and your payout API is in satoshi, this is the conversion, with the guard that stops a stale price from emptying your wallet.
A minimal, correct call to FaucetPay's /api/v1/send endpoint, including the part almost everyone gets wrong: the amount is in the coin's smallest unit, not USD.