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
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
- Principle of Least Privilege: Always grant the minimum permissions necessary.
- Time Constraints: Consider adding timeframe policies to limit session duration.
- Combine Policies: Use multiple policies together for enhanced security.