Please see the MultiSwap architecture doc here for a deep dive into the technical specs of the protocol.

https://docs.ferrumnetwork.io/ferrum-network-ecosystem/v/multiswap-and-multichain-liquidity-pool-bridge/