Assessment reports>warpdotgreen-cli>Threat Model>bridgeBack

Function: bridgeBack(byte[32] _receiver, uint256 _mojoAmount)

This function is used to burn wrapped CAT ERC-20 tokens and send a message to unlock the original CAT on the Chia network.

Inputs

  • _receiver

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Receiver puzzle hash for tokens.

  • _mojoAmount

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Amount of CAT tokens (in Mojos) to unlock on Chia.

Branches and code coverage

Intended branches

  • Set minimum transfer tip.

  • Burn CAT ERC-20 tokens correctly.

  • Invoke sendMessage to the portal to unlock CAT tokens.

Negative behavior

  • Revert if msg.value is not equal to the value of the message toll.

  • Revert if Mojo amount is less than the transfer tip, which is 1 Mojo at least.

  • Revert if tip is equal to the amount, causing the bridged amount to be zero.

Zellic © 2024Back to top ↑