Approval and settlement
You approve one exact plan. One transaction moves every matched transfer, or none of them.
Approving
A plan lists every transfer in the round (token, from, to, amount), the round, the price snapshot hash, and a validity window. Approving it takes two actions in your wallet:
- 1Sign the plan (free). Your EIP-712 signature covers the whole plan. Change one leg and the signature is worthless.
- 2Allow the exact amount of each token you send. Sama asks for the amount in the plan, never an unlimited allowance.
Your wallet will ask you 3 times
- Sign the plan approvalFree
- Allow exactly 0.2 NVDABGas
- Send the settlementGas
Settling
When every participant has approved, anyone in the round can send settle() to the SamaSettlement contract. It checks the time window, the participants, every signature and nonce, then calls transferFrom for each leg. If any leg fails (an insufficient balance, a missing allowance, a paused token) the whole call reverts.
- The contract never holds a token: every transfer goes straight from one wallet to another.
- Each plan can settle once, and each approval nonce can be used once.
- You can withdraw an unused approval at any time with
cancelNonce.
Verifying
After the transaction confirms, an independent verifier re-reads it through a different RPC provider and checks 17 things, from the receipt status to every balance change. See Verification.
Gas
Signatures are always free. The allowance and settle() are ordinary BNB Chain transactions and need a little BNB today. Gas sponsorship through a BSC paymaster is planned so that holders without BNB can take part.