Assessment reports>Y2K Finance>Threat Model>updatePath

Function: updatePath(IRouter.Path path, bool updatingAll)

This updates the path information used for swaps.

Inputs

  • path

    • Control: Fully controlled.

    • Constraints: The toAmountMin fields in path.BToD and path.DToB must be greater than zero.

    • Impact: The new path info.

  • updatingAll

    • Control: Fully controlled.

    • Constraints: No constraints.

    • Impact: If true, it will update all path info; if false, it will only update toAmountMin and the updated timestamp.

Branches and code coverage (including function calls)

Intended branches

  • The function updates the path info --- either all fields or just toAmountMin and updated.

Negative behavior

  • The function reverts if toAmountMin fields in path.BToD or path.DToB are zero.

  • The function reverts if updatingAll is true and the route info or token placement is invalid.

Zellic © 2024Back to top ↑