Asset Filter – Design Overview
Chain Wallet asset filters are designed to strictly constrain the flow of assets during transaction execution, preventing asset loss or abnormal operations.
Filters do not only apply to native coins and tokens, but also control asset movements generated by program invocations.
I. Objectives
-
Control wallet asset risk
- Prevent unauthorized or abnormal outflows of native coins, tokens, and other assets
-
Fine-grained control
- Apply restrictions at the level of a single account, a specific asset, or a particular program invocation
-
Auditable and configurable
- Filter configurations are traceable, enabling auditing and security management
II. Transaction Asset Categories
For a single transaction, the types of assets that may be affected include:
-
Native Coin
- On-chain native currencies, such as SOL
-
Token
- On-chain issued tokens, such as SPL Tokens
-
Other Assets
- Asset changes resulting from program or contract invocations
- For example, NFTs or balances held by contracts
To prevent wallet asset loss, all of the above asset types must be filtered and constrained.
III. Filter Concepts
Filters determine which assets are subject to transaction risk control.
1. Account Native Coin Filter
- Base Wallet Filter
- Selects the wallet’s native coin balance
2. Token Filters
-
Wallet Token Filter
- Selects tokens held by the on-chain wallet involved in the transaction
-
Address Group Token Filter
- Selects tokens held by a group of transaction-related addresses
3. Passed Account Filters
-
Native Coin Filter for Passed Account Groups
- Selects the native coin balances of all passed account groups
-
Token Filter for Passed Accounts
- Selects the token balances of all passed account groups
4. Program Address Filter
- The address of the invoked program
IV. Example Use Case
Assume a token distribution scenario. The asset control process would be as follows:
-
Determine target program accounts
- The program address involved in the transaction must be allowed by the Program Address Filter
-
Enforce daily distribution limits
- Use the Account Token Filter to control the daily distribution amount
-
Restrict other asset movements
- Apply filters to passed accounts and other assets to ensure restrictions cannot be bypassed
With these filter configurations, token distributions can be precisely controlled, abnormal wallet asset outflows can be prevented, and asset movements for each transaction can be fully traceable.
V. Summary
- Chain Wallet asset filters are a core component of security control
- Support multi-dimensional constraints on assets and accounts
- Configurable, auditable, and composable
- Combined with the permission model to achieve efficient and secure asset management