Original author: 0xNatalie
Delegatable is a tool and framework for implementing general delegation on Ethereum, as well as a set of smart contracts. Typically, executing operations on Ethereum requires paying gas, but one of Delegatable's goals is to allow users to delegate others to perform operations on their behalf without paying gas or conducting transactions. Users can delegate operations to other users or smart contracts, and these agents will be responsible for actually executing the operations. Agents batch transactions for efficiency, reducing gas costs and improving efficiency.
Here are two examples to better understand the usefulness of Delegatable:
1) Alice wants to join friend tech, but she is not familiar with the registration process. Delegatable allows her to delegate her friend Bob to help her complete the registration process. Alice creates a delegation, granting Bob the authority to register on her behalf. Bob completes the registration process on behalf of Alice.
2) Assuming a DApp requires users to sign multiple transactions to complete a task, all of which require gas. With Delegatable, the DApp can allow users to delegate a specific proxy to perform these operations on their behalf, and the user only needs to delegate once, without having to pay gas for each transaction or perform the tedious transaction steps themselves.
As early as 2 months ago, we have introduced the concept of intent, and now the topic of Intent-centric has become a hot topic in the market. What kind of sparks will be generated when the Delegatable framework is combined with intent?
The user's intention can be divided into explicit intention and implicit intention. Explicit intention is a clear instruction on how to perform declarative transactions, which can be completed within one execution cycle without reference to past/future states. Implicit intention is a vague indication that involves complex conditions and logic, and requires monitoring of specific state changes in the future to determine whether to perform relevant operations.
Some of the operations involved in these implicit intents may require referencing external data or specific states in order to make decisions. However, traditional smart contracts can only be executed under predetermined conditions, and it is difficult to accurately express complex conditions and intents. This often leads users to rely on third parties to execute their transactions, losing autonomy and control. At the same time, since smart contracts are difficult to modify once deployed, users find it difficult to adjust their transaction intents in the future. Delegatable provides a programmable way to manage these complex execution conditions and a mechanism to verify them before execution. Users delegate decision-making power to smart contracts under the Delegatable framework, so that the contract can automatically execute specific operations based on the user's intent without the need for real-time user intervention. In simple terms, you delegate tasks that cannot be accomplished solely by the current smart contract to a decentralized protocol under the Delegatable framework, which judges the conditions you set and submits them when they are met.
The core concept in the Delegatable framework is the "Enforcer". The Enforcer is an intelligent contract module used to constrain the runtime execution of the EVM. Each Enforcer is responsible for measuring specific EVM state positions, such as the timestamp of a specific time or the state change of a specific contract. The Enforcer acts like a rule engine, which can restrict the execution of transactions to ensure that they meet the user's intended purpose and requirements.
An executor can be seen as a box that contains rules about how and when to execute transactions. These boxes can be stacked together. Users choose which executors to use based on their transaction execution intentions. For example, the BlockNumberAfterEnforcers executor uses block numbers as operation comparisons to limit transaction execution time. Users can sign a reference to the BlockNumberAfterEnforcers module for an off-chain call and create a declaration that says "I only want this transaction to be valid after block 420". The BlockNumberAfterEnforcers can also be used in conjunction with the DistrictUniswapV3TwapAboveEnforcer to create a declaration that says "I only want this transaction to be valid after block 420 and when the time-weighted average price of token A is higher than Y value".
Unlike other EVM rule frameworks, Uniswap V4 hooks, and security modules, Delegatable does not require the installation of new features at the runtime layer. For Enforcers newly deployed on the chain, any smart contract that uses the Delegatable framework can be used immediately. In addition, for smart contracts deployed using the Delegatable framework, users do not have to decide on all transaction conditions when deploying the contract, and can express implicit intentions to trade only when a certain state is met, or withdraw before the transaction meets the conditions.
1. User creates delegation: The user creates a delegation in the Delegatable framework's smart contract, granting specific permissions and operations. The user chooses to use an executor to define some details, such as allowed methods, time limits, quantity limits, etc. They can also choose whether to allow revocation of the delegation and whether to allow proxies to continue creating other delegations from the delegation.
2. Sign the delegation: The user signs the delegation message and generates a signature, which is stored off-chain. This signature serves as the user's authorization credential for the delegation, used to verify the user's identity and authorization.
3. Proxy Execution: The user passes the generated signature to the proxy, which can be another user, a decentralized protocol, etc. When the delegated transaction conditions are met, the proxy uses the delegated signature to authorize the execution of the transaction. This means that the proxy can execute the transaction under the user's authorization without knowing the user's private key.
Delegatable framework expands the dimension of intent management. It not only makes transactions more precise and personalized, but also provides users with greater autonomy and control. Delegatable + intent is expected to drive wider application scenarios and lower the threshold of blockchain. In addition to sophisticated intent, imagine another application scenario where Telegram Bot uses the Delegatable framework. Would it be more trustworthy because it does not need to know the user's private key?
Original article link
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia