aldabra/crates
Kayos 057f623312 AUDIT5-1: relax coin selector for ada-only drain-to-fee
Two coupled fixes for the same root cause: the coin selector was too
conservative for "send most of what I have" cases.

1. min_change_required now drops to 0 for ada-only sends (kept at
   min_utxo_lovelace for asset-bearing sends where change has to
   carry leftover policy IDs). Downstream pass2 already folds
   sub-min change into fee on the ada-only happy path; the selector
   was reserving slack the chain doesn't actually need.

2. fee_pass1 dropped from 500_000 to 200_000. Real fees:
     1-in 1-out ada-only send : ~166 k
     1-in 2-out (with change) : ~178 k
     CIP-25 mint w/ metadata  : ~210 k
   500_000 was overgenerous safety budget. 200_000 is enough headroom
   for the basic-send case (which is the one that needed to drain to
   fee) without crowding mint paths (which typically have plenty of
   lovelace headroom anyway).

Surfaced 2026-05-05 zeroing out the mainnet test wallet:
2 ADA balance, 1.8 ADA send refused upstream as
"need 3300000 (target+fee+min_change), have 2000000"
even though the chain math was fine. New regression
ada_only_send_can_drain_to_fee covers the case.
2026-05-05 06:06:24 -07:00
..
aldabra-chain AUDIT4-1 fix: switch tx_status from Koios /tx_info to /tx_status 2026-05-04 20:45:10 -07:00
aldabra-core AUDIT5-1: relax coin selector for ada-only drain-to-fee 2026-05-05 06:06:24 -07:00
aldabra-mcp AUDIT4-G2 fix: client-side min_utxo guard on ada-only wallet_send 2026-05-04 21:22:28 -07:00