Skip to content

feat(financing): competitive auction / best-offer selection helper #135

Description

@samjay8

Problem

Originators compare offers manually. A read-only best-offer helper (lowest total cost for the given duration) reduces friction and is a natural onboarding/demo feature.

Scope

  • get_best_offer(invoice_id, originator) — read-only, no auth required
  • Ranking: lowest total repayment (amount + interest at duration), then earliest created
  • Returns offer id + computed totals; documented in the contract reference

Stop

  • No automatic acceptance (originator still chooses)
  • No hidden-matching/auction mechanics

Acceptance criteria

  • Correct winner for a fixture with two offers at different rates
  • Ties broken deterministically
  • Read-only, safe for public invocation

Metadata

Metadata

Assignees

No one assigned

    Labels

    contractsmediumStandard feature or fix — a single contract function or test

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions