0xBeans.eth Profile picture
Once upon a time a @coinbase engineer. Realized centralization isn't it, and now enjoys long walks on the beach and some Solidity. @BuidlerLabs. Banner @numo_0
Jul 14 11 tweets 4 min read
6 months ago, I approached the smartest friend I know and some of the best pixel artists in this space (imo) to create something unique.

We came up with @OfficialMirakai and after 6 months, it's finally minting in 2 hours.

I want to tell you some of the coolest parts. First, there's a bunch of mechanics involved - deflationary items, changing rarities, token dripping, game theory, and re-rolling.

We had 3 main goals, create public goods, push the space forward, and create an interactive on-chain project. I think we succeeded at that.
Jul 12 9 tweets 3 min read
Just looked at the @WZRDSxyz contract and yep, they can definitely arbitrarily burn your NFT. It doesn't matter whether it's listed for sale or not, they can burn it (without paying you if it's listed).

They can also arbitrarily transfer your NFT to whoever as well.

Here's how: Image Typically, when you try to transfer an NFT or a contract tries to transfer your NFT on your behalf, the NFT contract checks whether you're the owner of the token or if you gave explicit approval/permission to the contract trying to transfer your token. Image
May 25 9 tweets 2 min read
I get like 5-10 DMs a day asking about how to get better at solidity (some even ask if Im taking interns lol).

While this may be rudimentary and somewhat "obvious" knowledge, I'll try to explain the concept that really helped me "get it" when I first started learning. When you interact with Ethereum, a majority of the time you're transferring some sort of token from your own wallet to another.

It's common to think "transferring a token" is an actual action of sending something to someone. ie the token is actually getting "sent".
May 24 4 tweets 2 min read
Im curious if theres any cool implications by fractionalizing NFTs into 1155s vs ERC20s - talking specifically about fractional ownership of NFTs

Most (if not all) fractionalization protocols split NFTs into fungible ERC20s - this causes slight disconnect between the two. NFTs are typical viewed/bought on marketplaces but ERC20s are bought on AMMs

But fractionalizing via 1155s would let both the NFT and fractions be viewed/bought on the same marketplaces -> less context switching, more seamless?

Also you can make the 1155s look pretty too lmao
Apr 30 12 tweets 4 min read
Just did a brief review of the Yuga OtherDeeds contract.

Here are some interesting things I found:

First, there is a lot of logic for a Dutch Auction. Yuga clearly said they're not doing a DA but the public mint still relies on a DA pricing functions. Unless Yuga is lying, I believe they wrote this logic previously when they did actually decide to do a DA but just left in this code when they decided not to do the DA (or just forgot).

A little weird though, I would think Yuga would've cleaned up their code before launch 🤷‍♂️
Apr 28 9 tweets 4 min read
If you want to experience the seamlessness of not having to 'claim' tokens, and just getting tokens dripped to your wallet, I deployed a Test ERC20 that uses DRIP20 on the Goerli test net.

Add your wallet to start getting drips. You'll accumulate .25 tokens per block (~1600/day) This is the contract goerli.etherscan.io/address/0x7947…

The token is called "mock". These tokens are worthless but its just to showcase how token dripping works.

Here are the steps to add your wallet and start getting token drips:
Apr 4 16 tweets 5 min read
Still nerding out so here's a little thread: 😆

First, the core insight is the fact that bitwise operation EVM opcodes uses far less gas than the arithmetic exponent EVM opcode. Bitwise operations use 3 gas while arithmetic exponent uses variable amounts of gas dependent on the number of bytes in the exponent.

For my use case, it was about 2-3x cheaper to use bitwise ops.

Just to illustrate:

uint256 var << 14 (338 gas) vs uint256 var ** 2 (782 gas). ImageImage
Mar 22 19 tweets 6 min read
Gonna end the $APE content with 1 final thread. Let's dive into how this absolute fucking chad borrowed 5 bored apes, claimed $APE for all of them, returned the apes, and subsequently netted ~600k.

A story of how a bot looked for value where no one else did. First we have to understand what flash loans are.

Flash loans are a DeFi concept that allow a contract to borrow large sums of money as long as the loan gets paid back within 1 txn.

If the loan isn't paid back in 1 txn, everything is reverted (as if nothing happened).
Mar 21 23 tweets 5 min read
Here's the awaited follow up :)

I'll clarify some questions that people have asked and also go over some easy ways to prevent getting sandwiched. How does the bot sell their coins at a higher price if the buyer already bought coins?

On DEX's, there is no buyer/seller. You're swapping tokens directly from a liquidity pool based on *math* that makes this profitable (I wont go over how DEX's work, lots of resources online).
Mar 19 19 tweets 6 min read
The viral txn of an MEV bot "selling 2.4 $APE for 946 ETH"

A few people asked me how this happened. In short, it didnt happen.

Seems like a lot of people that got hooked on NFTs weren't around during DeFi Summer in 2020 and arent familiar with MEV bots. Let me try to explain :) This txn is only 1 of 3 that are relevant. The bot didn't make $2.7M (and no trader paid $2.7M).

This is known as a sandwich attack. A lot of smart ppl have explained this, but Ill go over how this works with a real example (Im assuming you know how eth works on a high level).