Skip to content

Make the settlement guard refuse a settle the contract would reject #385

Description

@karagozemin

Goal

Teach the keeper settlement guard the same winner, refund, and void rules the round contract enforces, and skip submission when the local view would fail on-chain.

Why this is High

The guard and the contract can drift. A keeper that submits a settle the contract reverts wastes the round and leaves escrow locked until someone else notices. The guard has to mirror the contract rules, not invent a second policy.

Requirements

  • Compare the guard's expected winner and refund set with the revealed bids the contract would accept.
  • Refuse void and settle when the bidder page is incomplete.
  • Return a typed reason the status endpoint can show.
  • Add a fixture where the contract test and the guard test disagree today, and make them agree.

Acceptance criteria

  • A settle with a missing refund is not submitted.
  • A void of a fully revealed round is not submitted.
  • A complete, consistent round is still submitted once.
  • The guard test fixture matches a contract test fixture.

Pointers

  • services/keeper/src/settlement-guard.ts
  • contracts/round/src/lib.rs
  • contracts/round/src/test.rs
  • services/keeper/src/keeper.ts

Validation

  • Settlement guard tests and the matching contract tests

Drips

  • Drips Complexity: High
  • Expected Drips Points: 200
  • Add this issue from the Drips maintainer dashboard and set complexity to High.
  • Do not apply the Stellar Wave label on GitHub. That path defaults the issue to Trivial (100 points).

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssue proposed for the Drips Stellar Wave programarea: contractSoroban smart contractarea: keeperPermissionless keeper servicecomplexity: highExpected high implementation complexitydrips-candidateCandidate for a Drips Stellar Wave

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions