🧙♂️Dave: No Code Task Verification
Last updated
Last updated
DAVE, the Dynamic Auto Verification Engine, allows you to verify on-chain actions without the need for writing any code. Traditionally, you would need to integrate an API to verify if a user has completed a task. With DAVE, you can perform these verifications independently, without the need for a developer.
Benefits of DAVE:
Reduces dependency on developers
Eliminates the potential for code malfunctions
No coding knowledge required
More time-efficient compared to making cURLs
To leverage DAVE effectively, it's important to understand two key concepts: actions and queries.
Actions:
An action refers to a decoded on-chain operation or transaction performed on a blockchain. This can include a wide range of operations including swapping, bridging, staking, borrowing, lending, minting, burning, etc. Essentially, any on-chain transaction, qualifies as an action.
But to understand an on-chain transaction, we need some details to decode it. We need the contract ABI, relevant function call/events and also need to identify which parameter contains the user address. Once we have these details, DAVE can see all on-chain transactions and any transaction that it recognizes will be fetched and stored in the database.
Queries:
Queries, as the name states are query on the actions. Once DAVE understands the relevant transactions, those are fetched and stored securely on our servers. Then you can use queries to create more granular criterias like specify what tokens should be involved or the amount of those tokens.
To verify on-chain actions using DAVE, you simply need to create actions and then create queries for those actions.
Say you want to verify users who have swapped $100 USDC to ETH using your DEX. So first DAVE needs to know how to identify transactions on your DEX.
Create an action on DAVE to identify relevant transactions:
Specify what chain DAVE needs to look at
Specify what is the smart contract address where the transaction is directed at
Add the contract ABI
Select the relevant event and/or function to identify the swap operation.
Select which parameter in the transaction represents the user address (so that DAVE can accurately decide which users have done the transaction)
Once action is done, create a query on the action
The query will select the above action
Select what tokens the users must swap (USDC to ETH in this case)
Specify what should be the minimum amount.
And VOILA! you are done.
Now just use this query in the task and DAVE will automatically verify all the relevant user transactions.
Now suppose you want to verify another user action - Swap $100USDC to DOGE. Here, you don't need to create another action since we have already created an action for swaps before. All you need to do is create another query with different token sets.