| Definition | |
|---|---|
| Policy | A policy is a set of rules created by a developer that an intent must obey. It can be customized by an user to meet their needs and also can leverage offchain for verification |
| Intent | An intent is a proposed transaction. It contains basic fields in an EVM transaction like to, from, value etc. |
| Task | A task is a proposed intent along with the policy that it is meant to be evaluated against. Tasks are either compliant or non-compliant, meaning the intent is allowed to go through or will be rejected |
Walkthrough
Entities
1. Policy client
A policy client represents the user or developer using a Newton Policy to gate an action. For example, it could be a retail user that wants to gate transactions from their smart contract wallet depending on a security condition. A policy client configures a policy template with their own parameters before using it.2. Calling address
The calling address is a user or developer that performs a transaction on behalf of the policy client. The calling address could also be the policy client in the case of an end user. In the case of an AI agent, the calling address would be the agent and the policy client would be an end user. Ultimately, it’s the calling address that submits a task to Newton Protocol with an intent to perform a transaction.3. Newton AVS operator
The Newton AVS operator is a node responsible for verifying proofs in Newton Protocol. It receives tasks from a calling address and emits a proof depending on whether or not the task meets the conditions set by the corresponding policy.Flow
End-to-end flow for how a policy is created and a corresponding task is verified:-
Developer deploys policy template
A developer deploys a policy template on Newton Protocol. This template will be used by users who want to configure their own policy. On testnet and mainnet, Newton Protocol will have some pre-deployed templates that can be configured for common operators. -
User configures their policy client
To use a policy template, a user configures it for their own use case in two steps:- Integrate the policy address into their smart contract.
- Sign and submit a message with their corresponding data (e.g., for a spend-limit policy, set the limit value).
After this, a policy client is created.
-
Calling address submits a task
A developer or user uses the policy to submit a transaction that’s policy-guarded. The calling address constructs a task with their desired intent and the corresponding policy client address, then submits it to Newton Protocol. -
AVS operator evaluates the task
An AVS operator in Newton Protocol picks up the task to be evaluated. Here it actually verifies the task status as being compliant or not. - Calling address submits the intent Finally, a proof is given to the calling address entity that contains the necessary data to perform a transaction. A transaction is constructed to the policy client address using the proof and intent. At this point the transaction is completed by the policy client.