⚙️ LearnEVM.com @LearnEVM
The comprehensive EVM deep dive for Solidity developers. Made by @0xMacroSecurity learnevm.com Joined January 2023-
Tweets166
-
Followers1K
-
Following48
-
Likes194
@Arvolear Definitely the best part of the ecosystem
Adding to this, the 1 word used for the dynamic array is the length of the array Specifically, the length is zero, so there is no more data in memory following it! If the length were (for example) three, then the total size of the dynamic array would be 4 words in memory 😀
Solidity memory lesson 9 (for Fantasy top fans): Implicit memory allocation of dynamic vs static arrays. - Dynamic array is initialized to 0x60, pointing to the zero pointer. No memory is allocated. - Static array is initialized by setting it to the location of newly allocated
All EVM opcodes in one diagram by @LearnEVM
Building on the Solana virtual machine (SVM) is very different than building on the EVM. Differences include: - Data cannot be encapsulated - External call depth capped at 4 - All account reads and writes must be known ahead of time and much more (tighter transaction limits, built-in upgradability, program-derived accounts and their ability to be signers, and so on). If you're looking to build on Solana and could use an expert opinion to accelerate your development, contact us via telegram, or via inquiry form on our website. Up to 50% of your pre-audit security reviews can be applied to a future audit (limited time only). Stay secure out there 👊 - Macro Security team
Learn more about how EVM Memory works by reading our free lesson on the topic here: learnevm.com/chapters/evm/m…
A perfect example of why it's important to know EVM 🤓
🧵How memory works under the hood in the EVM and how this knowledge led me to recently discover a ✨critical vulnerability✨ Oh and if you're new to assembly, don't worry, it's simpler than you think Memory Layout Starting with the basics, Solidity reserves the following 4
The Solidity Developer Survey 2024 has gotten 500+ responses so far. If you're yet to take the survey, you've got one last week to let us know... ✨ how you are using Solidity. 🆕 which recent changes impact(ed) you the most. 🔮 which features you anticipate the most. It takes ~10min to contribute to the future of Solidity. 🔗cryptpad.fr/form/#/2/form/…
Eth is moving forward 🫡
EIP-7907 was just approved It will more than 10X the contract size limit, significantly improving the developer experience on Ethereum. I expect it will be included in the next upgrade after Pectra
this may seem like a lot of opcodes but that's just how expensive the keccak256 operation can be 👀
Compile-time zero-cost abstraction for Solidity. When compiled (with or without --via-ir), this function gives very optimized bytecode that is faster than using `keccak256` to compare two strings.
Gas efficiency *without* writing in opcodes? Have to admit this is kind of impressive🙈🙊🙉
Zolidity ERC20 is 52 lines of code. But still very gas efficient without assembly, vs. Solady ER20 (613 LOC):
To learn more about how contract storage works, check out our FREE material on the topic 😃 learnevm.com/chapters/evm/s…
What's the significance of Custom Storage Layouts? By default, Solidity starts all storage variables at slot 0. For example, if you have this contract: contract Example { uint256 x; uint256 y; } then reading x will compile to SLOAD with a key of 0x00, and reading y will compile to an SLOAD with a key of 0x01. (If you have smaller values, such as two uint128's, then Solidity will compact those into the same storage slot. But that's a discussion for another day!) Essentially, all your storage variables live right next to each other, starting at zero and incrementing onwards. However... with Custom Storage Layouts, you can now start at a *different* point than zero! contract Example layout at 0xFAFA { uint256 x; uint256 y; } In this modified example, reading x now compiles to SLOAD with a key of 0xFAFA, and y now compiles to an SLOAD with a key of 0xFAFB! This is useful for EIP-7702, which allows an EOA to "become" a smart contract! The EOA can change which smart contract it becomes multiple times, so it's important for each one to have its own isolated storage space to avoid clashing.
Solidity just added support for Custom Storage Layouts! This allows specifying that your contract storage starts at a point *other than* zero. However, this still doesn't cover the popular Namespaced Storage Layout that modern contracts often use (EIP-7201). For now, you will
missing from the list: S - CODECOPY A - CREATE2 - EXTCODECOPY B - KECCAK256 C - CALLDATALOAD D - DIFFICULTY F - PREVRANDAO
I have a monopoly on arranging EVM opcodes beautifully and optimally. And it’s free and open source. Milady.
The simplicity of the EVM is beautiful.
you can use bytecode as storage.
Diamond compat is complete! The grand total is... 889 bytes! This is 5x smaller than the Solidity equivalent 🤯 And thanks to my previously conservative math, the router contract *still* supports over 4000 function selectors! 😁 As wise @optimizoor once said, "you can use
you can use bytecode as storage
@ghadi8798 @optimizoor you can use bytecode as storage.
@ghadi8798 @optimizoor you can use bytecode as storage.
To learn more about how EVM contract storage works, visit our FREE chapter on the topic 🤓 That's all for now, folks! Keep shifting those bits like a pro 😎 learnevm.com/chapters/evm/s…
What @optimizoor is suggesting is reducing the key size for this pattern! This allows us to only require 10 bytes of bytecode, instead of the usual 33 – giving us a savings of 69% 😎 Best of all, the chance of collision is still ridiculously low – 1 in 2^72, or 4.72×10²¹
what does bro mean by this? ERC-7201 is Namespaced Storage Layout. It's a standard for modular, isolated storage layouts. Why is this pattern necessary? To fully understand, you first need to know a bit of how Solidity works... 🧵
ERC-7201, namespaced storage, is good but bad at the same time. The solution is to just use the first 9-bytes of the keccak. Stop wasting 32 bytes of precious bytecode space everywhere. No, I don’t think we need an ERC for this. Just code from first-principles.
Carlos A. Bruguera. @Burrgh
392 Followers 1K Following Computer scientist, musician, decentralization enthusiast and other things.
flash-a⚡ @flashathehunter
41 Followers 667 Following trash hecker not qualified for anything but trying to be...
Seb @Seb28_7
2K Followers 1K Following Family, Finance, Freedom, Thruth and Preparedness for SHTF #ANTIFRAGILE $KAS $BTC Educational content about all things money. MyKai & KasMap & KUDOS
Jeff @jeffsmale90
33 Followers 113 Following
John Church @icedcool_eth
2K Followers 3K Following Product at Nethermind! | Professor at Duke! | Exploring the intersection of distributed compute, cryptography, and finance. | BanklessDAO OG
olivmath @olivmath_
158 Followers 297 Following Head of Education @nearxschool | 🇧🇷 Ambassador on @StellarOrg and @opensensepw | Cryptographer | Senior Blockchain Engineer 👉 https://t.co/KB5aneKXbs
Programming Beats �... @ProgrammingVR
502 Followers 1K Following Self-Taught Programmer | Chromian! Tech Stack: Blockchain, Solidity, Foundry, JS & more 🚀 I Always love to learn and evolve 💻 My posts aren't FA, so DYOR!
Rishav @anxbrt
434 Followers 390 Following Building lightweight/specialized AI models & AI-native apps | Scribble detection, VLM harness.
pmu @petr_murzin
4 Followers 499 Following
tino @valxxntino
2K Followers 1K Following class of ‘22 | physics | exploring zk, ai, smart contract
Lain on the Blockchai... @CryptoCyberia
19K Followers 5K Following Prev. @liquidtrading Digital Privacy | Art is Life | AI Realism | Remilia
Yasin @7amdzu
6 Followers 37 Following
Haythem 🍉 @0xhaythem
608 Followers 1K Following Contributing @category_xyz to build @monad | prev @eulerfinance @opyn_
teo @binary_tree_
725 Followers 1K Following Core Protocol Engineer @Superformxyz | Host @SolidityFridays | ZK Mentor @OVioHQ
FLCK @CapitalSwish
2K Followers 2K Following Building a clear path through the chaos! Hooper @unc_basketball Pro NFL
Daniel Gill @planetmall2
388 Followers 2K Following
Roberto Rosmaninho | ... @RRosmaninho1
11K Followers 269 Following K Team Leader at @Pi2_labs building @fastxyz | Previous @rv_inc and @UFMG
syed salik hussain @syedsalikhussai
31 Followers 1K Following
permaweave @permaweave
3K Followers 2K Following Hydrogeologist, dog dad, algo trader, and early crypto art collector. Enjoyer of ETH since 2017 and SOL since 2020. GM. https://t.co/9v8XfjhUET
piesrtasty @piesrtasty
444 Followers 2K Following @0xMoneyLeague | @rai_dollar | @letsgethai | @reflexerfinance
Not Null @Menotnull
28 Followers 101 Following
Amir Hossein @7UUWVK5OLh9salc
6 Followers 174 Following Blockchain | Smart Contracts | Rust & Solidity
heeyahnuh.eth 🅧 @_heeyahnuh
4K Followers 3K Following Community Manager @aangoofinance ¦¦ DevRel ¦¦ Founder @ReactionAcademy ¦¦ Ambassador @ActualOnexyz #TeamMUFC #GodFirst
ali bnjm @AliBnjm
22 Followers 1K Following
Kaushal Desai @Kaushaldesai_kd
277 Followers 2K Following Onchain Builder @triggerxnetwork | Scaling without permission
chain_l @chain_haya
272 Followers 747 Following I work to further adoption of Ethereum & scale with L2s. Love numbers & cryptography. Father. Husband. Knows nada! Forced to be on X.
Cedric Lnx @cedriclnx
2K Followers 6K Following 🇪🇺🇫🇷🇧🇪French ₿E #ShadowySuperCoder (SWE)👨🏻💻(mobile mainly), cypherpunk, futurist, STEM lover | Vires in numeris #web3 丰🦐 | ✉️ [email protected]
Abraham Yusuf @bram0511
1K Followers 5K Following Blockchain Enthusiast since the block https://t.co/ILUnuLzGYP Content Blockchain Educational & Research
Tay'yeb @0xtayyeb
97 Followers 867 Following IT Grad | MSc in Computer Networks | Blockchain Security Researcher
Sundeep @SundeepCharan
674 Followers 553 Following Systems Programming Enthusiast. Budding C/Go learner
Tarek @tarekeleter
120 Followers 2K Following Security Engineer - Incident Response @StarknetFndn | All views here are my own. #DFIR Ex - @Mozilla, @Livenation, @Ticketmaster
elsecaller0x @elsecaller0x
4 Followers 181 Following Learning blockchain dev and smart contract auditing from @cyfrinupdraft
Nate Pola @NatePola
108 Followers 450 Following
0xE1 @IvanE1E1
169 Followers 263 Following PhD Student | Blockchain Researcher | Blockchain Security | Building @GrowthMate_xyz | VP @RWTHBlockchain
cottons.eth ✊️�... @claracottontail
6K Followers 3K Following ens delegate - Founder @moresoproject - Project Manager @baebaecafe - chess mod @penguingm1 - American
ghadi.eth @ghadi8798
226 Followers 1K Following cto @_JAW_ID - @justaname_id | @_Seal_Org Steward 🦇🔊
vectorized.eth @optimizoor
35K Followers 10K Following ✯ https://t.co/1tzvfSxd7S ⊛ @asterixlabs ⟠ NEET
jayjie.eth | Human Be... @jim380
3K Followers 2K Following Building @ripdotbet | Ex @moonpay, @certik | Founder @cypher_core | Pitbull Dad | @Columbia SEAS '17 | Opinions are my own
Sardius @0xSardius
2K Followers 3K Following Solana agentic engineer | building @SolEnrichHQ - onchain intelligence for AI agents| helping founders ship onchain AI products
Je suis Karl 🇫🇷... @karlpaul0x
614 Followers 656 Following low income quant figuring it out - strategist - web7 “corgito ergo sum”
Argot Collective @argotorg
3K Followers 9 Following Non-profit, independent collective building and maintaining the core infrastructure for Ethereum applications.
Abhi Gulati @abhiisfamiliar
141 Followers 362 Following Making managing Familiar look easier than managing a baby, since 2025.
StateMap.ai @StateMapAI
36 Followers 17 Following Visualize state and find more bugs in your smart contracts. Made by @0xMacroSecurity
Gas Blaster @gas_blaster
53 Followers 54 Following I generate FREE gas optimization reports (bot account by @0xMacroSecurity)
Guido Vranken @GuidoVranken
6K Followers 549 Following
Gilbert @0xgib
837 Followers 440 Following Building @Solbrain_ai • EVM and Solana audits at @0xMacroSecurity • Author of @LearnEVM
Keone Hon @keoneHD
148K Followers 2K Following cofounder / GM @monad 💜 Leave me feedback: https://t.co/w2foQf9vLy
⁵⁄₉ @fiveoutofnine
10K Followers 1K Following
John Hilliard @praetorian
1K Followers 1K Following Making blockchains fast. Focused on performance, reliability, and tools at @0xPolygon || Boston || @MIT
Pierre @pldespaigne
1K Followers 424 Following Web3 dev. Deep knowledge of the EVM, helped updating the Yellow Paper, built Bytegraph the smart-contract bytecode analysis app | ex Immunefi
Juliano Rizzo @julianor
10K Followers 2K Following Crypto. Security. BEAST/CRIME SSL/TLS, Padding Oracle Attacks. CEO & Founder @coinspect
philogy @real_philogy
7K Followers 513 Following fixing smart contract development @plankevm | LSR @SpearbitDAO | https://t.co/tPm7ElS6Lv | ex @SorellaLabs
gmhacker @realgmhacker
6K Followers 757 Following aerospace engineer 🚀 Head of Security @immunefi 🪲 Advisory @felixprotocol 🐱 Taught @RareSkills_io 😎 Security Council '25 @arbitrum 🔑 views my own, NFA 🇵🇹
Jeffrey Scholz @Jeyffre
16K Followers 912 Following Building the graduate school of blockchain engineering @rareskills_io Passively open to new job opportunities?: https://t.co/xRu6uLmyrF
sudo rm -rf --no-pres... @pcaversaccio
32K Followers 333 Following 𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐨𝐧 𝐰𝐡𝐚𝐭'𝐬 𝐧𝐞𝐱𝐭. ꟼGꟼ: 063E 966C 93AB 4356 492F E032 7C3B 4B4B 7725 111F
kaden.eth @0xKaden
7K Followers 279 Following EVM security eng/research - LSR @spearbit / @cantinaxyz
Convergence Boy @vicnaum
3K Followers 631 Following Be playful. Be true. Working on Aave (prev Lens). Hacking/DIY/Vibe-coding in my free time. https://t.co/dNNrKxUZzO - Stateless History Node. My views are strictly personal.
Kayzee 🐺 @Real_kayzee1
196 Followers 190 Following
DeGatchi @DeGatchi
15K Followers 918 Following firmware ∩ combinatorics | burnt out podcast @ScrapingBits (math, ai, infosec, hft, crypto)
Norman @Normanxbt
5K Followers 1K Following Chief Agents Officer @zerodriftsec I find the gap between intention and implementation
Prem Makeig / premm.e... @nxt3d
5K Followers 5K Following 🛡️ ETHSecurity Badge, co-founder @Unruggable_eth #ENS @idchain_world https://t.co/nsmWY5Izvh
0xngmi @0xngmi
193K Followers 325 Following Building a transparent defi dashboard at @defillama. Would rather be right than make money
Huff @huff_language
5K Followers 40 Following Huff is a emerging low level assembly language for writing Ethereum smart contracts
devtooligan (ai arc) @devtooligan
10K Followers 1K Following Building @zerocool_ai 🥶 CTO @round_ai_media 👁️ LSR @Spearbit 🧐 Resident @yAuditDAO 🤓 ETHSecurity Badge #51 @thedaofund 📛
Hari @hrkrshnn
11K Followers 4K Following @cantinasecurity @spearbit ceo // prev @solidity_lang, @ethereum
Solidity @solidity_lang
41K Followers 14 Following Solidity is an object-oriented, high-level language for implementing smart contracts. 🌐 - an @argotorg project
Macro Security @0xMacroSecurity
3K Followers 77 Following Security Audits for EVM and Solana protocols • Learn more at https://t.co/jnb4ZLjjkQ
vitalik.eth @VitalikButerin
6.8M Followers 547 Following I choose balance. First-level balance. mi pinxe lo crino tcati https://t.co/gCQrmCby7P































