Design
How Predicate works
Overview
Predicate enables developers to integrate pre-transaction rules into their application in a modular fashion. It is designed to be transparent, verifiable, and open. Any entity—whether an individual, organization, or DAO—can create, manage, and own their policies through Predicate. Developers can also migrate ownership of these policies to a team multisig wallet, DAO, or any other Ethereum account.
Example Rules
- Anti Money Laundering mitigates the flow of sanctioned and stolen funds through onchain financial applications.
- Integrated Identities enables instant integration with multiple know-your-customer vendors for user verification
- Rate Limiting sets volume based limits for EOAs or contracts
- Anomaly Detection prevents abnormal transactions from executing and exploiting an application
- Asset Unlocks verify onchain conditions are met, such as holding certain NFTs or completing quests.
Architecture
Sequence diagram representing the end-to-end flow of each transaction
The order of operations after integrating Predicate into an application is as follows:
-
Client Request: A request to validate the transaction adheres to its destination protocol’s Policy (specified in the “to” field of the EVM object) is made to the Middleware managed by the Predicate labs entity. The Middleware then broadcasts the transaction to the Operators.
-
Operator Verification: Operators fetch the corresponding Policy for the application, interpret the rules into actions, and validate the transaction’s adherence to the Policy. The result is a signed message indicating approval or denial.
-
Middleware Aggregation: The Middleware aggregates responses from the Operators and returns them to the client interface.
-
Transaction Submission: The client interface prompts the user to sign the transaction, as per the standard transaction flow. The transaction now includes Predicate Signatures in the data field. The user then submits the transaction onchain.
-
Signature Validation: The client contract verifies that the signatures are valid before any smart contract logic is executed.