Skip to content

fix(sdk-coin-ada): rejecting ada outputs below 1 ADA#8283

Open
dgm003 wants to merge 1 commit intomasterfrom
fix/ada-min-output-CSHLD-459
Open

fix(sdk-coin-ada): rejecting ada outputs below 1 ADA#8283
dgm003 wants to merge 1 commit intomasterfrom
fix/ada-min-output-CSHLD-459

Conversation

@dgm003
Copy link
Contributor

@dgm003 dgm003 commented Mar 12, 2026

Ticket: CSHLD-459

Description:
ADA transactions with output amounts less than 1ADA used to get stuck in the sendqueue.

Fix:
Added validation in the ADA transaction builder to enforce the Cardano protocol minimum of 1 ADA per output:

  • Receiver outputs below 1 ADA are rejected at build time
  • Dust change (< 1 ADA) is absorbed into the fee instead of creating an unspendable output
  • ADA-only consolidations that would produce a sub-1-ADA output are rejected early, allowing the sweep to skip that address and continue

Testing
All (164) unit tests passing. New tests cover the boundary conditions (999,999 lovelace rejected, 1,000,000 lovelace allowed, dust change absorbed, sub-1-ADA consolidation rejected).

@dgm003 dgm003 marked this pull request as ready for review March 12, 2026 13:41
@dgm003 dgm003 requested a review from a team as a code owner March 12, 2026 13:41
// Native coin send
// Native coin send — reject if below Cardano's minimum output (BabbageOutputTooSmallUTxO)
const amount = CardanoWasm.BigNum.from_str(receiverAmount);
if (amount.less_than(CardanoWasm.BigNum.from_str(MIN_ADA_TRANSFER))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this exception for if change.less_than(CardanoWasm.BigNum.from_str(MIN_ADA_TRANSFER))) as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants