Skip to content

Fractional Dutch-auction end state is untested: bid finalization and settlement are uncovered #1035

Description

@nanaf6203-bit

Fractional Dutch-auction end state is untested: bid finalization and settlement are uncovered

Labels / Complexity: Contract · Rust · Trivial — Trivial

Summary

contracts/fractional/src/lib.rs has 50 ink::test functions, but the Dutch-auction flow (bid_dutch_auction line 980, with price decay via calculate_dutch_price and the InsufficientPayment check) is not among the exercised calls (a grep shows buy-shares and liquidity coverage). The auction end state — one-shot AuctionAlreadyBid, price decay at a given block, and payment validation — is unpinned.

Proposal

  • Add tests for bid_dutch_auction: price decay over blocks, first-bid wins (second rejected), and insufficient-payment rejection.

Acceptance criteria

  • Dutch-auction decay, one-shot guard, and payment rejection are asserted in tests.
  • cargo test -p propchain-fractional passes.

Getting started

Files: contracts/fractional/src/lib.rs (lines 980-1030). Command: cargo test -p propchain-fractional.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions