Please describe your proposed solution.
Decentralizing the batching agent is the grail among the current DeFI protocols and it is a long-awaited and requested step from the community. It benefits the overall ecosystem by bringing forth pioneering research into decentralizing protocols with a single centralized off-chain component, commonly called the agent or batcher. It gives opportunities to 3rd parties to financially benefit from participating in the protocol. Lastly, it gives users access to more decentralized and therefore resilient DeFi applications.
However, it presents several challenges. In essence, a system is needed where anybody can participate as a batcher, but at the same time, ensure that everybody gets a fair chance to create batches and that everybody follows the rules that cannot be enforced in smart contracts (FIFO ordering of requests, not blocking liquidity pools). Therefore, the solution consists of 3 parts.
- Smart-contract lease on batching agent authorization tokens
The core of the solution is an open-source system to lease the authorization tokens, needed to create batch transactions. This smart contracts-based lease system will be collateralized to ensure there is leverage on potential malicious actors. Furthermore, the individual leases will be rate-limited smartly to ensure that everyone gets a chance to create a batch. The collected batching agent fees will be time-locked in the lease for a short period, and in case of malicious behavior, these fees will be slashed together with the collateral, further discouraging bad actors. More on slashing in the 3rd part.
2. Open-sourcing batching agent software
WingRiders will open-source the batching software with modifications to support the leased tokens to ensure anybody can easily spin up a batching agent instance.
3. Open-sourced auditing tool to monitor the fairness of decentralized batchers
The auditing tool is here to monitor that every participating batcher follows the rules of fair participation. These are rules that cannot be enforced in a smart contract - strict following of the FIFO order, not blocking liquidity pools with small batches, etc. If a malicious actor is detected, then upon agreement by the DAO, their collateral will be slashed and the lease canceled.
Overall, the solution will be specific to WingRiders, but the research and contracts done while developing the catalyst proposal could be adapted and reused by other DEXes using a similar batching agent model.