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.
Fractional Dutch-auction end state is untested: bid finalization and settlement are uncovered
Labels / Complexity: Contract · Rust · Trivial — Trivial
Summary
contracts/fractional/src/lib.rshas 50ink::testfunctions, but the Dutch-auction flow (bid_dutch_auctionline 980, with price decay viacalculate_dutch_priceand theInsufficientPaymentcheck) is not among the exercised calls (a grep shows buy-shares and liquidity coverage). The auction end state — one-shotAuctionAlreadyBid, price decay at a given block, and payment validation — is unpinned.Proposal
bid_dutch_auction: price decay over blocks, first-bid wins (second rejected), and insufficient-payment rejection.Acceptance criteria
cargo test -p propchain-fractionalpasses.Getting started
Files:
contracts/fractional/src/lib.rs(lines 980-1030). Command:cargo test -p propchain-fractional.