This is a proposal for implementing liquidation protection for Anchor collateral in AutoTerra along with automatic Airdrop collection functionality.
AutoTerra is a cross platform desktop application that aims to automate routinely performed operations on various protocols present in the Terra ecosystem. It can be run as a background/tray application, which allows 24/7 execution.
For its first major features, it aims to implement two functionalities for the Anchor protocol.
The Liquidation protection functionality in AutoTerra aims to monitor a user’s collateral ratio and repay the loan partially or add more collateral based on parameters set by the user in the settings.
The airdrop collection functionality automatically claims the user’s anchor airdrop to their wallet and stakes/lends/swaps the airdrop tokens based on configured settings.
Liquidation protection allows Anchor borrowers to safely borrow UST without worrying about liquidations and having to constantly monitor their collateral ratios. Configurations can be set to automatically repay UST or add more collateral when a certain threshold is hit. Of course, the user should have adequate UST/Luna/BLuna balance in their wallet for protection to work.
Liquidation protection can incentivize more borrowing as users do not have to worry about manually repaying/adding collateral during sharp price swings of
Luna. This should be a net benefit for the Anchor protocol community as more collateral will be staked leading to an increase in reserves.
Automatic airdrop collection is a time saver, especially as more protocols are added to the Terra ecosystem.
- The user enables liquidation protection on their local AutoTerra installation and sets the parameters based on their preference.
- A script that uses Anchor.js will run in the background and constantly monitor the user’s wallet address in Anchor and see if its collateral ratio is below the configured threshold.
- If it is below the threshold, it will either repay a part of the loan or add more collateral based on the settings.
- It will then log an entry for the actions taken in the local database and trigger a desktop notification.
- A script will run every hour and see if any airdrops can be claimed for the current user. If so, it will claim the airdrop.
- If any post-actions such as “Swap to UST”, “Swap to UST & deposit” etc. are configured, the appropriate action will be taken.
- An entry will be logged and displayed in the history along with a desktop notification.
The screenshots below display some of the configurable parameters(they may change based on feedback):
The frontend UI of the screens are almost complete and the code can be accessed on GitHub. The backend functionality, wiring, build artifacts, tests etc. have not commenced yet.
The team consists of a full stack developer with many years of front-end and backend development experience. The developer is an avid LUNAtic since January of this year. Two milestones have been defined so that users can get to play with the application quickly and report their feedback:
The developer has allocated enough time for the successful completion of the project. Due to a milestone based approach, the airdrop collection should be available for production while liquidation protection is being worked on.
The proposal has potential to address a feature that is very broadly applicable to Anchor users i.e all borrowers.
Software estimation is an inexact science, the following is a crack at the breakdown:
UI Design & implementation - 750 ANC
Airdrop collection implementation - 750 ANC
Airdrop collection tests(manual + integration) - 250 ANC
Liquidation protection implementation - 2000 ANC
Liquidation protection tests(manual + integration) - 750 ANC
Ongoing bug fixes/maintenance for remainder of 2021 - 500 ANC (Rather than create new proposals, this should cover costs for 2021)
Total: 5000 ANC
We feel that the above is a fair estimate that will allow development and continued maintenance of the features along with sufficient developer incentivization.
- Airdrop collection BETA release(ETA - May end)
- Liquidation protection BETA release(ETA - July start/mid month)
The proposal is technically feasible and can be completed within the deadline( barring any unnatural events). The Terra.js & Anchor.js libraries implement much of the required library calls. Electron.js allows cross
platform desktop apps to be built with required functionality(background/tray apps, notifications etc.)
Terra.js, Anchor.js, Electron.js, Webix(UI library).
We haven’t gathered in depth feedback yet but plan to do so and engage with the community through Twitter & Telegram if/when the proposal passes.
For audits, we plan to gather feedback as to the levels necessary and also may apply to Terraform capital if required.
The features listed in the proposal are only a starting point, feedback for enhancements and new features will be taken into account and implemented based
on demand and congruence with existing features/other projects in the Terra ecosystem.
Please let us know if you have any questions.