atarpara (@atarpara) header
atarpara (@atarpara) profile picture

Open to work | ✯ https://teapawt.org/t.co/GIde268mPb | prev. @onchainheroes

mload(0x40)
Joined January 2015
New article: deriving the math behind Solady’s `cbrt(x)` implementation from first principles. What is the 0x90b5e5 constant actually doing? original implementation by @duncancmt * Why cube root needs magic multipliers * Why sqrt does not * Optimal Initial guess * Exactly 5 Newton Rashson iterations Full blog post: atarpara.github.io/solady-cb…
5
5
51
3,733
Anyone around devcon 8 mumbai. let's catch up.
3
6
650
1/4 Answer: Version D1 is cheaper by 6 gas! 🎉 This behavior is caused by the Solidity compiler's internal "stack scheduling" heuristic during code generation. It seems counterintuitive to delay a revert check, but on the happy path, it makes a massive difference to stack layout. Here is exactly why:
Solidity Compiler Quiz Challenge Both functions calculate the exact same mathematical expression. Which version is cheaper on the happy path, and why? 👇 (Spoiler: This is used in `solady.fullMulDiv()`)
1
1
6
899
2/4 The EVM has a strict LIFO stack. Accessing variables buried deep requires expensive DUP and SWAP opcodes (3 gas each). In D1, declaring rem and extra BEFORE the check stages all four locals on top of the stack by the time iszero runs: D1 — stack at if iszero(d) [d, lo, rem, extra] <- extra at top All 4 values within DUP1–DUP4. Perfectly aligned for add(div(sub(lo, rem), d), extra). Zero extra ops after the check.
1
1
335
Solidity Compiler Quiz Challenge Both functions calculate the exact same mathematical expression. Which version is cheaper on the happy path, and why? 👇 (Spoiler: This is used in `solady.fullMulDiv()`)
2
1
2
1,186
New article: deriving the math behind Solady's 67-byte, 114-gas sqrt(x) from first principles. The Solady CLZ PR just merged! 🚀 github.com/Vectorized/solady… No magic multipliers Exactly 6 Babylonian iterations 1 floor correction Full derivation 👇
2
2
14
988
The classic integer sqrt optimization: hunt for magic constants to tighten the initial guess (à la Quake's Fast InvSqrt). But: the Newton-Raphson error map for sqrt is perfectly symmetric. Any multiplier makes the worst-case error strictly worse. 1 is optimal.
1
96
Hey @solidity_lang, the community is eagerly waiting for the Solidity Summit 2025 recordings! 🗓️ The speaker lineup looked amazing. Any ETA on when they’ll hit YouTube or anywhere else? Thanks!
1
3
265
If solady has a million fans then I am one of them If solady has ten fans then I am one of them If solady has only one fan then that is me If solady has no fans then that means I am no longer on earth If the world is against solady then I am against the world
If solady has a million fans then I am one of them If solady has ten fans then I am one of them If solady has only one fan then that is me If solady has no fans then that means I am no longer on earth If the world is against solady then I am against the world
5
557
An awesome and great puzzle for who want learn solidity assembly. I solved all of it in less than 2 hours and refreshed all my assembly knowledge. Great Job @RareSkills_io && @tanim0la
Learning by doing -- and then getting rapid feedback -- is the most efficient way to learn. Yes, good explanations help, but deliberate practice matters more. That's why we are proud to announce Yul Puzzles (linked next). You'll become fluent with Solidity's assembly language by working on problems that drill concepts like Yul syntax, ABI encoding, events, storage slots, memory, and others. There are 60 puzzles of gently increasing difficulty. Each puzzle contains a link to the Solidity documentation or a relevant RareSkills article in case you get stuck. And of course, it is free with no login. Just fork the repo and start practicing! You'll be happy to hear that this work was funded by a grant from the Ethereum Foundation. We are grateful for their support. @tanim0la was the primary author. It gets even better -- more puzzles are going to be added!
4
3
32
3,627
Thank you so much! 🙏 Working with @onchainheroes has been an incredible experience. The vision behind the project is truly next level, and @skarly is an amazing founder — always ready to help and such a kind person.
if anyones looking for a cracked solidity dev, look no further than @atarpara We are working with him for all @onchainheroes and he has been a delight to work with. He is currently open to new work as he has some spare time rn (may change!)
19
1,315
Yup, it still works! Endianness (big-endian vs little-endian) refers to byte order in memory, but comparison instructions don’t care about byte order—they just compare the values as unsigned numbers. Let’s take a 2-byte example: x = ab (ASCII: a = 97, b = 98) y = ac (ASCII: a = 97, c = 99) Big-endian: ab > ac - ab < ac → 97 98 > 97 99 - 97 98 < 97 99 → result = -1 Little-endian: ba > ca - ba < ca → 98 97 > 99 97 - 98 97 < 99 97 → result = -1 The comparison logic works the same, regardless of byte order!
Replying to @optimizoor
Exercise for the reader: What happens if the EVM is not big endian, can this trick still work?
1
6
1,182
Thank you so much! Glad you liked the my contract 🙌 Your kind words mean a lot!
The @onchainheroes GenesisRing smart contract is one of the best smart contracts I've seen in a while. Gas efficient, beautiful code, and Solady. It's bringing tears of joy to my eyes. Can't wait to have them on @AbstractChain.
2
36
2,093
2021 vibes back.
sold out in <20 seconds. nfts are back baby
4
752
Happy to answer all of the questions.
As of this post, I will be chilling and sleeping for the next 15 hours. Will not be reading messages or replying. All EVM questions shall be forwarded to @atarpara. Thank you for your patronage.
4
8
1,270
If you wanna know what kind checks solc compile add into our solidity code. This is best writeup i ever seen.
1
9
1,021
𝐒𝐨𝐥𝐢𝐝𝐢𝐭𝐲 𝐀𝐬𝐬𝐞𝐦𝐛𝐥𝐲 𝐓𝐢𝐩 You can clean memory effectively via `codecopy`. It's more optimized, especially when dealing with memory sizes that aren't multiples of 32.
1
1
1
12
1,129
Thank you for your warm words! I owe all my growth and the mastery of inline-assembly spidersense to you and Solady. Grateful to be part of such an exceptional dojo!
.@atarpara trained so hard in Solady dojo that he evolved into a genius. He has recently unlocked level 3 Solidity inline-assembly spidersense. Only less than 20 people in the world have it.
14
1,015
Developers, we need your input! We're updating our solady/libstring.sol function to align with other lang. Currently, it returns true for empty strings, while others langs returns false. Should we return false by default for empty strings? github.com/Vectorized/solady…
4
2
12
1,740
++ Also complete feature request less than 24 hour.
Solady is the highest value per dollar spent project in the entire ecosystem. The founder intentionally stays with parents, stays single, avoids digital purchases, avoids air travel, eats cheap food, uses a decade old laptop, buys minimal new stuff…
1
3
385
Replying to @Deivitto
@Deivitto you just behind 31 seconds to me. Btw I don't believe I am 1st. 😃 @palinatolmach Thanks for the awesome quizz.
Looks like I'm tied for first place, probably @atarpara was faster 👀 Congrats everyone who go to the leaderboard or showed a nice knowledge on ERC4626 on this RACE😁
1
6
257