Skip to content

[Testing] fuzz_target_1 is an empty stub and lending_pool_fuzz asserts the obsolete 1:1 deposit invariant #21

@grantfox-oss

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

fuzz/fuzz_targets/fuzz_target_1.rs is the default empty libfuzzer stub (// fuzzed code goes here). fuzz/fuzz_targets/lending_pool_fuzz.rs asserts assert_eq!(balance, amount) and balance_before - amount == balance_after, which encode the pre-share-model 1:1 deposit semantics; under the current LP-share model in lending_pool/src/lib.rs, get_deposit returns asset value of shares and withdraw takes a share count, so these invariants are stale.

Acceptance criteria

  • Remove or repurpose the empty fuzz_target_1 stub
  • Update lending_pool_fuzz invariants to the share model (shares minted are positive, redeemable value is non-negative, no panics) rather than 1:1 balance equality
  • Note that withdraw's amount parameter is a share count, not an asset amount, and adjust the harness accordingly
  • Ensure each fuzz target still compiles against the current public API

Files to touch

  • fuzz/fuzz_targets/fuzz_target_1.rs
  • fuzz/fuzz_targets/lending_pool_fuzz.rs
  • lending_pool/src/lib.rs

Out of scope

  • Adding a corpus or CI fuzz scheduling
  • Multi-contract differential fuzzing

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions