/protocol/gasless
Gasless & relayer
Owners and customers never pay network fees. They sign typed data; the relayer submits it; the contract only moves value to exactly what was signed.
registerFor
Owner registers a shop. The signature binds merchant = signer.
payFor + EIP-2612 permit
Customer pays. The permit authorises exactly the signed amount to this shop.
acceptLoanFor
Owner accepts an offer. The terms are re-read from the chain, not from the payload.
Attack cases
| Attack | What the relayer tries | Result |
|---|---|---|
| Tamper | Change the amount after signing | BadSignature |
| Redirect | Swap the merchant address | BadSignature |
| Replay | Resubmit a used signature | BadSignature |
These cases are covered by the Foundry relay tests. The relayer wallet only pays gas; it holds no user funds and cannot change what a signature authorises.
When the free relayer is busy or low on gas money, the app falls back to a normal wallet transaction and the user pays the network fee themselves (the owner app says: “Layanan gratis sedang ramai”).