lambdalfthewhite.eth (@Lambdalf_dev) header
lambdalfthewhite.eth (@Lambdalf_dev) profile picture

I help you make smart contracts that don't suck | DM for test or audit | https://teapawt.net/t.co/oGDusX4n30 | https://teapawt.net/t.co/OUXE1o3QFA | https://teapawt.net/t.co/l1zpjhaNCR

Joined November 2016
Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)Photo by lambdalfthewhite.eth (@Lambdalf_dev)
lambdalfthewhite.eth retweeted
EOF will be like migrating from x86 to ARM. Solidity libraries and ERC standards will break. This is not like Paris -> Shanghai (PUSH0 is child’s play compared to EOF). I hope the dev tooling teams (Foundry, Solidity) won’t immediately make the default EVM as EOF, but add it as an optional feature, because EOF is a gigantic breaking change. I have already reserved Soledge to be the EOF version of Solady. Two different repos. Two different NPMs. This is the effort needed for maximum compatibility and minimal breakage. And EOF will NOT make the number go up. It’s just a nerdsnipe and a big new chore to tooling devs.
8
10
5
140
44,047
EOF is an unforced error that could kill Ethereum, being sold to developers as the solution to a problem that can be solved more simply. Introspection is critically important to application security in a decentralized environment. Developer experience will get measurably worse with multiple EVM targets across hundreds of blockchains with their own upgrade schedules. Current tooling is nowhere near maximizing its usage of the existing EVM - make the compiler smarter, use client diversity to validate EL improvements with strategies like recompiling bytecode. Abolish the EOF. My credentials: - Autist behind the most complex contract written purely in bytecode - King of the Frame winner - 2024 (utilized advanced transaction mining strategies to increase zero bytes in raw transaction data) - 6 time World Champion Stack Too Deep Evader
I was one of EOF's biggest supporters. I now think we might be making a mistake. Speaking for Reth: 1. Nix it altogether. Replace with EIP7912. 2. If we cannot rally core dev teams on (1), do EOF w/ code & gas introspection restored. Screenshot w/ full context.
7
10
1
57
9,490
lambdalfthewhite.eth retweeted
Stop using banks. Ethereum's the Internet of money. You get zero payment limits, near-zero fees and keep total custody of your own money. (Challenge: 0.02 Ξ to the first 8 who place it near a bank and DM me a photo of the poster + surroundings. Files in replies)
84
95
27
576
130,699
lambdalfthewhite.eth retweeted
Web3 users shouldn’t have to choose an EVM chain. Just like web2 users are never asked to pick an AWS region.
26
10
110
7,001
lambdalfthewhite.eth retweeted
We are thrilled to release Solidity v0.8.29! This version of the compiler brings support for EVM Object Format (experimental), custom storage layouts, ethdebug, and more. 📝 Blog: soliditylang.org/blog/2025/0… 💾 GitHub: github.com/ethereum/solidity… Follow along for notable features 🧵↓
17
186
34
715
118,893
lambdalfthewhite.eth retweeted
This might be minor for some, but very important imho especially if we want to aboard the mass. I don't know who should be responsible for this but someone please liaise with MM to stop display such warning ⚠️ and add image icon to both APECHAIN and APECOIN. It maybe meaningless on the backend but it DOES add legitimacy to users. (Let's set us apart with that another L2 which will always be behind us lmao) And I know there's @Rabby_io @rainbowdotme . But let's be real, most ppl still use MM for better or worse.... sorry but tagging the bosses for awareness.🙏🏼 @CapetainTrippy @nftgerry @CryptoGarga @mfigge @0xQuit – at Sai Kung District, Hong Kong
1
1
5
530
🐶 🐰 🐱 PETS ARE HERE 🐱 🐰 🐶 as many of you already figured out we decided to go the AIRDROP ROUTE with help from our friends @AsteriaLabs & @Lambdalf_dev 🥰 Cannot wait to see all of your beautiful pets! 🥰🥰🥰🥰 opensea.io/collection/pets-o…
6
5
1
17
2,276
lambdalfthewhite.eth retweeted
wonder when vitaliks paper on twerkle trees by iggy azalea comes out
4
10
51
5,162
lambdalfthewhite.eth retweeted
500 random holders of Nina Chanel's Super Cool World NFTs just received a brand new Super Punk World NFT. Each token ID to be dropped was hashed with block.prevrandao, a random value assigned to each block that is free of external manipulation. The hashed value was then converted to a token ID in the Super Cool World collection, and the owner of that token was transferred a Super Punk World NFT as long as they hadn't already been selected (1 per wallet limit). This method ensured that nobody could influence who gets selected or what token they get. However, the comes at a high cost, and for several reasons it was important that the full airdrop occur in a single transaction. For those that simply want to know that the airdrop happened, you can stop reading now. Below is for the curious - a somewhat technical story of a demoralizing but ultimately triumphant battle with gas. First, a bit of backstory. You are probably aware that when Super Punk World was announced last week, it was met with quite a bit of backlash. This led to a decision to cancel the auction, and instead airdrop the collection to Nina's truest fans: holders of her Super Cool World collection. In an effort to preserve the onchain story, we opted to continue on with the contract that had already been deployed at 0x0000000000003f07248DDFb9821770a8200EF77d. On to optimizing To airdrop, we first had to mint all 500 NFTs. Since it was an ERC721A contract, this was relatively painless (1.2M gas for the full collection). Next, we approve the new SuperPunkAirdropper contract to move NFTs on our behalf. Then, the big one: The SuperPunkAirdropper comes with an `airdrop` function that transfers all 500 NFTs to 500 different recipients. In order guarantee that a new recipient was selected for each token, an internal `_findEligibleRecipient` function recursively chooses random tokens until a recipient is found that did not yet have a Super Punk World NFT (balanceOf == 0). The initial naive approach to this cost ~49.2M gas over two transactions. Spanning the airdrop over two blocks opens up a window for manipulation/gaming the system between calls, so fitting the airdrop into single transaction was important. This meant we needed to get gas down under 30M units. Here are the tricks we used: - Transfer all of the odd token IDs first, then even (this saved 4M gas!). More info: (teapawt.net/fulldecent/status/1491…) - Remove all state variable assignments that were needed in case we needed 2 transactions - Set a custom TransferValidator that doesn't do anything - Use unchecked math on loop iterators (this hilariously saved 37k gas) - Ditch the external balanceOf calls and use solidity's newly added transient storage to cheaply track who had already been dropped to - Similarly, use tstore to track token IDs that have already been randomly selected and fail early if one gets selected again - Rewrite everything from the ground up in assembly All in all, these tweaks brought the airdrop call down to 31.5M gas units. Close, but 30M is a hard limit and anything over won't cut it. I reached out to @0xjustadev to help optimize the assembly, and he was able to offer some insane memory management tricks to draw blood from a stone, cutting down the consumption down even further: 30.9M. At this point, it became clear that 30M was a pipe dream without some pre-call gymnastics. The only way to fit the full airdrop into a single call was to spend some gas up front: ERC721A transfers after a batch mint are expensive because most of the tokens don't have explicit owners set. Ownership has to be inferred by walking backwards until you find the "head" of the batch. The first time each token is transferred, explicit ownership of that token is set (which costs gas). So we just needed to pre-transfer some tokens. Luckily, ERC721A doesn't prevent self transfers, so this was a simple as adding a `prep` function that loops over some number of tokens (we chose 150) and self-transfers them, writing an explicit owner. All in all, `prep` cost ~8M gas, but shaved 5M off of the `airdrop` call. I've uploaded a gist of the old (not fully naive, but it was early in the process) contract and the final version here: gist.github.com/QuitCrypto/1… I encourage anybody to take a look and ask any questions they please about the code. I also challenge you to try to optimize further, and see if you can eliminate the need for the `prep` transaction (or a similar 2 transaction scheme). That's it! If you made it this far, you're a legend. Thanks for reading, and hit it with a like/retweet if you can. My goal is and has always been to spread education, and sharing really helps that.
Token buyers can hack ERC721A to minimize transfer costs: 1. Always mint the maximum allowed 2. Transfer out your ODD numbered tokens first in ascending order 3. Then transfer out your EVEN numbered tokens Not joking.
41
43
15
326
58,288
lambdalfthewhite.eth retweeted
Your wallet drained from a vulnerability like GoFetch on Mac. Is it possible? Should you be scared? Let's talk about it 🧵👇
37
112
41
510
211,954
lambdalfthewhite.eth retweeted
NFTMachine, one of the few people worthy of MULTIPLE @zachxbt exposed threads, is here to take your money again. Just a reminder he was ordered by the courts to pay $300,000 to the investors he defrauded. The cherry on top is he couldn't even implement a whitelist.
15
5
5
110
31,287
lambdalfthewhite.eth retweeted
Here's the bug in Senaca's code that is getting users drained. Revoke approvals to them immediately. I've been kicked out of their Discord for trying to warn users, and they are actively deleting messages about this there.
10
30
10
144
33,042
lambdalfthewhite.eth retweeted
I made $500 and am donating it to a random person who retweets this and comments below✌️ Found an issue related to using `ERC20::approve` - it always reverts with USDT on Ethereum mainnet (no `bool` returned). Use `SafeERC20`'s `forceApprove` method by OpenZeppelin instead🫡
I’m betting $500 that I will find at least a single Medium/High severity issue in your Solidity protocol’s code in 24hrs Try me, weak devs, this will be the easiest cash ever😈
249
193
11
282
62,205
lambdalfthewhite.eth retweeted
Over a year ago, I launched @q00ts - a lighthearted project revolving around blockchain education and safety. The community has been through a lot together, including 11 PVP epochs, each resulting in trait reveals. The two factions, the q00tants and the q00nicorns, are down to one unrevealed trait each, meaning this next epoch defines the first full reveal, and thus will be enshrined permanently as the victors of the War of the Q00tieverse, both through their metadata and their in-server representation. If you currently hold a q00t of either faction - your team will need your help. Whether you're a novice, journeyman, or master of the chain, you have a role to play for your team. If you don't hold one, you can grab one on secondary: opensea.io/collection/q00tan… opensea.io/collection/q00nic… Join us tomorrow in discord to kick off Epoch 12. This one's for everything. discord.gg/ZhJVCG2e
9
33
3
126
11,787
lambdalfthewhite.eth retweeted
🐱 Giveaway time! 🐱 One lucky winner will receive this set of four The Lord of the Rings: Tales of Middle-earth Commander Decks! To enter: 🐱Have a US shipping address 🐱Follow me 🐱Like 🐱Retweet Winner will be announced on February 2nd, 2024! ❤️
127
927
17
1,155
76,084
lambdalfthewhite.eth retweeted
I wrote a little migration contract for people affected by Thirdweb vulnerability. All you need to do is paste your Thirdweb contract address in and let the tool do the rest for you Shoutout to @scottybmitch for the clean interface
6
15
6
46
11,926
lambdalfthewhite.eth retweeted
I thought I was done talking about PortalCoin but this is just down right ridiculous. I've received dozens of DMs about this. Transparency is one of the most important things to me in web3. When a company is dealing with TENS of MILLIONS of dollars of user's funds and is not being transparent that's where we collectively need to draw the line. Why are they not showing the onchain process they used here? If they DID do this fair and onchain it would ONLY benefit them to be transparent about the methods in which they used. FACT: The pre-sale contract deposits were not stored onchain in their smart contract. For this to be a "fair, on-chain process" as they described they would have had to: 1. Parse the thousands and thousands of deposit transactions. 2. Stored them in state onchain in a new smart contract. (and spend THOUSANDS on gas to do so) 3. Use Chainlink VRF to randomly select winners from contract state. If they used this process, then why wouldn't they have just kept track of deposits in state onchain in the original pre-sale contract? Because they mentioned using Chainlink VRF, here's the only other way I could think that they did this... But... this way is NOT fully onchain. 1. Created a new smart contract with a function to generate random numbers using Chainlink VRF. 2. Applied these random numbers fetched onchain to an offchain dataset (like a spreadsheet or database) in order to select winners. This option seems much more likely, but once again, goes against what they said about this being fair and onchain. I really am just trying to understand what the intentions are of this project. I have been speaking with my good friend @coffeedev about this because I wanted to make sure that I covered all bases and gave PortalCoin the benefit of the doubt here. I don't see why PortalCoin wouldn't just make this process fully transparent and verifiable to the greater community.
18
10
1
48
11,425
lambdalfthewhite.eth retweeted
I was the auditor that identified and reported a vulnerability in @thirdweb's contracts. Now that the issue is public, I can talk about how it was discovered and how it all went down.
23
50
7
349
59,959
lambdalfthewhite.eth retweeted
A hardware wallet is the single best investment you can make in the crypto space. I've been a Ledger user almost exclusively for 5+ years, but new competitors have entered the space. Let's start with the Keystone Pro 3. Her's everything you need to know 1/🧵
42
66
12
424
78,629
lambdalfthewhite.eth retweeted
Love the link name and simplicity. If you have a Thirdweb contract and need to migrate, my mate @Lambdalf_dev built a pretty simple tool
I wrote a little migration contract for people affected by Thirdweb vulnerability. All you need to do is paste your Thirdweb contract address in and let the tool do the rest for you Shoutout to @scottybmitch for the clean interface
2
3
166