Skip to content

The chain does not pay what the fleet ratified — settle from the mined coinbase (audit H-3) #601

Description

@defenwycke

template.rs mutates the approved proposal per node to match local template fees: surplus goes to treasury, shortfall comes out of treasury then node payouts largest-first. M-28 recomputes from the adjusted proposal, so each node is internally consistent — but the fleet is not, and the chain pays whatever the winner's mempool produced.

Consequences:

  • settle_paid_block credits the ratified treasury amount, which was never paid on-chain
  • dashboard and payout rows disagree with the chain
  • BFT approval truthfully pins only the miner split; treasury and node amounts actually paid are the winner's
  • a node can shrink on-chain treasury within the drift bound by aggressive template filtering
  • post-gate fee increases are uncapped (the H-04 2x cap is pre-gate only)

Fix: settle and record from the actually-mined coinbase — the winner already parses it for M-28. Cap post-gate surplus/shortfall with a deterministic sink. Longer term the D12 payout-identity tag makes this a lookup.

Depends on / pairs with #589.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions