Params

Selectors

VeilifySwap switches to the …SupportingFeeOnTransferTokens variant when the path includes a fee-on-transfer token. It measures the output by balance delta. Any other selector reverts with InvalidSwapSelector.

Execution

  1. _checkSpend
  2. deadline ≤ block.timestamp + 30 minutes (DeadlineTooFar)
  3. amountOutMin ≠ 0 (ZeroAmountOutMin)
  4. Verify 52 public inputs (VIRTUAL_CHAIN_ID, UNISWAP_V2_ROUTER, then params)
  5. Spend nullifiers
  6. Run the swap through VeilifySwap (delegatecall)
  7. Build the output note from receivingKeyCommitment, amountOut, the output token and nullifiersHash
  8. Insert output, change and fee-change notes
  9. Pay fee to msg.sender
  10. Emit ShieldedSwap

Event