IntroductionSome time ago PowerPool changed focus from developing Defi products for end-users to further developing the decentralized and autonomous network for automatic smart contracts execution.Read more about PowerPool pivot and our vision for the automatic smart contracts execution:Automation Agent Networks: The missing layer of DeFi 2.0 infrastructurePowerPool/PowerAgent Roadmap Checkpoint: 2 yearsThe first version of this network, PowerAgent v1, was built by the PowerPool team and successfully operated from late 2020 to late 2022.After analyzing other existing automation solutions for smart-contracts execution and applying our automation and Defi products building experience, we developed a brand new concept of a genuinely decentralized and permissionless network for smart contracts execution — PowerAgent v2.After months of stealth development, testing, and conducting academic research on the most critical problems of smart contracts automation networks, we are thrilled to present the current results, roadmap, and other important information to the PowerPool community.The results of working on PowerAgent v2In recent months the PowerPool DAO team dedicated significant resources to PowerAgent research and development. The work that was done can be divided into several logical sections:Code development, testing, deployment, UI/UX, and security auditsNetwork growth and analyticsAcademic research dedicated to making PowerAgent more secure and efficient for automating real-world automation use cases, including high-value tasks requiring guaranteed executionCode development and testingIn Nov 2022, the basic version of PowerAgent v2 was deployed to the Ethereum mainnet. As it had some bugs and issues, it was constantly updated and now works stable. Also, we developed a brand new Keepers’ selection logic based on a genuine source of randomness — ranDAO. The information regarding this update will be provided further in this article.Here we provide some links:https://github.com/powerpool-finance/powerpool-agent-v2https://github.com/powerpool-finance/powerpool-agent-v2-nodeThe PowerAgent v2 (using Flashbots gas auction for Keepers’ selection) contract address: https://etherscan.io/address/0x000000000000774d54f4064ec64beaadef498ae8The PowerAgent v2 ranDAO version (with random Keepers’ selection) — Goerli testnet contract address https://goerli.etherscan.io/address/0x7C628262F1bA91c0A8ff309bE1DB0C5e4A63BF50#codeNow Keepers operate in the network, signing the first (testing) Tasks added to the network.Also, the UI for adding Keepers and Tasks was developed:This UI will be added to the PowerPool website soon, simplifying adding new Keepers to the network.Network growth and analyticsAfter the network launch, the PowerPool DAO team launched three nodes for mainnet testing. The community members launched the rest of the nodes (a total of 18 now). The network stats are presented below:https://dune.com/0xPowerPool/poweragent-v2Execution activity:https://dune.com/0xPowerPool/poweragent-v2The absence of executions reflects a tech issue that was solved.Further PowerAgent node acquisition will be made via the Grant proposal. This article will discuss it in the Roadmap/Future Plans section.Academic researchIn the currently deployed version of PowerAgent, the Keeper for the Job is selected via the ‘gas wars’ mechanism: each Keeper submits a transaction in Flashbots, and one whose transaction had been included in the block wins. Others didn’t spend anything since there are no reverts in Flashbots. Also, the well-known ‘classic’ Round Robin approach for Keepers’ selection (what Keepers are selected one by one according to the list) was considered for implementation. However, such approaches aren’t the best ones for smart-contract automation networks due to the following drawbacks:The ‘gas wars’ mechanics don’t guarantee execution (since no particular keeper is responsible for the tx execution, and as a result, there is no slashing of the stake in case of no execution). Also, the probability of Keeper selection significantly depends on ping to Flashbots, which makes it far from a genuinely random selection;In the case of the Round Robin mechanism, the next Keeper is publicly known preliminarily to tx execution that theoretically reduces the system’s security (if the Keeper is assigned to a high-value task, and it is publicly known, the Keeper can commit an attack on the Job or be bribed). Even if such a risk is low, it is better to eliminate it using random selection.To solve mentioned problems, we worked on genuinely random Keeper selection, whose honest behavior (accurate tx execution on time or condition) is protected by CVP stake slashing. Additionally, we proposed the mathematical weighting function for bonding such a fundamental Task variable as a cost_of_no_execution with Keeper’s stake. It should maximize the probability of being chosen for the Keeper whose stake is close by USD value to possible loss in case of missed execution, protecting the Task owner from Keeper’s failure and setting up a measurable responsibility for that.The system design that we propose is based on the following:Usage the source of randomness generated by the Ethereum PoS consensus (ranDAO mechanism). Also, we designed an alternative scheme for generating randomness based on a commit-reveal approach for EVM chain operating using other consensus mechanisms (such as Polygon, BNB chain, etc.).Note that ranDAO mechanics allows PowerAgent to slash Keeper automatically. If the Keeper didn’t execute the tx on time or condition, other Keepers can execute the task and slash the Keeper that failed. Currently, it’s the only automatic slashing solution on the market. According to our simulations, it’s the best option for delivering a robust, fault-tolerant automation network.We explored some mathematical functions for bonding the probability of Keeper selection for a particular task with the size of the CVP stake. We selected the function, proved its optimality among others presented, and calculated the gas costs users would face if it were implemented in PowerAgent v2Also, we created a Python model that allows us to check out all the parameters and system behavior in various conditions for stress-testing PowerAgent v2. The detailed results of this research results will be published as a scientific article later.So, recapping the recent months, the following was delivered:The ‘basic’ version of PowerAgent v2 (‘gas wars’ via Flashbots) successfully operates in the mainnet, 18 nodes are launched (3 by the team and 15 by the community), >1,000 Tasks executedThe UI/UX for launching Keepers and Tasks was developedUnderstanding the limitations of Flashbots/Round Robin approaches for Keepers’ selection, the team conducted academic research on the topic and received brand new results (and, subsequently, the direction of further project development) that none of the competitors have. This work defines upgrades for PowerAgent during the following months and should provide significant technical advantages over competitors.The first version of ranDAO-based PowerAgent is being tested in Goerli testnetPowerPool RoadmapIn the nearest time, we plan to do the following:Incentivized testnet for PowerAgent v2 ranDAO version on Goerli. For this purpose, we will publish an incentivized testnet proposal on the PowerPool forum.Publish our recent research work devoted to PowerAgent and Keeper selection functions, and get an independent review from other mathematicians/Defi researchers.PowerAgent v2 (ranDAO version) mainnet launch the node acquisition process via the Grant Proposal and grow the network to at least 100 nodesAdd all new information and stuff to Gitbook and documentation.Publish all other relevant information regarding PowerPool’s upcoming products and integrations.Educate the community and start spreading information about PowerAgent v2 innovations via articles and AMAsStart collaborative research initiatives with other protocols needing automated smart-contract executions for their protocol operation.What’s next for PowerPool in 2023? Dev recap & roadmap was originally published in PowerPool on Medium, where people are continuing the conversation by highlighting and responding to this story.