You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allowances are the primary source of funds for paying user operations
If the allowance is insufficient, the paymaster will attempt to take the missing funds from the user's balance
Allowances are granted from a sponsor's balance - unspent allowance can be claimed back by the sponsor
Allowances can only be spent on gas - they cannot be withdrawn or converted to withdrawable balance
Balance
Users can maintain a balance in the paymaster contract
The balance can be used as a fallback when paying for user operations if the allowance is insufficient
Users can deposit to and withdraw from their balance at any time
Users can create allowances for other users from their balance
The advantage of maintaining a balance in the paymaster over a balance in individual accounts is that multiple spenders (i.e. session accounts) can share the same balance
A user can register spender accounts, which can spend from the user's allowance. See SpenderSystem.sol.
Only accounts without own balance can be registered as spender, since the spender will always use the user's allowance.
A spender can register itself as spender for a user by using the world.callWithSignature entry path. The payload is the calldata to world.registerSpender, signed by the user. A valid registration call via callWithSignature can access the user's allowance before the spender is registered, to avoid the user having to ever send a transaction from their own account. See recoverCallWithSignature.sol.