Privacy for payroll on Solana, built with @magicblock's Private Payments API
No more exposing salaries on-chain.
1. Upload your CSV with salaries
2. Send to many people with just 2 signatures
3. Recipients claim privately (even partial amounts to hide the total)
etc etc
After a long time i built a fully functional Dapp that to for @magicblock V3 Blitzz.
It was fun building it and it came out pretty good not any unique project but it was fun building it.
so once check it out here: split.jkrishna.xyz and review it.
Built a Solana gossip spy node in Rust.
Our node Joined the devnet gossip network as a non-voting observer and read live validator data directly from the CRDS table and we get:
- TPU addresses
- slot progress
- peer versions - All these in real time.
This project is more about learning curve for me. where i learned about:
- How gossip push/pull works under the hood
- ClusterInfo + GossipService internals
- Reading ContactInfo + EpochSlots from CRDS
- Why shred version mismatches silently break everything
most of these i learned from docs.rs/solana-gossip down is a small demo of this
Ohh boy it's finally done today wrote swap ix for DLMM program.
What actually happens in this ix:
- we are getting all the accounts required like pool, token_accounts, vault_accounts and the user.
- instruction with the args input amount, min output and swap direction.
- validating the input and identifying which token is going in and which is coming out.
- starting from the active bin and loading the corresponding bin arrays dynamically.
- here comes the main part loop in here the swap flows across multiple bins based on available liquidity.
- it’s like consuming liquidity bin by bin until the input amount is fully processed.
- inside each bin we calculate the output using reserve-based math and apply fees before the swap.
- handling both cases: partial fill (bin has enough liquidity) and full consumption (move to next bin).
- updating the bin reserves and distributing fees to LPs using fee growth accounting.
- accumulating the total output across all bins.
- and finally transferring input tokens to the vault and output tokens back to the user.
- updating the active bin based on where the swap ended.
There are still a lot for improvement like:
- Dlmm pricing logic.
- different edge cases.
- precision improvements.
and i can't think i can write tests for few days
Today able to finish remove_liquidity instruction for my DLMM program.
So what actually happening in this ix:
- we are getting all the accounts required like pool, position, token_accounts, vault_accounts and the owner.
- instruction with the args bin's range and the liquidity percentage (bps).
- validating bin's range, liquidity input and checking the position ownership.
- based on the shares we calculate how much liquidity to remove from each bin.
- based on the info until now we need to update the position details.
- here comes the main part loop in here the user's shares converts into per-bin liquidity removal + fee accounting.
- it's like burning the shares we have in each bin and getting back the proportional tokens.
- updating the bin reserves and the position shares inside the loop per-bin.
- calculating the fee growth difference and accumulating the fees for the user.
- and finally total token amounts will be transferred back from the vaults and the bins track how liquidity is reduced.
- fees are not transferred here, they are just tracked and can be claimed separately.
This is the next step in this contract still there is lot to complete this like:
- swap
- claim_fees
- update_fees
Not went as planned, but i'll try to complete this soon.
In this i took some AI help for fee calculations and for some bin logic(just for info😅).
Oh man writing this add_liquidity instruction for my DLMM program took the shit out of me.
So what actually happening in this ix:
- we are getting all the accounts required like pool, position, token_accounts, vault_accounts and the payer.
- instruction with the args bin's range and the token amounts.
- validating bin's range, token amounts and finding the bins position like up or down.
- based on the bins position we need to distribute the token amount.
- based on the info until now we need to update the position details.
- here comes the main part loop in here the user's liquidity converts into per-bin state updates + Lp ownership accounting.
- it's like splitting the tokens we have passed into per-bin lp.
- updating the bin reserves and the position shares inside the loop per-bin.
- and finally total token amounts will be transferred to the vaults and the bins track how liquidity is distributed.
- during the swaps they consume liquidity based on bin reserves from the pool vaults.
This is just the first step in this contract still there is lot to complete this like:
- remove_liquidity
- swap
- claim_fees
- update_fees
Let's see how this goes 😁
SIMD-0266 just got approved 🎉
99% of people scrolling past this don't know what it means.
Here's why this might be the biggest infra upgrade Solana has ever shipped 🧵
Finally got STARTTLS command working in the SMTP server I'm building in Rust.
The server now triggers a TLS handshake, upgrades the plain TCP connection to TLS connection, and continues the SMTP session securely.
Next: need to implement AUTH LOGIN.
Fun project for learning networking + protocols.
i use umami as the analytics for the portfolio but their charts are not that good in terms of ui (imo). so built my goto quick look for the analytics.
- smooth animations
- minimal and clean look
- necessary details only
should i publish this as a component ?