Quit Profile picture
Oct 13 10 tweets 3 min read Read on X
There is a new class of people all trying to arb the NFTStrategy contracts. As the self proclaimed guardian of these contracts, I peak at how each participant operates.

Most deploy unaudited contracts to use, typically along with EIP7702 delegations.

1/🧵
2/ I can't stress enough that before delegating your whole account to a contract you spun up with the help of ChatGPT... actually, just don't delegate your whole account to a contract you spun up with the help of ChatGPT.
3/ Some folks are using empty EOAs to run the arb. That's generally fine, as a contract exploit risks at most what you have in your account. However, you still put yourself at risk if you ever use the account for something else in the future.
4/ For instance, if 0xB4 ever acquires a Bored Ape without first revoking the approval I forced on his account, the ape is as good as mine.

I'd never take it of course, this was just an onchain warning. Image
5/ Similarly, to OS user "deadcells":

I have your EPG #35 and Howlerz #3924. Delegate to a new contract with some form of access control, especially since your hardcoded miner tip can be used to forcibly drain your ETH.

I'll of course return the NFTs once you're secure.
6/ So how's it work? These contracts both follow a similar pattern:

- Perform user provided call to a marketplace
- Transfer user provided NFT to the strategy contract (who should be msg.sender)
- Use some percentage of profit to tip the block builder (used to ensure inclusion) Image
7/ The problem is threefold:

First, there's no check to ensure that the strategy contract is calling the function.

Second, there's no check to ensure the marketplace call is purchasing an NFT

Third, there's no check to ensure the NFT being transferred is even an NFT
8/ The exploit is simple: the marketplace call becomes literally whatever you want (an NFT transfer, WETH approval, or any arbitrary contract call).

The NFT transfer can be anything really, as long as the contract has a transferFrom function that won't revert.
9/ In the cases above I triggered a zero value transfer on USDC by providing "0" as the expected token ID. "transferFrom(them, me, 0)" is technically a valid transfer in the eyes of the USDC contract. Image
Image
10/ So again, a call to everybody: get your contracts audited, no matter how simple you may think they are. This space is dangerous, and you should assume everybody is out to get you (they are).

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Quit

Quit Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @0xQuit

Apr 9
A beginner's guide to bear markets:

Your portfolio is down bad. It's too late to short, too early to long, and swing trading will just bankrupt you faster. You're struggling mentally. Here's how to productively spend your time during crypto winter.

1/🧵
2/ Learn a skill and monetize it. Take your focus off the price charts and shitcoins, and CREATE. AI has made this easier than ever: vibe code some apps, create daily artworks—learn something that can earn you cash on the side.
3/ Use a percentage (not 100%, please) of that income to grow your crypto allocation. You'll be buying at favorable prices while developing marketable skills that last beyond any market cycle.
Read 13 tweets
Feb 28
1/ Shadows have begun their soft rollout -- the contracts are deployed and will publicly launch when the rest of the pieces (frontends, indexer, etc) come together.

I just did an in person tweet thread at ETH Denver, and shadowed my ape live on stage. Below is that thread 👇
2/ NFTs have traditionally existed on a single chain (usually Ethereum).

That's where they were born, and it's where the majority live even today. Bored Apes, CryptoPunks, Pudgy Penguins, Azuki, and more all live exclusively on Ethereum.
3/ Those NFTs have probably changed your life in some way, big or small. Maybe it was the ApeCoin drop, Lil Pudgies, $anime, or something else entirely.

Owning an NFT signals that you're part of a community, and with that comes benefits both intangible and tangible.
Read 24 tweets
Dec 21, 2024
Exited all my validators, and I think it's worth discussing: Ethereum has an incentive problem.

1/🧵
2/ Proof of stake is a simple concept on the surface: those with money at stake are rewarded in exchange for honest validation of new blocks.

If you're dishonest, your stake is vulnerable to slashing (aka, there is a high cost to dishonesty).
3/ Similar to difficulty adjustments with bitcoin, incentive to validate should naturally reach equilibrium as stakers reach consensus on what APY justifies the opportunity cost of locking up ETH.
Read 11 tweets
Oct 3, 2024
Flash loans are zero risk loans where the full loan amount must be paid back in the same transaction is was originated. They are useful for arbs or opportunities for profit where you simply don't have the ETH up front.

But this one actually sacrificed a punk...

1/🧵 Image
2/ Today's loan was not a profit opportunity - at least, not directly (we'll get to that later).

To execute, two contracts were used (we'll call them Contract A and Contract B).

Contract A is in charge of listing the punk, and Contract B handles buying it.
3/ The progression:

Contract A holds Punk #1563, Contract B holds nothing.

Contract A lists for 24,000 ETH.

Contract B borrows 24,000 ETH from Balancer.

Contract B buys #1563. Contract B now has #1563, contract A has 24,000 ETH.

Contract A returns ETH to Balancer. Image
Read 10 tweets
Sep 11, 2024
Punk 2386, with a current high bid of 600 eth, sold for 10 ETH today.

A combination of clever sleuthing, followed by an unfortunate miscalculation leads to a 7 figure payday for 0x282.

🧵 Image
2/ This ape punk was fractionalized into 10,000 ERC20 tokens on 9/26/2020, and spread out among what is now 257 holders.

This was done on a now decommissioned platform called niftex (the contracts continue to live forever).
3/ The setup is such that any shareholder can propose a "shotgun", whereby any shareholder can propose a buyout price, and if nobody counters, they can purchase the asset after 14 days.
Read 9 tweets
Apr 29, 2024
One of the questions I'm asked the most is "how do I get started becoming a solidity dev?". While there's no right answer, my response is always similar. So here it is in a thread:

How to take yourself from 0-1 as a solidity dev
1/🧵
2/ This thread will assume you have dev experience already - if you don't solidity might not be the best place to start.

Solidity doesn't necessarily have a steeper learning curve than other languages, but it has steeper penalties for getting it wrong.
3/ A good intro to the basics is available at . It's outdated - most of the program uses solc 0.5, and we're now at 0.8+ - a lot has changed, but it's quick, and enjoyable enough that it can ease the fear of "getting started", which is the hardest part.cryptozombies.io
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(