Introducing PowerAgent v2 Automation Network

Smart contracts don't execute themselves - Part 2

Introduction

Trustless, open-source code-based operation is increasingly important for DeFi protocols. EVM-compliant protocols and services cannot effectively automate ‘trustless’ timely ancillary ‘supportive’ transactions triggered by on-chain logic or time conditions. Such transactions require signing by another address external to the contract that needs to be called or executed at the right time and under the right conditions. Most effective DeFi strategies require many such operations, and ideally they should be autonomous, decentralized, and have balanced incentives for each operation.

In common terminology, a person, entity, or network controlling such an ancillary address, ensuring timely initiation of transactions signing based on predefined conditions, and maintaining all required conditions for tx signing (such as the ETH balance for gas required, continuous uptime server running) are typically called Keepers or Agents.

A single, standalone integrated Keeper or Agent to automate a specific contract or protocol is sometimes observed, but makes almost no sense from a trustlessness perspective since it acts as a point of centralization, exposing the whole system to risks of no execution in case of system failure or not signing a transaction when the condition is met. Therefore, the problem of supplying reliable, trustless automation requires an autonomous, decentralized, properly-incentivised/penalized Agent Network with proper mechanism design and economic incentives ensuring reliable transaction signing at a reasonable cost. We have already published more detailed rationale and typical automation use cases in Part 1.

In this Part 2 of the series, we discuss general principles for delivering the automation  network the on-chain EVM market requires, with particular requirements, design options, and other relevant features based on PowerPool’s pioneering automation experience (more than 1.5 years of automated DeFi products operation at scale based on code built by our team).

Definitions:
PowerAgent
-
a smart contract containing all Jobs submitted to the Automation Network that should be signed by Keepers;
Job/Task
- transaction or sequence of transactions that should be executed on time by an Automation Network according to executing conditions. Jobs/Tasks are provided by the Automation Network clients (protocols or ordinary users);
Keeper - autonomous agent signing txs, an elementary unit of the automation network. In the context of the network a Keeper can be defined as a ‘node’;
Signers’ Set - set of agents committed to executing particular Job (in the most simple, gas efficient design) or dedicated job clusters;

PowerPool’s Approach to Automation and PowerAgent v2

Based on extensive experience, we believe the best approach to automation should be both task-specific and chain-specific to effectively balance the cost of operation, degrees of decentralization, and reliability in task execution. Tasks differ by importance (mainly based on the cost of no execution and max possible execution cost), while chains differ by transaction costs (expensive and cheap networks) and the MEV risk environment:

This article presents the rationale behind the newest version (v2) of the PowerAgent autonomous decentralized automation network. This EVM-compliant version was designed especially for Ethereum, considering expensive transactions and the MEV risks.

The principal design goal for PowerAgent v2 was to create a simple, reliable, gas-efficient, and easy-to-use automation network with built-in crypto economic incentive mechanisms to facilitate network node acquisition to achieve broadly-diversified signer sets. Uniquely, PowerAgent v2 uses our approach to defining signer sets subgroups for specific jobs/tasks to establish a similar signers’ set for batches of similar tasks with similar execution requirements.

PowerAgent v2: generalized configurable automation

The newest version of PowerAgent was designed to create a generalized, autonomous  automation network acting as a ‘zero layer’ for automation.

Aligned with this vision, there is no particular ‘hardcoded’ algorithm for Keepers’ selection in the basic version of PowerAgent v2. We abstracted it on purpose to offer an opportunity for adding any type of Signers’ Set selection algorithms and cryptoeconomic mechanics for particular tasks (such as varieties of algorithms for high-loaded systems - Round Robin variations, etc):

