when life gives you lemons, etc.
we bought an nft from each collection and sent them to Quit's contract to allow users to swap out their NFTs easier. Half of the small swap fee buy-and-burns the Strategy token.
and I accidentally bought 2 apes, so I guess this is mine now
PoolSwapper is live
osnipe.app/pool-swap
Swap your ape, pudgy, CDB, toad, birb, or meeb for another from the pool
50% of swap fees buy and burn the collection's Strategy token
Thanks @token_works for providing one of each collection to use as bait so users don't have to
A portion of the sale also went to Rhizome to help them continue their work as a memory institution for digital art.
internet.flowers/
Adam retweeted
finally completed my AB Day 0 set and picked up my missing Genesis. And as an extra plus i was able to "upgrade" my new Genesis and my original Construction Token for ones I really loved thanks to the unintended swapability of the Squigstr contract
Genesis #179 by @DaCaldera
Construction Token #432 by @jeffgdavis
Chromie Squiggle #229 by @ArtOnBlockchain
& ty to @Rhynotic + @0xQuit for the tool <3
Now that ApeSTR is effectively bricked and can't resell apes, people have been asking if they can swap for apes in the pool, so I built a tool to do just that.
Live now at osnipe.app/pool-swap
Works for apes, pudgys, CDBs, meebits, moonbirds and cryptoadz. Squigs are there too but that contract does not hold any squigs anymore, so no real opportunities to swap.
Note that you'll need 2 of a given NFT to swap for a new one. One is used as the "bait" and returned to you after the swap.
Tomorrow, @Rhynotic will gift bait NFTs to the contract so that swappers do not need to provide one themselves. It will also be added to the NFTStrategy frontend (I think).
There is a small fee, half of which goes towards buying and burning the strategy tokens.
Note: the tool also supports the 10 BAYC that are in the BAYCExchange contract by @machibigbrother, and those do not require bait NFTs at all.
Happy swapping.
A quick note on this because it's maybe interesting:
These 21 apes are not truly bricked forever. They can be swapped for other apes using the same mechanism run this morning.
But all of the listings are cleared - ApeSTR effectively thinks it owns 0 apes - so nothing can be purchased.
So to you purists saying this is a deflationary event - it kind of is?
There are net-new 21 apes that can never be purchased, but which 21 those are can change from day to day.
Adam retweeted
We’ve updated the site: treat the seven affected contracts, labeled “The 7,” as using fees to buy and burn NFTs rather than relist them.
As Quit noted, the bug lets holders swap NFTs. We bought one from each collection and plan to build a tool to swap yours for one in the pool.
A quick note on this because it's maybe interesting:
These 21 apes are not truly bricked forever. They can be swapped for other apes using the same mechanism run this morning.
But all of the listings are cleared - ApeSTR effectively thinks it owns 0 apes - so nothing can be purchased.
So to you purists saying this is a deflationary event - it kind of is?
There are net-new 21 apes that can never be purchased, but which 21 those are can change from day to day.
ct is becoming super vile and it's easy to feel like everyone is out to get you / wants you to fail
then you go to things like Marfa, and you're reminded that most people here are awesome, passionate, and rooting for you
you can spend hours just reading constant hate tweets on any topic, or even about yourself if you have any sort of following
people (and bots) will tweet for engagement the second something goes wrong, and be back in dms and praising you on the timeline after you're back on top. there's a reason many creators/developers have stopped tweeting, it takes a huge mental toll to just stick around
it is important to remember that most people don't create anything. most haven't launched an idea. most haven't deployed a smart contract that can hold tons of money and be exploited at any second even if you've checked everything
if you stop tweeting they win. if you stop working they win. if you stop innovating they win.
we will win.
A quick note on this because it's maybe interesting:
These 21 apes are not truly bricked forever. They can be swapped for other apes using the same mechanism run this morning.
But all of the listings are cleared - ApeSTR effectively thinks it owns 0 apes - so nothing can be purchased.
So to you purists saying this is a deflationary event - it kind of is?
There are net-new 21 apes that can never be purchased, but which 21 those are can change from day to day.
gm gm here we go again.
This morning somebody abused a bug in ApeStr to swap 21 apes for 21 ApeStr-owned apes.
This was a known exploit (see the SQUIGSTR exploit from ~1 year ago) but incentive to run it was never there.
The bug lies in buyTargetNFT: it forces a strategy contract to send arbitrary calldata to any target. Afterwards it checks only three things: its BAYC balance rose by exactly 1, it owns expectedId, and "cost" equals its ETH balance drop.
This was patched in later NFTStrategy releases, but affects the original 6 (PunkSTR not affected).
The attacker bought 2 BAYC to use as bait. Using a helper contract, they prep the strategy contract by selling an ape to it for 5 wei and immediately buying it back for 6 wei. That primes the contract's ethToTwap with 6 wei.
They then call buyTargetNFT and pass the calldata to transfer an ape from ApeSTR to the helper using safeTransferFrom. This in turn hands execution over to the helper (remember, safeTransferFrom is NOT safe), which transfer TWO apes back to ApeSTR to satisfy the balance check (1 out, 2 in leaves ApeSTR at +1). It also calls processTokenTwap, which converts the 6 wei, setting the cost of one of the newly deposited apes to 7 wei (6 * 120%). The helper contract buys it back in the same tx.
example flow:
- Attacker has BAYC #1 and #2. ApeSTR has BAYC #3.
- Attacker "sells" BAYC #1 to ApeSTR for 6 wei and sends BAYC #2 to it for free, but steals BAYC #3 in the process.
- ApeSTR relists BAYC #1 for 7 wei, which the attacker buys.
- Attacker now has BAYC #1 and BAYC #3, and ApeSTR has BAYC #2 (but doesn't even know it).
The attacker ran this for all 21 BAYC in the ApeSTR contract, resulting in them being able to claim packs for all of those BAYC. Total net proceeds: $14k.
This previously affected SQUIGSTR because of their shared contract - any art blocks NFT sent in would satisfy the balance check, allowing the attacker to drain the contract of squiggles in exchange for basically valueless art blocks NFTs.
It was known to be possible on ApeSTR as well, so I guess it was just a matter of time before we saw it happen.
The unfortunate consequence is that now, ApeSTR has 21 apes that it is completely unaware of, so they cannot be bought from the contract. And 210 attacker-owned mudwater packs were dumped into bids.
gm gm here we go again.
This morning somebody abused a bug in ApeStr to swap 21 apes for 21 ApeStr-owned apes.
This was a known exploit (see the SQUIGSTR exploit from ~1 year ago) but incentive to run it was never there.
The bug lies in buyTargetNFT: it forces a strategy contract to send arbitrary calldata to any target. Afterwards it checks only three things: its BAYC balance rose by exactly 1, it owns expectedId, and "cost" equals its ETH balance drop.
This was patched in later NFTStrategy releases, but affects the original 6 (PunkSTR not affected).
The attacker bought 2 BAYC to use as bait. Using a helper contract, they prep the strategy contract by selling an ape to it for 5 wei and immediately buying it back for 6 wei. That primes the contract's ethToTwap with 6 wei.
They then call buyTargetNFT and pass the calldata to transfer an ape from ApeSTR to the helper using safeTransferFrom. This in turn hands execution over to the helper (remember, safeTransferFrom is NOT safe), which transfer TWO apes back to ApeSTR to satisfy the balance check (1 out, 2 in leaves ApeSTR at +1). It also calls processTokenTwap, which converts the 6 wei, setting the cost of one of the newly deposited apes to 7 wei (6 * 120%). The helper contract buys it back in the same tx.
example flow:
- Attacker has BAYC #1 and #2. ApeSTR has BAYC #3.
- Attacker "sells" BAYC #1 to ApeSTR for 6 wei and sends BAYC #2 to it for free, but steals BAYC #3 in the process.
- ApeSTR relists BAYC #1 for 7 wei, which the attacker buys.
- Attacker now has BAYC #1 and BAYC #3, and ApeSTR has BAYC #2 (but doesn't even know it).
The attacker ran this for all 21 BAYC in the ApeSTR contract, resulting in them being able to claim packs for all of those BAYC. Total net proceeds: $14k.
This previously affected SQUIGSTR because of their shared contract - any art blocks NFT sent in would satisfy the balance check, allowing the attacker to drain the contract of squiggles in exchange for basically valueless art blocks NFTs.
It was known to be possible on ApeSTR as well, so I guess it was just a matter of time before we saw it happen.
The unfortunate consequence is that now, ApeSTR has 21 apes that it is completely unaware of, so they cannot be bought from the contract. And 210 attacker-owned mudwater packs were dumped into bids.
Looking further, it seems the exploit was fundamentally the same: a reentrancy attack allowing NFTs to be swapped that we patched in future releases, but it appears to be a worse outcome. In the process they seem to have re-bought the same NFT, clearing out the listing price.
I think this bricked the NFTs held by the Strategy since there is no longer a listing for them. I also think this can be executed on the other 6 strategies that had this bug.
This was only profitable on the APESTR contract because of the Mudwater pack claim, but there's nothing stopping someone from being unprofitable and malicious to brick the other 6 (or if there is a profitable claim in the future).
NFTs getting locked in the contract is a horrible outcome. I'm glad that this didn't happen a year ago when there was more volume on these 7 tokens, but it's heartbreaking that the issue ended up being even worse.
Let me know if you have any questions below and will do my best to answer.
Initial post about exploit last year:
TL;DR Everything is safe. All new strategies will be protected. Original eight strategies (minus PunkStrategy which is unaffected) have slight mechanical twist that lends itself to SquiggleStrategy being functionally reworked as 'Day One AB'.
Yesterday we found a bug in the 8 deployed NFTStrategy's (not including PunkStrategy which is unaffected). Essentially, there is a complex way of swapping out an NFT owned by the protocol with a different one on the same contract. For all collections other than Squiggles, this seems fine at first if you value the floor NFTs the same. The issue arises when the protocol does not know the NFTs have been switched. So if Bored Ape #2516 was listed at 15e and swapped with Bored Ape #2517 (#2516 is no longer held in the protocol and #2517 is in the protocol), the ape the protocol holds is not listed for sale essentially "bricking" it.
This is where it gets interesting. Technically, we can also swap back the NFT into the protocol making it for sale again at the intended price, and taking out one of the "bricked" NFTs. This means at any point in the future, the exploited NFT can be sold by the protocol as intended for the listing price. This essentially creates a sort of "call option" on the NFT. If floor prices ever raise above the listing price a rational trader will swap the exploited NFT back to the protocol, buy the NFT themselves, and take the difference between the price and the current floor. This would release the funds and continue the buy and burn. The only downside we could find from this is if someone finds their "Forever NFT" and wants to hold on this specific token, the ETH will remain in there until then and may never unlock.
As for the SquiggleStrategy specifically, this new mechanic means it's now a "Day One AB" strategy, with all 11,012 NFTs on that contract essentially being treated equally. We think this is interesting for two reasons:
First, the "Day One" AB trio -- Squiggles (Snowfro), Genesis (DCA), and Construction Token (Jeff Davis) is already a set that many collectors have been collecting, given these three projects launched simultaneously on the first day AB went live.
Second, the value of the other two non-Squiggle collections are *much* smaller edition sizes (512 and 500 unique editions respectively), and are only ~30% off the value of an individual Squiggle (10,000 unique editions).
More importantly, funds in the protocol are safe. The ERC20 tokens themselves have no issues and the funds will still pool up as intended and buy floors. The ETH held within these NFTs is also safe, albeit can be a delayed release but should eventually make its way back into the LP via buy & burns. These strategy tokens do NOT need to be redeployed.
We’ll eventually build a frontend to help users swap the NFTs back (ie. Exercise the call) if they end up with one of the exploited NFTs and help them chug the mechanism along.
Future strategy launches are delayed for a few days until we feel the contracts are secure. The 5 planned launches will resume afterwards.
Thank you all for the support, and every bump in the road makes us stronger.
So much time has passed that people forgot about this post, so re-surfacing after someone swapped apes out to claim Mudwater Packs
TL;DR: the first 7 Strategies (minus Punks) had a reentrancy bug allowing NFTs to be swapped out, basically creating a call option.
TL;DR Everything is safe. All new strategies will be protected. Original eight strategies (minus PunkStrategy which is unaffected) have slight mechanical twist that lends itself to SquiggleStrategy being functionally reworked as 'Day One AB'.
Yesterday we found a bug in the 8 deployed NFTStrategy's (not including PunkStrategy which is unaffected). Essentially, there is a complex way of swapping out an NFT owned by the protocol with a different one on the same contract. For all collections other than Squiggles, this seems fine at first if you value the floor NFTs the same. The issue arises when the protocol does not know the NFTs have been switched. So if Bored Ape #2516 was listed at 15e and swapped with Bored Ape #2517 (#2516 is no longer held in the protocol and #2517 is in the protocol), the ape the protocol holds is not listed for sale essentially "bricking" it.
This is where it gets interesting. Technically, we can also swap back the NFT into the protocol making it for sale again at the intended price, and taking out one of the "bricked" NFTs. This means at any point in the future, the exploited NFT can be sold by the protocol as intended for the listing price. This essentially creates a sort of "call option" on the NFT. If floor prices ever raise above the listing price a rational trader will swap the exploited NFT back to the protocol, buy the NFT themselves, and take the difference between the price and the current floor. This would release the funds and continue the buy and burn. The only downside we could find from this is if someone finds their "Forever NFT" and wants to hold on this specific token, the ETH will remain in there until then and may never unlock.
As for the SquiggleStrategy specifically, this new mechanic means it's now a "Day One AB" strategy, with all 11,012 NFTs on that contract essentially being treated equally. We think this is interesting for two reasons:
First, the "Day One" AB trio -- Squiggles (Snowfro), Genesis (DCA), and Construction Token (Jeff Davis) is already a set that many collectors have been collecting, given these three projects launched simultaneously on the first day AB went live.
Second, the value of the other two non-Squiggle collections are *much* smaller edition sizes (512 and 500 unique editions respectively), and are only ~30% off the value of an individual Squiggle (10,000 unique editions).
More importantly, funds in the protocol are safe. The ERC20 tokens themselves have no issues and the funds will still pool up as intended and buy floors. The ETH held within these NFTs is also safe, albeit can be a delayed release but should eventually make its way back into the LP via buy & burns. These strategy tokens do NOT need to be redeployed.
We’ll eventually build a frontend to help users swap the NFTs back (ie. Exercise the call) if they end up with one of the exploited NFTs and help them chug the mechanism along.
Future strategy launches are delayed for a few days until we feel the contracts are secure. The 5 planned launches will resume afterwards.
Thank you all for the support, and every bump in the road makes us stronger.
I've disabled new Strategy launches for the foreseeable future.
I don't think launches every day with zero volume helps the ecosystem, and it's better to allow communities that want the tech to launch themselves and thrive.
We've refunded all 14 pending requests. More below.
23/27 upgradable Strategies have been renounced.
The only 4 that remain are:
Quirkies
Good Vibes Club
Genuine Undead Strategy
GLHFers
These teams view their token more than an autonomous system, and I want to make sure their token has any features they need before renouncing (Like we already did with CHIMPSTR)














