Inspiration
The Raydium team mentioned that impermanent loss is a problem for their LPs. But in general there is a lack of risk management tools in the DeFi space, and as LP's ourselves not being able to manage risk against impermanent loss is a big pain point.
What it does
It's essentially a stop-loss for LPs to protect against impermanent loss - once impermanent loss gets to a certain amount (the prices diverge by a specified %), then a bot from a decentralised network of bots will remove the LP's liquidity for them, if and only if the condition is met.
How we built it
Built a wrapper contract around Raydium's contract that an LP creates (and holds their LP token) and allow the liquidity to be withdrawn by anyone when the condition is met.
Challenges we ran into
Solana functions do not return data in the same way that they do in Solidity. So it was a challenge to figure out the correct addresses to check the liquidity balance of tokens A/B.
Accomplishments that we're proud of
Having a very basic version of Autonomy Network on Solana! Our first foray into Solana.
What we learned
Rust, the Solana sdk, and the contextual nature of Solana.
What's next for Autonomy Network
Convert our Solidity code into a full Rust version that is fully generalised to be able to automate any action on-chain.
Built With
- rust
- solana
Log in or sign up for Devpost to join the conversation.