Skip to main content
Smart Sessions provide a powerful way to delegate specific permissions to session keys with fine-grained control. These policies act as a security framework that allows you to precisely define what actions session keys can perform, under what conditions, and for how long.

What are Smart Session Policies?

Smart Session policies are rules and constraints that govern:
  • Which contract functions can be called
  • What parameters are allowed
  • How much value can be transferred
  • When the permissions are valid
  • Which blockchain networks are authorized
These policies enable secure delegation of account capabilities while maintaining strict control over potential risks.

Key Benefits

  • Enhanced Security: Grant minimal permissions required for specific operations
  • Better UX: Enable seamless interactions without compromising security
  • Precise Control: Define exact conditions under which operations can occur
  • Time-Bound Access: Automatically expire permissions after a set duration
  • Cross-Chain Safety: Specify which networks permissions are valid on

Policy Components

Each policy consists of several potential components:
  • Contract Address: The target smart contract
  • Function Selectors: Specific functions that can be called
  • Rules: Parameter-level constraints
  • Time Bounds: Valid duration for the permissions
  • Value Limits: Maximum amounts that can be transferred
  • Network Restrictions: Specific blockchain networks where the policy is valid

Session Creation Parameters

Session Creation Parameters

Action Policy Configuration

Parameter Conditions

Rule Configuration

Usage Configuration

Token Limit Structure

Best Practices

  1. Principle of Least Privilege: Always grant the minimum permissions necessary.
  2. Time Constraints: Consider adding timeframe policies to limit session duration.
  3. Combine Policies: Use multiple policies together for enhanced security.