Sitemap
PowerPool

DePIN layer powering AI Agents and DeFi automation in multichain universe. We bring superpower to networks with substantial liquidity, massive user base and lots of transactions.

PowerPool Update — October 2024

11 min readNov 4, 2024

--

Press enter or click to view image in full size

Hello, PowerPool Community!

Welcome to the most recent update regarding PowerPool’s developments and achievements in the past month.

In this article, we will cover:

  1. PowerAgent V2: Network stats
  2. PowerAgent Code & UI changes
  3. R&D activities

Let’s explore this in detail!

PowerAgent V2: Network stats

Press enter or click to view image in full size

To participate in the PowerAgent testnet, join the PowerPool Discord!

PowerAgent Code & UI Updates

Here is a list of code and UI updates that were done during the recent months. Note, that some of links point to private repos and later will have public access.

Contracts:
- We reworked the VRF architecture so that the call to fulfill random words is made from the agent to the VRFAgentCoordinator, not the VRFAgentConsumer;

- We reworked the contract deployment process by adding PPAgentV2VRFBased support, a script to generate JSON for verification, and a test to fulfill the resolver using the time machine.

- We added an agent to getRequestData and improved the agent repository for testing on the server.

- We investigated the bug: Blacklist on slashing error (SlashingNotInitiatedExecutionReverted), but it could not be reproduced.

- We added the deactivateJob method to the Agent Manager.

- We migrated the agent on Linea to the new consumer version.

- We developed a prototype version of the safety module.

- We tested the process of bridge-created sidechain token contracts and analyzed their requirements.

- We tested the CVP bridge locker across different networks.

- We deployed CVP and the bridge locker to the Base chain.

- We investigated the use of the Arbitrum native bridge for CVP.

Liquidation Protection Contracts:

- We conducted a test to measure gas expenses for executing protection with 1 and 2 tokens on the Gnosis chain.

- We made LP strategy ownership non-transferable.

- We added a MultiToken strategy.

- We adjusted baseToToken to better handle rounding errors.

- We included reservoir balance and approval checks in the resolver.

- We added a deployedStrategies mapping and a knownAddressRegistries list to the Factory.

- We deployed the LP strategy for tokens on Arbitrum and triggered HF bumps.

- We added some forked tests for the MultiToken strategy.

- We added more mocked tests for the MultiToken strategy, covering scenarios with zero balances and full allowances, using only the first token with sufficient balance, using the second token with sufficient balance while other tokens are unused or have zero allowance, and similarly testing the third token with varied balance and allowance conditions.

- We fixed issues with running forked tests.

- We implemented a restriction to prevent setting protection for zero tokens.

Power Agent Node (TS):

- We debugged the resolver’s success callback and fixed the issue where resolver callbacks were not performing any actions.

- We fixed the issue with the _onNewBlockCallback error: `Cannot convert undefined to a BigInt.`.

- We investigated the issue where the interval was attempting to execute twice, but we couldn’t reproduce it.

- We fixed the slashing issue on Arbitrum where the error ‘Cannot connect to WS: RangeError: Max payload size exceeded’ occurred.

- We fixed the _onNewBlockCallback error: ‘Cannot mix BigInt and other types, use explicit conversions,’ which caused a stack TypeError.

- We added logging to address the QueueEmitter.execute error.

- We fixed the Graph meta query error: `TypeError: Cannot convert null to a BigInt`.

- We investigated the issue with txExecutionFailed: insufficient funds for intrinsic transaction cost despite having a $10 balance on Arbitrum. The problem resolved itself.

- We fixed the slashing issue by updating queryJob for the Subquery data source.

- We investigated and fixed the issue where the Subgraph was 281,278 blocks behind on node startup.

- We configured node and Explorer tests to run in Docker with a PostgreSQL database to eliminate local environment issues and better align the test environment with production.

- We fixed the issue of excessive requests from the keeper causing RPC overload on Gnosis.

- We fixed the gas overestimation issue on Sepolia .

Power Agent Off-chain service (TS):

- We modified the VRFProofGenerator to use the consumer as the sender address in the preSeed.

- We updated the tests to use the VRFAgentConsumer as the job address.

- We started using a go-IPFS node to store and retrieve off-chain scripts ().

- We performed additional tests and debugged the off-chain service, fixing potential errors.

- We added a go-IPFS node to the Docker Compose configuration .

- We reworked scriptToExecute to fix the problem with the subquery on VRF.

- We fixed the IPFS connection to bootnodes and added limits for saving and downloading files.

- We made some updates to the off-chain service: deleted old scripts on startup and did some minor refactoring.

- We implemented a potential fix for the issue where the container couldn’t be killed, resulting in a zombie state.

- We fixed an issue in the off-chain service by correcting the scriptsToExecute path, which was causing a ‘Cannot find module’ error.

- We fixed an issue in the off-chain service where build script objects were empty on service startup.

- We fixed the issue of IPFS taking up too much space by resetting it every 24 hours.

- We investigated the issue of no polling resolvers after reconnection on Base, caused by server connection problems with the internet.

dApp:

- We created a Points Leaderboard page.

