Why Policies Exist
A traditional wallet has no concept of policy: a valid signature equals execution. SocketFi smart wallets separate the authorization question (who is signing?) from the policy question (should this be allowed?):Policy Categories
SocketFi wallets support five categories of policy:Spending Limits
Restrict the total value that can leave the wallet over a rolling time window. Spending limits can be applied globally or per-asset.Contract Restrictions
Maintain an allowlist of Soroban contract addresses the wallet may interact with. Any invocation targeting a contract not on the list is rejected before execution.Authorization Rules
Introduce additional authorization requirements for specific operation types. For example, you might require extra verification for transfers above a high-value threshold, or restrict which wallet operations are available to a specific session type.Recovery Controls
Govern when and how account recovery may proceed. Examples include mandatory waiting periods between a recovery request and execution, approval thresholds, or restrictions on who may initiate recovery.Fee Controls
Limit the maximum fee a transaction may consume, restrict which assets may be used to pay fees, or cap deferred fee balances. Transactions that would exceed fee policy are rejected before submission.Policy Evaluation Order
Policies are evaluated after authorization passes but before any execution occurs. The evaluation order is:Multiple Policies
Wallets can have multiple active policies of the same or different categories. All must pass for a transaction to execute:Wallet Policy Profiles
Different applications call for different policy configurations. Here are three common profiles to use as starting points:Consumer Wallet
Consumer Wallet
Focused on protecting everyday users from accidental large transfers and phishing.This profile lets users do everything they need for normal app usage while capping potential loss from a compromised session.
Gaming Wallet
Gaming Wallet
Locked to the game’s own contract ecosystem to prevent assets from being moved outside the game environment.Players can trade within the game freely, but no external contract can drain the wallet.
Fintech Wallet
Fintech Wallet
Designed for high-value transactions with additional controls on large transfers and fee exposure.Routine transactions proceed normally. High-value transfers trigger additional authorization steps.
Updating Policies
Policy updates are themselves protected wallet operations. They require a valid authorization from the wallet’s bound credential — just like any other state-changing operation.Because policy updates require wallet authorization, a compromised session cannot silently remove safety policies. The passkey holder must explicitly approve any policy change.