PowerPool
  • powerpool overview
    • PowerPool
      • PowerPool DAO Story
      • Value Proposition
      • Use Cases
      • CVP Token
      • Vision 2027
    • Blockchain Automation
      • Glossary
    • PowerAgent Stats
    • How to contribute
    • Contracts and Links
  • Power Agent
    • đŸŽ¯PowerAgent features
    • đŸ›ī¸Architecture
      • â„šī¸Agent
      • â„šī¸Keeper
      • â„šī¸Job
        • Full Specification
    • 📜User Guides and Instructions
      • ❓I Want to Automate my Tasks
        • Job Registration Guide
      • ❓I Want to Become a Keeper
    • â„šī¸Scenarios
    • ⌛Old Pages
      • Installation Guide (Old)
        • Prerequisites
        • DAppNode Installation
        • Registering in PowerAgent
        • Installing PowerAgent Package on DAppNode
        • Standalone Installation
        • Chain-specific configs
      • Keeper (Old)
        • Keeper Registration and Update
        • Keeper staking, withdrawal, and deactivation
          • Keeper activation and deactivation in PPAgentV2RANDAO
        • Keeper assignment and release in RanDAO realisation
      • Job (Old)
        • Job Registration & Update
        • Job funds deposition and withdrawal
      • Agent (old)
        • Page
        • Execution
      • Technical Implementation (Old)
        • Hooks and helper functions
        • Errors
        • Modifiers
          • Flags
      • Job Registration Guide (Old)
      • 📑Testnet Rules
      • Slashing
        • Copy of Slashing
      • Task Reward and Gas Compensation
        • Fees and income sources
        • Copy of Task Reward and Gas Compensation
  • PowerPool Incentives
    • PowerPool Points Program
  • Security
    • Bug Bounty
    • Security Audits
  • Research
    • Automation Networks Research
      • Approaches on Keeper Selection
      • On-chain Random Number Generation
      • Keeper Weighing
      • 🌊PowerPool & PowerAgent Automation Network
      • Value Proposition-PowerPool
    • PowerAgent v2.1
      • Keeper Selection
      • Hooks
  • Resources
    • Website
    • Twitter
    • Medium
    • Discord
    • Github
    • Telegram
    • Governance Voting
    • Governance Forum
  • Legacy & Deprecated
    • Index Products
      • $YLA: Yearn Lazy Ape
        • Invest (ZAP) in YLA with low fees
        • Instant YLA mint via USDC
        • $CVP Boost Program
        • Redeem YLA
        • YLA Onsen Liquidity Mining [deprecated]
      • $BSCDEFI: BSC DeFi Pool/Index
        • Guide: Mint $BSCDEFI with $BNB
        • Guide: Multi-Asset $BSCDEFI Mint
        • Guide: PancakeSwap LM Farming
        • Add $BSCDEFI to MetaMask.
        • Redeem $BSCDEFI
      • $ASSY: Aave, SushiSwap, Synthetix, and Yearn Index
        • $CVP Boost Program
        • Underlying Token Staking
      • $PIPT: PowerIndex Pool
      • $YETI: Yearn Ecosystem Index
      • Market Price vs Fair Value
      • About ZAP
    • CVP reward program
      • How to create a DCA flow in Partitura
Powered by GitBook
On this page
  • User operations
  • Keeper registration
  • Job submission
  • Staking and withdrawing
  • Node operations
  • Keeper selection
  • Interval task execution
  • Resolver task execution
  • Reward Calculation
  • Slashing
  • Resolver Guidelines

Was this helpful?

  1. Power Agent

Scenarios

Different aspects of PowerAgent network operation

PreviousI Want to Become a KeeperNextOld Pages

Last updated 1 year ago

Was this helpful?

User operations

Scenarios related to users interacting with PowerAgent.

Keeper registration

This scenario covers the registration and activation of a keeper.

  1. The noderunner allows spending and stakes CVP, registering a Worker address in the Agent contract.

  2. The noderunner configures and launches the node software.

  3. The noderunner sends activation transaction into the Agent contract, enabling the node to execute tasks.

Job submission

This scenario covers the submission of automated task into the PowerAgent network.

