Volume team is building an automatic GHO leverage trading bot on Paloma chain for AAVE. The bot will provide on-chain, fully automated service for AAVE borrowers to take a leverage position on their collateral tokens. By using the bot’s front-end and or smart contracts, users can borrow GHO and swap it for extra collateral tokens hence the leverage. In addition, the bot will keep track of the loan’s health factor and de-leverage before liquidation. This can significantly improve leverage traders’ user experience and help them maintain the health of their position to avoid liquidation.
Value propositions The core value prop of the GHO leverage trading bot is connecting traders’ leverage demand with AAVE’s deep liquidity and providing rigorous risk management. For users who would like to add leverage to their position, it requires the capability to borrow stable coin against their collateral and swap it for more collateral. To this end, AAVE’s liquidity and GHO token are a perfect pair for facilitating this functionality. Since a loan can be liquidated once its health factor falls below the liquidation threshold, any loan position is subject to liquidation risk. In order for liquidation to not happen, a borrower needs to constantly keep their eye on the risk factor. To this end, this bot will be a one-stop shop that takes care of the risk monitoring entirely.
Specs The leverage trading bot consists of the following core backend components:
- Vyper Smart Contracts to control the EVM accounts
- Cosmwasm smart contracts on Paloma to receive and deliver commands based on EVM activities
- Python scripts that use the PalomaSDK to execute monitoring and account orders.
The Vyper contracts are built for direct interactions with AAVE’s functions such as lend, borrow, repay and check the health factors. It will also include a swap function for swapping users’ borrow stablecoins for collateral token on a DEX or vice versa. The Cosmwasm contracts handle bot strategies, key data management and job scheduling. They also are used to control the vyper contracts. The Python programming interacts with the Coswasm contracts to fire messages to the Vyper contracts that manage the liquidity positions.
Volume will supply a frontend to server as the main interface for users so they do not have to programmatically work with the leverage trading bot. When visiting the frontend, a user specifies information including risk health factor thresholds, risk reduction method, risk reduction token (any token that can be swapped for the borrowing tokens), and duration. Users will also be able to program their own management functions using Paloma’s Python SDK and Vyper contracts, which are freely open source and will be available for any developer to leverage for their own bot management on AAVE.
When bots are running, the Paloma Cosmwasm contracts will periodically pull data from AAVE to examine each bot’s risk. If one of the bots’ risk threshold is reached, the contract will send messages to the EVM chain and execute the Vyper contracts’ functions to take actions according to users setup, such as to repay the loan partially. If a user decides to stop the bot, they may do so and withdraw their liquidity at any point.
Our GHO Leverage Trading Bot on AAVE will bring more lending and borrowing activities to V3 and more usage of GHO in the meantime. The bot will provide a one-stop shop type of service for traders to add leverage to their positions via lending and GHO. The risk management layer of the bot will provide automatic deleverage to avoid liquidation, which may significantly improve users’ position risk and user experience.
Volume’s AAVE leverage trading bot will bring a fully automated leverage trading and risk management services to AAVE’s lending ecosystem. This bot will give users supply-borrow-swap functions to increase their leverage while monitor users’ loan positions and take actions to help users reduce risk and avoid liquidation. This can improve AAVE in a number of ways:
-
The GHO leverage trading bot will increase supply and GHO borrow volume on AAVE. Users of the bot will bring in their collateral as supply to borrow GHO in order to swap for more collateral tokens. The bot’s FE will facilitate the entire leverage trades in a simple UI, helping ease the operational challenge.
-
The lending bot will also reduce overall liquidation, which lowers AAVE’s systemic risk. As users’ loans will get repaid automatically before their risk health factor gets to liquidation levels, the number of bad loans will see drastic drop. This is especially beneficial if the market undergoes sharp selloff. When major selloff happens, most risky tokens go down in price and loans’ risk tend to spike up in a short amount of time. Due to the speed of these events, borrowers usually have little to no time to react, which collectively makes AAVE’s systemic risk rise. The lending bot’s automation will be extremely useful for AAVE and its borrowers.
Conclusion: Bringing leverage trading and loan management to Aave will increase the attractiveness of AAVE lending pools to borrowers. It will also lower the risk of negative assessments from Aave loan risk auditors and the pressure to respond from various audit positions. More automation will make risk assessment easier.
Volume aims to achieve the deployment of AAVE Leverage Trading Bots with the following milestones:
Milestone 1: Vyper and Cosmwasm contracts development Volume will develop Ethereum Vyper contracts for direct interactions with AAVE’s contracts, such as lend, borrow, repay and add collateral. In addition, the contracts will swap borrowed tokens for collateral tokens on a DEX and vice versa. There will also be Cosmwasm contracts developed and deployed on Paloma. These contracts are used for handling bot strategy computation, key data management and job scheduling.
Milestone 2: frontend and middleware development and end-to-end testing Once the smart contracts work is complete, Volume will build middleware to bring smart contract functionality to a user interface. The team will design and develop a frontend for bot usage and management. When both are done, full integration tests will start. The contracts will be deployed on Ethereum and Paloma mainnet and tested. Successful integration tests will be followed by a formal launch.
Funding Requests breakdown spreadsheet with Time and Resources required:
https://docs.google.com/spreadsheets/d/1YLV1WNSZxBCjw3NkRBoa8_M-m_ueFpCHiXYiD2UYa00/edit?usp=sharing
If AAVE were to offer required risk automation for pools as an option, but require it for high-risk pools, it would enable greater usage of more assets on the protocol and reduce pressure on risk audit and assessment.
For example in the recent Gauntlet proposal https://governance.aave.com/t/gauntlet-recommendation-to-freeze-crv-and-set-crv-ltv-0-on-aave-v2/13644, it may have been easier and less stress on the community to propose a vote to require that CRV LTV use Liquidity Management automation to adjust risk profiles by borrowers who may use the Volume AAVE liquidation bot to repay loan LTV automatically and within certain parameters.
New tools to manage debt encourage safer AAVE borrowing and reduce the pressure on the AAVE risk management teams. This grant is a massive WIN for AAVE.
Highlights of Volume/Paloma’s Audiences:
- Twitter Followers: 40,000
- Discord Community: 506
- GitHub Activity: 284 Likes
Volume Aave GHO Leverage Trading Bot History
-
accepted into Random Round 6 months ago.