Swap tokens
Swap tokens

Plug · Acts onchain

Swaps one token for another through the solver over indexed liquidity. The input amount is transferred to the solver's executor, the route settles, and the socket's balance of the output token before and after is compared; the action requires amount_out meets the min_out floor or the transaction reverts, and returns amount_out. Native ETH works on either side. The floor is the whole of what the solver is held to. The route is the solver's to build and the executor rides the unsigned channel, so nothing obliges a fill to deliver more than the floor even when the liquidity is there. Whatever does arrive lands in the socket and amount_out is that realized delta, but the floor is the only part of it the signature holds anyone to, which makes it the amount being agreed to rather than a safety margin under a larger expectation. A floor set loose is not caution; it is how much of the fill has been signed away. Reach for it to convert between assets mid-strategy, coiling amount_out into the deposit, repay, or transfer that follows.