Sometimes called a “Cross-Chain Liquidity Network,” the core of the Chainflip idea is to use MPC (Multi-Party-Computation), and in particular TSS (Threshold Signature Schemes) to create aggregate keys held by a permissionless network of 150 Validators.
These Validators control simple smart contracts/wallets called Vaults, on multiple blockchains simultaneously, giving rise to a fully decentralised 'settlement layer.' This is paired with an 'accounting layer', which uses the Substrate-based Application Specific Blockchain that we call the Chainflip State Chain to track balances, process events, and execute instructions. These systems give rise to a fully decentralised general cross-chain swapping protocol.
In practice, the codebase has no such thing as an 'accounting' or 'settlement' layer, but explaining the system into two layers is a helpful way to conceptualise its structure.
The assets used for trading are held in the Vaults on chains such as Ethereum, Bitcoin, and so on, with all of the trading and account-keeping occurring on the State Chain. This means that swap execution and AMM design can be heavily customised for the specific use case of cross-chain value transfer.
The protocol's accounting is fully contained in the State Chain, and includes the Chainflip Just In Time (JIT) AMM. It is based on the Uniswap v3 AMM design, but unlike Uniswap v3, the JIT AMM is not represented as a series of smart contracts on a single blockchain environment. Rather, the JIT AMM is virtual. This means that funds are not held directly in on-chain pools using wrapped assets, but instead traded virtually on the State Chain as account balances, and settled using the actual assets held natively in Vaults by the protocol. This works in a similar fashion to how centralised cryptocurrency exchanges store all of the deposits in a unified wallet system, with the balances of individual users tracked in separate accounting and trading systems.
Trading and tracking assets virtually on the State Chain dramatically simplifies the work needed to support individual chains, as rather than needing to write swapping logic in a range of smart contract and scripting languages on external blockchains, it is entirely contained within the Chainflip State Chain environment, meaning all of the abstractions needed to support a given chain can be managed entirely within the 'settlement' layer, and are much simpler in comparison.