- We created a Points Referral page.

- We created Points Overview page.

- We created Points Account page.

- We added all necessary functionality to the overview and leaderboard pages and performed testing.

- We performed tests and fixed issues on the Referral page.

- We performed tests and fixed issues on the Points Account page.

- We finished the markup and logic for the Points Overview page.

- We finished the markup and logic for the Points Account page.

- We tested two Points epochs and implemented some fixes.

- We finished the markup and logic for the Points Referral page.

- We finished the markup and logic for the Points Leaderboard page.

- We fixed the referral link generation and copying functionality in the Overview page markup.

- We made adaptive design and markup fixes for the Points program pages.

- We added navigation to the Points Account page.

- We made some minor UI fixes after the review. [1][2]

- We fixed the issue with initContracts when using a referral link. The problem occurred when visiting the page via a referral link — if the wallet wasn’t connected, the issue could only be resolved by reloading the page.

- We conducted tests on the new keeper creation and registration in the Points system. [3][4]

- We added the job owner to the UI and tested it.

- We fixed bugs from the markup review, removed a deprecated button, and improved design system element.

- We added network information to the Points leaderboard.

- Following testing, we fixed points-related issues: corrected broken leaderboard rankings on page 2, addressed missing points earnings after multiple job executions, resolved an issue where users still saw epoch 2 in epoch 3, and clarified the registration reward row name to reduce user confusion.

Get PowerPool’s stories in your inbox

Join Medium for free to get updates from this writer.

- We redesigned the job creation page based on the new layout, simplified the interfaces, and updated the data input forms.

- We redesigned the agent list page by removing unnecessary elements and simplifying the interface. The page now consists of a single list of agents with collapsible elements, rather than a two-part layout. When creating keepers or jobs, the required agent will expand automatically.

- We redesigned the ‘All Keepers’ page based on the new layout, with a focus on improving the filtering system, as it occasionally malfunctioned after applying the agent filter.

- We redesigned the ‘All Jobs’ page based on the new layout. Additionally, we removed overly complex, separate forms for mobile devices; resizing the existing desktop elements now suffices for mobile compatibility.

- We prepared the Subquery infrastructure for new contracts on Linea and Arbitrum and integrated these contracts into the application’s UI. [5][6]

- We redesigned the ‘My Jobs’ page based on the new layout, with special attention to adding filtering similar to the ‘All Jobs’ page and limiting displayed jobs to the selected agent.

- We redesigned the ‘My Keepers’ page according to the new layout. Unlike the ‘All Keepers’ page, the list elements now include detailed information about each keeper.

- We redesigned the Explorer Keepers page, updating main elements such as search and replacing filtering elements with ones that follow the new design.

- We redesigned the Jobs page in the Explorer.

- We redesigned the Transactions page in the Explorer.

- We redesigned the Statistics page in the Explorer.

- We updated the agent picker UI to make it clearer which agent is selected. Displaying only the agent address was insufficient, so we added the agent name for better clarity.

- We added auto-selection of agents with existing keepers on the My Keepers page.

- We fixed an issue where the ‘Create Keeper’ button at the bottom was not working.

- We fixed an issue where keeperFrom and keeperTo fields were empty in the executions list.

- We added the Liquidation Protection app to the PowerPool dApp.

- We fixed an issue where jobs were not updating after release or balance withdrawal.

- We improved the ‘Next Execution’ logic to correct an issue where unassigned jobs were incorrectly displayed as ‘Already Executing’ in the UI.

- New feature: implemented a 30-second interval update for jobs with the status ‘Already Executing.’ While active, setInterval refreshes the job status every 30 seconds, updating the history to reflect new debit (execute) entries when the status changes.

- We investigated how the Arbitrum bridge affects the UI flow.

- We added off-chain resolver jobs to the job creation process.

- We reworked the Bridge UI to support any DeBridge network.

- We fixed an issue where the UI didn’t function correctly with different contracts on Linea and Arbitrum. [7][8]

Cross-chain DCA trading strategy dApp:

- We conducted a basic test of the DCA strategy;

- We migrated to a new version of Webpack to resolve Node-gyp failures on macOS. We also attempted to use a VM during the process.

Aave Liquidation protection dApp:

- We implemented Aave position fetching and added a link for creating positions in the protection app.

- We initialized the Liquidation Protection app, removing any unnecessary code from the PowerPool boilerplate. Although based on the PowerPool framework, this application will be significantly simpler, so eliminating redundant code was essential to streamline it for production.

- We created an interface for deploying smart contracts from the factory in the Liquidation Protection app.

- We added UI functionality for editing protection tokens, enabling users to remove and add tokens, change token order, and add any missing allowances from the contract creation phase.

- We added functionality to edit protection contract parameters, allowing users to modify the target and trigger health factors and deprecate the protection contract if needed.

- We updated the main protection UI by enhancing the protection indicator and adding a protection tokens list.

- We added functionality to accept job transfers and provide allowances for protection tokens after the protection contract is created.

UI/UX:

- We created a design template for the Safety module.

- We created a complete design for the ‘Liquidity Protection’ dApp.

- We created a complete design for the ‘Points’ section.