In the ‘zero layer’ version, all PowerAgent Keepers have an equal opportunity to execute a Task/Job by submitting transaction(s) to the Flashbots mempool (creating an authorized transactions analog of ‘gas wars' but without any tx reverting costs).

The codebase of PowerAgent v2 was developed using EVM Assembly and operates with one EVM slot, which makes it more gas efficient than all other existing automation networks (like Gelato).

PowerAgent Task Registry

The PowerAgent contract is a registry for all Tasks/Jobs submitted to the PowerAgent automation network. Task/Job information contains minimal CVP stake of Keepers approved for execution, deposit in ETH, execution interval, fixed fee, a gas fee (% of base fee), and max base fee.

We distinguish three types of Tasks/Jobs:

  1. Signature (0) - method without arguments aka harvest() without arguments // e.g. Vaults harvest
  2. A method with a predefined set of arguments/parameters (1) // e.g. limit order [1]
  3. Resolver (2) - a special method in a contract that contains logic is it possible to call a contract or not. If yes, it returns calldata for execution, if no - returns false // e.g. a liquidation in Liquity/limit order

The end-user of an automation network when adding a job to the PowerAgent Registry submits:

  1. Contract address/other parameters mentioned above
  2. ETH deposit that will be continuously consumed by Keepers, executing the job. For each execution user pays fixed fee and gas fee as a % of base fee, both parameters could be 0

After being added, the job starts to be executed according to time/conditionality by the Signer’s Set of Keepers. Keepers don’t need to monitor contract changes or ABI updates during operation. That is the responsibility of a protocol acting as job owner. If the contract address/contract ABI changes, the job owner should create a new job and close an old one, transferring the remaining ETH deposit to a new one.

Keepers and tx signing

To become a Keeper, a prospective Node Operator needs to join one or more Singers Set(s) by staking PowerPool $CVP tokens into the PowerAgent contract. The different Signers Sets are defined by the minimum $CVP staking requirement. Depending on the open node’s stake, any Keeper from the specified Signers’ Set can execute a Task/Job defined for that Signer’s Set. The Keepers’ node software continuously monitors the Ethereum network and when tx conditions are met it automatically submits transactions to the Flashbots.

The number of operational nodes in any given Signer’s Set has no limit, but only one Task/Job transaction submitted from the Signers set will be successful while others are declined. There are no tx revert costs for Keepers transactions that weren’t included in the block. The PowerAgent system works as a kind of simple auction where profit from the tx is earned by the Keeper/Agent willing to pay the highest priority fee and therefore accepting the lowest margin while fulfilling all the requirements for Task/Job execution.

The PowerAgent Network is designed to protect itself from potentially fraudulent Keepers' behavior. These could include sandwich attacks or other manipulation of the Tasks/Jobs. To protect PowerAgent network clients, network nodes’ CVP stakes can be withdrawn only with a certain cooldown period. The PowerPool/CVP DAO community can slash any Keeper via governance multi-sig. The governance multi-sig will contain several community-elected members acting as a last resort force for punishment Keepers acting fraudulently.

Anyone can become a node operator/Keeper on the PowerAgent automation network. The Keeper onboarding process is very straightforward, especially for those already operating nodes for oracles or other chain monitoring services:

  1. Prospective node operator/Keeper installs PowerAgent server software on typical high-availability server hardware with good connectivity;
  2. Once node software is installed, prospective Keeper deposits PowerPool $CVP tokens (minimum 1,000) or more depending on the Signer’s Set level the node/Keeper wishes to operatorate at. Note that staked $CVP can only be withdrawn with a 30-day cooldown period. {and recommended amount of ETH - because signing of the very first tx should be done using own funds}
  3. Keeper staking receives an LP token representing total $CVP staked
  4. Keeper qualifies as a member of defined Signers’ Sets (according to $CVP stake) and automatically becomes eligible to start executing all Tasks/Jobs corresponding to those Signers’ Sets, receiving yield in ETH each time their submitted transactions are actually executed by Ethereum/EVM network

Below we present examples of PowerAgent v2 automation tasks and detailed Keepers’ income sources:

How to become a Keeper (tx signer) or use PowerPool automation?

PowerPool is looking to partner with protocols seeking to leverage generalized automation, and node operators looking to earn income according to configured terms and conditions:

  • Protocols and DAOs: we will automate your strategies, products, or solve any other automation tasks
  • Node operators: you can run PowerAgent node software in one click and earn income from executing tasks and liquidity mining program

Contact us:

Twitter:

Discord:

About PowerPool

PowerPool is a fair-launch DAO which has been developing structured investment vehicles with automatic smart contract execution since late 2020. We have already built and operated various DeFi indices with dynamic weights, first asset managers for Balancer AMM, fund-of-funds strategies on top of Yearn.Finance, and infrastructure products such as TWAP oracles.

PowerPool has been featured in Bankless, Paul Veradittakit’s newsletter, Binance Research, Cointelegraph, and Messari Crypto Thesis and articles.

Subscribe to PowerPool Research
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.