0. (optional) The job owner deploys a smart-contract (which may contain a resolver function, which may also be in a separate contract).

  1. The job owner selects the implementation of the Agent contract.

  2. The job owner configures and registers the task in the Agent contract, accompanied by native token deposit.

  3. The job owner provides the address and the function of the target smart contract.

  4. The job owner sets the .

  5. The job owner sets the execution interval.

  6. The job owner provides the native token to be used as rewards for execution.

  7. The job owner submits the job into the Agent contract.

  8. The Agent contract randomly assigns a keeper to the job.

  9. The job is available for execution immediately.

Staking and withdrawing

TBA


Node operations

Scenarios which are related to the operation of the PowerAgent node and do not include user interactions.

Keeper selection

Keeper selection occurs immediately after the job submission, as well as after every job execution.

  1. The job is submitted or executed.

  2. In the same transaction, the Agent contract randomly assigns a keeper from a set of viable keepers.

  3. The node updates the information about the job.

  4. All keeper nodes set up a timer (for interval tasks) or immediately start static calls to the resolver function in each block (resolver tasks).

Interval task execution

The interval task is an automation task which requires execution once in a given period of time.

  1. Time comes for the task to be executed.

  2. The timer set by every node also expires.

  3. The node assigned to this task sends execution transaction to the Agent contract.

    1. If the node sends the execution transaction in time, the Agent contract checks:

      1. The sender is the assigned keeper OR both the sender is the current slasher AND the grace period is over.

      2. Whether the keeper has sufficient CVP stake globally and for this particular job.

      3. Whether the time is correct, and the task should be executed.

      4. The block base fee is not greater than the maximal base fee set by the job owner (OR exceeding the max base fee is permitted by the job owner).

      And several more checks.

  4. In case all checks pass, the Agent relays the execution transaction to the target contract address.

  5. In case checks do not pass, the Agent reverts the transaction.

  6. In case the execution is unsuccessful, the gas compensation is paid out to the keeper and the keeper is released.

  7. The job information inside the Agent contract is updated. The job is disabled IF there is insufficient job balance.

Diagram

Resolver task execution

The resolver task requires a special (resolver) function to return (executabilityFlag, calldata) in order to determine whether the task should be executed. executabilityFlag can be either true (the task SHOULD be executed THIS BLOCK) or false (the task SHOULD NOT be executed THIS BLOCK).

  1. All PowerAgent nodes virtually execute the resolver function related to this task.

  2. When the resolver function returns (executabilityFlag, calldata), the assigned keeper sends the execution transaction to the Agent, passing the calldata received from the resolver execution.

  3. The Agent relays the transaction to the target function of the target contract, passing the calldata.

Diagram

Reward Calculation

TBA

Slashing

Slashing is the process of partial keeper stake alienation in benefit of a slasher keeper.

Each keeper is given a certain time window, during which ONLY he can safely send an execution transaction. If a keeper fails to do so, another keeper (named slasher) will send its own transaction. In this transaction:

  1. The task is executed by the slasher (see Interval task execution or Resolver task execution).

  2. The negligent keeper is slashed for a following amount:

SA=dSA+fSAdSA=KS⋅FS10000fSA=FSfixed⋅1etherSA = dSA + fSA\\ \hspace{1mm}\\ dSA = K_S \cdot \frac{F_S}{10000}\\ \hspace{1mm}\\ fSA = F_{S_{fixed}}\cdot 1\hspace{1mm}etherSA=dSA+fSAdSA=KS​⋅10000FS​​fSA=FSfixed​​⋅1ether

Where:

  • SA,dSA,fSASA, dSA, fSASA,dSA,fSA - Slashed Amount, dynamic Slashed Amount, fixed Slashed Amount

  • KSK_SKS​ - keeper's stake.

  • FSF_SFS​ - slashing fee (bps).

  • FSfixedF_{S_{fixed}}FSfixed​​ - fixed slashing fee.

  1. The slashed amount is immediately added to the slasher keeper's stake.

Resolver Guidelines

TBA

The set of viable keepers is determined by the keepers' stake and the job-specific stake range. The range is set by the job owner. See more about .

If the node does not send the execution transaction in time, occurs (if there is at least one non-malicious node in operation).

In case the execution is successful, the and paid out to the keeeper.

is performed.

The following steps are 7., 8., and 9. from .

â„šī¸
slashing
reward is calculated
Keeper selection
Interval Task Execution
stake range
job configuration