Skip to content

Test: LibRaindexArb finalizeArb edge cases and fuzz #2537

@thedavidmeister

Description

@thedavidmeister

Audit finding: GAP-A12-1, GAP-A12-4

Source: audit/2026-03-14-01 triage #35, #36

GAP-A12-1: No test for zero-balance token transfers path

In finalizeArb, when both token balances are zero after arb, safeTransfer should not be called. No test exercises this path.

GAP-A12-4: No fuzz testing on finalizeArb

Existing tests use fixed values only. No fuzz test covers varied decimal combinations, edge-case amounts, or boundary values.

File: src/lib/LibRaindexArb.sol

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-auditIssues from Claude Code audit findings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions