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

Share this project:

Updates

posted an update

An important point to add about this use case - any action can be automated under any condition. So the LP could set it to not just exit the position once IL becomes too large, but they could additionally sell one token for the other and lend out that asset on a lending platform etc., or do really anything

Log in or sign up for Devpost to join the conversation.