Table of Contents

Solana study case: Withdrawing LPs from SunnyAG protocol

Okay guys, so, that's not quite what I wanted to handle next, but I currently have a bit of a problem with the Sunny Aggregator platform: I have some funds on the pools there, which I would like to withdraw, but due to a nastly issue with incorrect handling of the “point” in the values that you will enter on the website, you basically cannot withdraw any value with decimals: for instance you can withdraw “7” LPs from a given pool, but not “7.” or “7.0”, or “7.78”, etc.

And I guess the dev team is going its best, but that still a bit too slow from my perspective. And on top of that, I've been waiting to jump into solana programming since a long time now, so that sounds like a good opportunity to give it a try here 😊!

Gathering infos

Initial sunny withdrawal python script

Building the transaction

In fact I also need to install the base58 package in my python env

Withdrawing the remaining LPs

Withdrawing LPs from another pool

Adding the xETH_whETH pool

I hope this quick project will help some people retrieving their funds when they really want to! And in case you appreciated this article, feel free to send me to tip to by me a beer or too [I like beers… 🤣] at my solana address: 7X2mFEFeddSsK2WMCP3rqv7fzLPs6MLCSG1GWEmGzfDn