logo

Creating automation workflows with Dynamic Dispatch

Ava Protocol

Ava Protocol

· 4 min read
Thumbnail

Automate future tasks including switching or splitting Turing Network staking delegations!

Image

Create workflows that combine current and future Turing extrinsics

In case you missed it, StakeTUR, Nova Wallet, and SubWallet users are now automating web3 chores and boosting rewards by automatically staking spare $TUR. But Turing Network users have increasingly asked to automate other tasks as well — automating payments, splitting staking delegations, switching delegation to another collator, and delegating indefinitely.

Rather than enable each of these use cases independently, OAK Network is launching Dynamic Dispatch to:

Extend time-based automation to every extrinsic on Turing Network
Enable indefinitely recurring transactions
Javascript code snippets are now available in the OAK.js SDK repo to show developers how to build automation workflows using the new Dynamic Dispatch blockchain API.

Keep reading to learn how to use Dynamic Dispatch via Polkadot{.js} to switch collator delegations and indefinitely auto-compound with pay-as-you-go fees!

Switching Delegations with Dynamic Dispatch
Switching collator delegations is one of many workflows that Dynamic Dispatch unlocks. The below example combines:
1. Call to schedule leaving the current delegation (initiate wait period)
2. Call to unbond from the current (prior) delegation (after wait period)
3. Call to delegate the new collator

Image

Using Polkadot{.js} to switch Turing Network staking delegation using Dynamic Dispatch

Add an additional (third!) Dynamic Dispatch task to auto-compound Turing staking rewards with recurring delegations!

Auto-compounding with Dynamic Dispatch
Also new to Dynamic Dispatch is the ability to schedule indefinitely recurring tasks to eliminate the need for applications and users to define the set of times that a task will recur.

In this example, Dynamic Dispatch is used to create an indefinite “Recurring” delegation that begins at a fixed time (expressed as a UNIX timestamp) and recurs at a set frequency (expressed in seconds).

Image

Using Polkadot{.js} to schedule indefinitely recurring delegations using Dynamic Dispatch
Note that automation fees for indefinitely recurring tasks are calculated (in $TUR) and debited from the user’s account each time the task is triggered. Tasks scheduled for a finite number of occurrences still require up-front payment for automation fees.

Join the OAK community on Discord for more updates and to #brainstorm automation workflows!

About Ava Protocol

Ava Protocol is an intent-based Eigenlayer AVS that seamlessly enables private autonomous transactions for numerous use cases, such as DeFi, NFTs, and games. We're enhancing decentralized applications with scheduled and recurring payments, stop-loss orders, streaming rewards, and more. Ava Protocol’s event-driven execution model triggers cross-chain transactions based on signals such as time, price changes, and smart contract updates. Developers can easily schedule and automate functions across different blockchains, including Ethereum, ensuring efficient and reliable execution without compromising privacy.

Discord | Github | Medium | Telegram | Twitter | Website

Ava Protocol

About Ava Protocol

Ava Protocol is an intent-based infrastructure that empowers private autonomous transactions for Ethereum and beyond.