Technical Architecture

Architecture details of TWAMM

How TWAMM works?

The gif below shows a life cycle of a long term order at a high level.


LongSwap implementation is based on the protocol proposed by the Paradigm research team in 2021 and the well known implementation of TWAMM by researcher FrankieIsLost. There are additional aspects of optimisations over the original implementation and integration with the Balancer protocol discussed in the follow up sections.

System Components


Arbitrageurs play key role in the how TWAMM works. TWAMM has tendency to go out of sync as the virtual orders keep executing. An unbalanced AMM give opportunity for arbitrageurs to take profit and in the process balance the TWAMM.

Last updated