Usage Limit Policy
The usage limit policy allows you to restrict how many times a session key can be used. This provides a simple but effective way to limit the total number of operations a session can perform, regardless of the operation type.Security Consideration: Set conservative usage limits based on expected legitimate usage patterns to minimize potential abuse.
Common Use Cases
- Limited Trial Access: Grant a fixed number of operations for evaluation purposes
- Batch Operations: Allow a specific number of automated transactions
- Risk Management: Cap total possible operations for security
- Resource Control: Limit API or service usage through smart contract calls
Best Practices
- Set Reasonable Limits: Choose usage limits that balance functionality with security
- Combine with Time Bounds: Add time restrictions to prevent rapid consumption of usage quota
- Monitor Usage: Track usage patterns to adjust limits appropriately
- Consider Operation Types: Set different limits for different function calls based on risk