Assessment reports>SyncSwap>Threat Models>transfer

Function: transfer(address token, address to, uint256 amount)

Allows to transfer assets from the caller balance to another recipient.

Inputs

  • token

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Determines the asset to be transferred.

  • to

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Determines the recipient of the transfer.

  • amount

    • Control: Arbitrary.

    • Constraints: amount >= balances[token][msg.sender].

    • Impact: Determines the amount to be transferred.

Branches and code coverage (including function calls)

Intended branches

Transfers the given asset of the specified amount to the given recipient.

Negative behavior

Balance of msg.sender is insufficient to cover the transfer.

Zellic © 2024Back to top ↑