Skip to content

Allow underwriters to share automated bond coverage - #763

Open
valthon wants to merge 1 commit into
masterfrom
fix/partial-automated-underwriting
Open

valthon wants to merge 1 commit into
masterfrom
fix/partial-automated-underwriting

Conversation

@valthon

@valthon valthon commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Automated underwriters waited whenever one account could not cover a request's entire outstanding bond. This left a 6 LIQSOL request unfunded even with five accounts each able to contribute 2 LIQSOL.

Contribute the minimum of the uncovered remainder, remaining exposure allowance, and wallet balance, rounded down to the contract's 0.01-token increment. Count each contribution against this pass's remaining funds and later passes' outstanding exposure. Keep outpost verification, oldest-first ordering, emergency stops, and settlement rules in place.

Regression coverage includes the five-underwriter example, exposure and wallet exhaustion across requests, previously bonded funds, caps lowered below existing exposure, and nine-decimal rounding around the minimum increment. The underwriter documentation describes shared coverage.

Validation:

  • The shared-funding regression fails against the original planner.
  • All 32 underwriting tests pass after the fix, compiled from this branch using cached native dependencies.
  • The complete root Node tooling CI gate passes (coredump policy, dependency installation, and both generator registrations).
  • Full Linux CI passes: ubuntu24, UBSan, ASan, assertions-on, and GCC build/test/package jobs, plus S1-S6 package verification.
  • macOS arm64 CI passes: native build, parallelizable tests, and portable package verification.
  • CI results are for commit bcbe0e73efefa6fb22deb717e6135ad820016c05.

Automated providers required enough cap and wallet balance to fund an
entire remaining bond, so a request could stall even when multiple
providers had enough aggregate capacity.

Contribute the affordable remainder in 0.01-token increments and reserve
only that contribution against the pass wallet and exposure totals.
Cover pooled LIQSOL funding, rounding, existing exposure, and exhaustion
across requests in the planner tests; document the shared coverage.

Change-Id: I66baf61e1da21c66cdc5c65128f7be966270d477
@valthon
valthon marked this pull request as ready for review November 11, 2026 04:51

This branch has not been deployed

No deployments
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.

1 participant