68bf543b9d
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
16 lines
1.1 KiB
Markdown
16 lines
1.1 KiB
Markdown
# PassiveDrip payout engine
|
|
|
|
Pays queued PassiveDrip withdrawals in POL on Polygon from a dedicated hot wallet. The site (PHP on cPanel) only queues rows and never holds a key.
|
|
|
|
Loop, every `PD_POLL_SEC` seconds:
|
|
|
|
1. `GET <bridge>?a=pending` (HMAC-signed): rows queued on the site with the member's Polygon address and the USD value.
|
|
2. Pay each row once, at the live POL rate (read from the InstantAdPay contract's own quote, no third-party feed).
|
|
3. `POST ?a=paid {id, tx, pol}` so the site marks the row paid with the transaction hash, or `?a=failed {id, reason}` so it stays queued.
|
|
|
|
A local ledger keyed by withdrawal id is written before the site is told, so a restart can never pay a row twice; an unconfirmed send is settled from its receipt on the next tick.
|
|
|
|
Environment: `PD_BRIDGE_URL`, `PD_BRIDGE_SECRET`, `PD_WALLET_KEY`, `PD_RPC` (comma list), `PD_CHAIN_ID` (137), `PD_DRY_RUN` (defaults to on), `PD_POLL_SEC`, `PD_DAILY_CAP_USD`, `PD_LOW_BALANCE_POL`, `PD_TELEGRAM_TOKEN`, `PD_TELEGRAM_CHAT`, `DATA_DIR`.
|
|
|
|
Status: `GET /` on the service port shows wallet, balance, counts and the last tick; `GET /health` for Coolify.
|