Assessment reports>Chainflip Backend>Threat Model>Function: schedule_swap_from_contract

Function: schedule_swap_from_contract

This function simply schedules a swap with user-specified parameters. It is intended to be called by the witnesser.

The destination address must be on the same chain as the destination asset, and it must be a valid address.

If the input asset amount is less than the configured MinimumSwapAmount pallet storage value for that asset, the funds are confiscated and locked in the protocol. Otherwise, the swap is scheduled.

Zellic © 2024Back to top ↑