Inspiration
What it does
LiqGuard is like an insurance policy for your perpetuals. It rids traders of fear by promising reimbursement of their position in the case of a liquidation. Traders can pick from our selection of assets (BTC, ETH, SOL), select their trade type (long/short), the amount they would like to insure, and their 'strike price' (the price at which they would get liquidated). Then, they will activate their coverage by paying a one-time premium.
How we built it
We implemented a Solana program with instructions to create, activate, and close each "policy". We also have a backend that checks for when each policy's 'strike price' is crossed and calls the close instruction in the program. The frontend provides a simple interface for the user to make and track their policies.
Challenges we ran into
We spent a lot of time thinking about the design and how the app would interact with the blockchain. Getting the design down was challenging as we needed to establish a balance between practicality and functionality. We also had a lot of problems with dependency versions and faucets.
Accomplishments that we're proud of
We're proud of the design that we came up with. The split of responsibilities between the backend and the program is well thought out.
What we learned
What's next for LiqGuard
We plan to add hedging and support for more assets.
Built With
- anchor
- flask
- solana
Log in or sign up for Devpost to join the conversation.