sol mainnet payouts tasks

This commit is contained in:
Dobromir Popov
2026-07-13 18:51:40 +02:00
parent c938d38031
commit a6bcc69288
7 changed files with 306 additions and 7 deletions

View File

@@ -21,6 +21,9 @@ import uuid
DEFAULT_PRICE_PER_1K_TOKENS = 0.02 # USDT
DEFAULT_STARTING_CREDIT = 0.0 # USDT; accounts must be funded before inference
DEFAULT_BILLING_DB_PATH = "billing.sqlite"
DEFAULT_SETTLE_PERIOD = 86400.0 # seconds — max time between node payouts (24 h prod)
DEFAULT_PAYOUT_THRESHOLD = 5.0 # USDT — immediate payout when pending exceeds this
DEFAULT_PAYOUT_DUST_FLOOR = 0.01 # USDT — never pay less than this
NODE_REVENUE_SHARE = 0.90 # nodes 90% / protocol cut 10% (ADR-0015)

View File

@@ -8,7 +8,12 @@ import time
from pathlib import Path
from .accounts import DEFAULT_ACCOUNTS_DB_PATH
from .billing import DEFAULT_BILLING_DB_PATH
from .billing import (
DEFAULT_BILLING_DB_PATH,
DEFAULT_PAYOUT_DUST_FLOOR,
DEFAULT_PAYOUT_THRESHOLD,
DEFAULT_SETTLE_PERIOD,
)
from .capability import ALL_POLICIES as ALL_CAPABILITY_POLICIES
from .hf_pricing import DEFAULT_HF_PRICING_LOG_DB_PATH
from .logging_setup import (
@@ -237,19 +242,19 @@ def main() -> None:
common.add_argument(
"--settle-period",
type=float,
default=86400.0,
default=DEFAULT_SETTLE_PERIOD,
help="Max seconds between payouts to a node (dev: 60, prod: 86400)",
)
common.add_argument(
"--payout-threshold",
type=float,
default=5.0,
default=DEFAULT_PAYOUT_THRESHOLD,
help="Pending USDT that triggers an immediate payout (dev: 0)",
)
common.add_argument(
"--payout-dust-floor",
type=float,
default=0.01,
default=DEFAULT_PAYOUT_DUST_FLOOR,
help="Never pay out less than this many USDT",
)
common.add_argument(