- We made changes to the header by adding a Points indicator.

- We added the agent name to the agent filter.

- We added an agent picker to the Explorer.

subQuery:

- We investigated the missing Keeper slashing information and fixed it by resyncing the Subquery.

- We investigated and fixed the issue where Subquery would randomly stop and not restart.

- We fixed the issue of the Polygon Subquery lagging by more than 200 blocks. This delay was critical for the ecosystem, as Polygon requires a 200-block wait to prevent forking before data retrieval. We reduced this delay to 20 blocks to improve responsiveness.

- We fixed an issue where the Subquery on Arbitrum production was failing due to the unfinalized-blocks option.

Explorer:

- We implemented basic referral logic in Explorer, with verification using Dune Analytics.

- We made several improvements to resolve the issue of Explorer not being up to date.

- We added epochs and points reporting to the Explorer.

- We added compensation and transaction fees to the transactions in the Explore.

- We added functionality to calculate points based on compensation and initialized API endpoints.

- We improved the backend for frontend integration and performed testing.

- We performed tests, fixed issues in the Explorer, and added rewards for users joining the Points program.

- We optimized the database by removing the ReferralInvited model, adding the ReferralAction model, and creating compensation actions in onTransactionReferral.

- We replaced transactions with referral actions in the Explorer and tested the account page list.

- We added leaderboard addresses, referralTotalPointsGave, and updated the referral epoch on new transactions.

- We updated pointsPerCompensationPerNetwork and tested two epochs in the Points Explorer.

- We created a snapshot for the previous epoch and improved the filtration process.

- We improved the referral points system by adding a database column to track how many points a referral has given to their referee. This value is fixed at the time of snapshots and is summed with previous amounts.

- We added safeExecute and a referral existence check, and renamed GlobalReferralEpoch. Middleware was implemented to prevent users from double or triple claiming points, addressing the previous issue where users could click twice and receive double rewards. This feature makes that no longer possible. Additionally, API security was improved, and the model was renamed.

- We added UserTotalReferralEpoch and middleware support to the worker’s endpoint. Previously, the middleware worked fine in the main thread but lacked support inside worker threads. This update adds middleware support for API requests within worker threads. Additionally, UserTotalReferralEpoch was introduced to sum up all user referral earnings per epoch.

- We conducted additional tests and improved the API for the UI.

- We updated the Points Explorer by setting a new configuration, resetting the database, and testing new values.

- We improved the creation of providers with a stable RPC URL in the Explorer.

- We fixed the retrieval of the job address from the execute txData.

- We added and tested jobOwner compensation points in the Explorer.

- We fixed the ‘undefined’ error when creating blacklist jobs. The issue was in the parseAndSetUnrecognizedErrorMessage function, which caused empty error messages in some cases.

- We debugged and fixed the issue with the user total epoch not updating in the leaderboard.

- We improved the /api/referral/users-epochs endpoint in the Explorer.

- We improved the Explorer to test the Points system, added environment variables, enhanced the configuration, and fixed the database schema to function in the new test environment.

- We created an automated test for the Points system, improved the Docker environment to execute tests, wrote a test to verify general values in the Points system, and resolved Docker bug docker/for-mac#6956.

- We addressed points issues reported by beta testers by improving RPC switching to more stable options, handling failed requests with automatic RPC switching, enhancing logging for RPC issues, fixing referral action constraints, refactoring API endpoint code, and updating the RPC endpoint list by removing unavailable endpoints and replacing them with active ones.

- We conducted automated tests and fixed bugs, including improving logging for unavailable providers, enforcing model conditions for tests, creating base method signatures if absent, changing epoch duration from one week to two, fixing total epoch updates, and correcting the recording of referralPointsAmount in the database.

- We debugged and fixed the issue with compensationPointsAmount not updating in the Points Explorer.

Landing page:

- We added Linea and Gnosis diagrams to the pie chart on the landing page.

- We added Polygon to the pie chart.

- We improved the landing page’s stability to ensure real-time project statistics load reliably, even on unstable internet connections.

Infrastructure:

- We launched an additional BASE node.

- We launched an additional OP node.

- We launched an additional Linea node.

- We launched an additional archive Ethereum node.

- We fixed an issue on the Gnosis node related to widespread block requests by configuring NGINX logging for JSON-RPC requests with IP addresses, reducing the maximum block query limit for eth_getLogs from 20K to 5K, and lowering the request timeout from 20s to 10s. No new issues have occurred.

- We updated the Arbitrum node to the latest version.

- We updated the Gnosis node to the latest version.

R&D activities

The PowerPool research team tracked all node activity, provided $CVP airdrops, tested all software updates & features mentioned above, and reported issues to the development team. One of the most important activities was testing the new points system, which is planned to be released soon, after closing the legacy one and distributing rewards to the legacy points owners.

--

--

PowerPool

Written by PowerPool

DePIN layer powering AI Agents and DeFi automation in multichain universe.

PowerPool

Published in PowerPool

DePIN layer powering AI Agents and DeFi automation in multichain universe. We bring superpower to networks with substantial liquidity, massive user base and lots of transactions.