/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

AttackWhat the relayer triesResult
TamperChange the amount after signingBadSignature
RedirectSwap the merchant addressBadSignature
ReplayResubmit a used signatureBadSignature

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”).