Volume Aave GHO Leverage Trading Bot
{"type": "project", "title": "Volume Aave GHO Leverage Trading Bot", "logoImg": "bafkreib6h2kootbfzy2ephi7qallv5j3yzuwvjkbukih7auo65o65jorsu", "website": "https://volume.finance", "createdAt": 1715027637804, "userGithub": "taariq", "credentials": {"github": {"type": ["VerifiableCredential"], "proof": {"jws": "eyJhbGciOiJFZERTQSIsImNyaXQiOlsiYjY0Il0sImI2NCI6ZmFsc2V9..Is2P23RA3l83j-FKXrXTa0rlAmd-J7R6GlF7YECYmkKkpyQmAAT6xG8xXV5WRsQ7YeZpIASWmdJZycp_3TXXBg", "type": "Ed25519Signature2018", "created": "2024-05-06T20:26:10.806Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC#z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"}, "issuer": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", "@context": ["https://www.w3.org/2018/credentials/v1"], "issuanceDate": "2024-05-06T20:26:10.806Z", "expirationDate": "2024-08-04T20:26:10.806Z", "credentialSubject": {"id": "did:pkh:eip155:1:0x74735b98677250675bD6727986fcCBAdC7aed295", "hash": "v0.0.0:bXtL07BElHJkkEX3tcbzjuvDQ4ujHkPn+Kf6B7ZpSu4=", "@context": [{"hash": "https://schema.org/Text", "provider": "https://schema.org/Text"}], "provider": "ClearTextGithubOrg#VolumeFi#701864"}}, "twitter": {"type": ["VerifiableCredential"], "proof": {"jws": "eyJhbGciOiJFZERTQSIsImNyaXQiOlsiYjY0Il0sImI2NCI6ZmFsc2V9..G6wQAfTf3XXnBN1AyiqPONKGgepi1gHm0FV8TTpFaQPYoKkY3JicV_eC30X0ZfdGiEmLl7N05HSqKpOoqAVSAw", "type": "Ed25519Signature2018", "created": "2024-05-06T20:27:02.808Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC#z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"}, "issuer": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", "@context": ["https://www.w3.org/2018/credentials/v1"], "issuanceDate": "2024-05-06T20:27:02.808Z", "expirationDate": "2024-08-04T20:27:02.808Z", "credentialSubject": {"id": "did:pkh:eip155:1:0x74735b98677250675bD6727986fcCBAdC7aed295", "hash": "v0.0.0:XN7b84sVNK0k+1LbL2Lc/dvrGyjGNdP1p5mxMTV83Yc=", "@context": [{"hash": "https://schema.org/Text", "provider": "https://schema.org/Text"}], "provider": "ClearTextTwitter#volumefi"}}}, "description": "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.\n\nValue propositions\nThe 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.\n\nSpecs\nThe leverage trading bot consists of the following core backend components: \n\n* Vyper Smart Contracts to control the EVM accounts\n* Cosmwasm smart contracts on Paloma to receive and deliver commands based on EVM activities\n* Python scripts that use the PalomaSDK to execute monitoring and account orders. \n\nThe 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.\n\nVolume 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.\n\nWhen 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.\n\nOur 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.\n\nVolume’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:\n\n1. 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. \n\n2. 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.\n\nConclusion: 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.\n\nVolume aims to achieve the deployment of AAVE Leverage Trading Bots with the following milestones:\n\nMilestone 1: Vyper and Cosmwasm contracts development\nVolume 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.\n\nMilestone 2: frontend and middleware development and end-to-end testing\nOnce 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.\n\n\nIf 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. \n\nFor 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. \n\nNew 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.\n\nHighlights of Volume/Paloma’s Audiences:\n* Twitter Followers: 40,000\n* Discord Community: 506\n* GitHub Activity: 284 Likes\n\nFunding Requests breakdown spreadsheet with Time and Resources required:\n\nhttps://docs.google.com/spreadsheets/d/1YLV1WNSZxBCjw3NkRBoa8_M-m_ueFpCHiXYiD2UYa00/edit?usp=sharing", "logoImgData": {}, "projectGithub": "VolumeFi", "projectTwitter": "volumefi"}