Function: swap(address[] accounts, address receiver)

Performs a swap.

Inputs

  • accounts

    • Control: Full.

    • Constraints: None.

    • Impact: Account to burn from.

  • receiver

    • Control: Full.

    • Constraints: None.

    • Impact: Receiver of the swapped tokens.

Branches and code coverage (including function calls)

Intended branches

  • Swap works as intended.

Function call analysis

  • swap -> assetsOf(accounts[i])

    • What is controllable? Everything.

    • If return value controllable, how is it used and how can it go wrong? How much to swap and burn.

    • What happens if it reverts, reenters, or does other unusual control flow? N/A.

  • swap -> _swap(total_assets, receiver)

    • What is controllable? Everything.

    • If return value controllable, how is it used and how can it go wrong? Returned.

    • What happens if it reverts, reenters, or does other unusual control flow? N/A.

Zellic © 2024Back to top ↑