Assessment reports>Chainflip>Threat Model>Swap token instructions

Swap token instructions

The swap token instructions are not key-gated. These functions do the following:

  • Check that the swap amount is above the minimum amount required for that token

  • Check that the cross-chain message fits the length requirements

  • Transfer the token to the account that holds funds for the vault corresponding to the token

  • Emit an event signalling to off-chain components that the swap has happened

These functions do not otherwise mutate the chain state of the vault, and thus key-gating is not necessary.

Zellic © 2024Back to top ↑