4lamports: find hidden SOL in your wallet

CVrm...XJDA
26 Apr 2024
257

I am a Software Engineer (you can find me on GitHub) and I love creating tools for people. Recently I have been studying a lot about how the Solana blockchain works and I discovered a very interesting thing. Each coin (token) in your Solana wallet is an account on the chain and it costs you some SOL to be there. You can find more information about it on the helium website.

Let's imagine that you have a wallet with some SOL and USDC inside. You don't know that but you are paying ~0.002 SOL to have USDC in your wallet. Don't you believe me? Well, try to transfer a new token to your wallet. You will notice that each time a brand new token is added to your wallet (it could be a coin or NFT), you pay a rent fee of ~0.002 SOL.


To confirm this, look at your transactions on Solscan. Each time you have a new SPL token in your wallet, a CreateAccount instruction is called and you pay ~0.002 SOL. This means that if you are an active trader, you probably spend a good amount of SOL on rental fees! But don't worry, this amount can be claimed back by closing the accounts you don't need anymore (0 balance tokens).

This is why I created a tool called 4lamports. It is a simple piece of software that helps you to redeem paid rental fees for 0 balance token accounts. It's intuitive and allows you to close unused accounts to claim your rental fee SOL back.


All you have to do is connect your wallet and check if there is any 0 balance account you can close. Then, check the accounts you want to close, click on the "Claim back" button and confirm the transaction.

Once the transaction is confirmed, you should see your claimed SOL in your wallet. Due to Solana network congestion, you may need to confirm the transaction multiple times.

This is an example transaction which is the result of interacting with 4lamports. As you can see, every time you confirm a transaction, it closes the selected accounts so that the accumulated rent fee is returned to the account owner. At the same time, it transfers a tiny 0.0001 SOL into the dev wallet to support the project development. The application is open source and you can check its code before using it to ensure that it works as expected and that there is no malicious code inside.

I hope you will enjoy using 4lamports! Please let me know if there is anything I can do to improve it or leave your feedback on what you think about it.

Write & Read to Earn with BULB

Learn More

Enjoy this blog? Subscribe to ilkamo

23 Comments

B
No comments yet.
Most relevant comments are displayed, so some may have been filtered out.