Skip to main content

Instant Swap

Pulsar TWAMM's embedded AMM provides instant swap of tokens, which follows the constant product formula xy=kx\cdot y=k , where a swap does not change the product of a pair of reserve balances, k often referred to as invariants.

TWAMM's Instant Swap is a simple way to trade one ERC-20 token for another. For end-users, swapping is intuitive: a user picks an input token and an output token. They specify an input amount, and the protocol calculates how much of the output token they’ll receive. They then execute the swap with one click, receiving the output token in their wallet immediately.

But due to TWAMM's specificity, the status of the Term Swap is updated each time the instant swap is performed, which is used to calculate the order pool proceeds for Long Term Orders.