It’s crashout season on AVAX! People are blowing up left and right. Today we’ll be looking at the case of Cryptofish vs Ramses Exchange to see if it is legitimately a crashout (probably) or if he actually has some kind of justification.
Full disclosure: although I like a lot of Joe employees, I intensely dislike their founder, Cryptofish. The Pharaoh guys seem nice enough although I haven’t interacted with them much.
As always I’ll try to be neutral and review the facts but assume some bias on my part.
Stakeholders
Some background on the main characters.
Cryptofish (aka cryptofishx) is the co-founder of Trader Joe (aka LJF), a multi-chain DEX that originated on Avalanche. It expanded to Arbitrum, among other chains.
LameHillbilly (aka LHBCrypto) is the co-founder of Pharaoh, a DEX on Avalanche that is under the umbrella of the ‘Nile DEX’ organization, which is multi-chain.
Ramses is the Arbitrum part of the Kingdom, which is where the misconduct was alleged to take place.
The Arbitrum DAO has a voting system for allocating funds to ecosystem participants.
Entropy is some kind of paid advisor organization that raised the concerns to Arbitrum DAO after being alerted by a third party.
The drama
Lots of drama coming out of the drama queen himself, cryptofish.
Oops how did that last one slip in there.
The allegations
You can read them in full here. In short:
Ramses LP are not immutable; the fee tier can be adjusted by an administrator.
In this case, it was alleged that an administrator was disabling the fees, performing swaps to arbitrage pools, and then re-enabling fees.
In a traditional DEX, swap fees are the way LPs make money.
It is alleged that the fees were retained by the swapper, making this a straightforward case of theft from the LP.
Sidebar: does this even matter?
Ignoring the fact that I’m spending all this time writing a summary of this situation over one whackjob crashing out on the TL, is the crashout even aimed at the right person? And how serious is the issue, anyway?
How are Pharaoh and Ramses related?
My understanding is that Ramses is part of the ‘Kingdpm’ organization. The leaders of that DEX also run several other DEXes on other chains, but Pharaoh is a franchise and has an entirely different leadership and is only on Avalanche. The developers are shared between all the DEXes though.
So it’s not entirely clear to me how wrongdoing on Arbitrum would be relevant to LHB personally, and he seems to be the target of the current crashout.
I will continue on regardless, because I’ve become curious to know if this is a real issue.
How much are we talking about here?
I’ve heard different estimates of the amount ‘earned’ by the bot here, ranging between $4K to $8K. Maybe it’s an asshole thing to say, but that’s not an enormous amount of money.
I mean, I have firsthand knowledge of TJ misplacing $10K of JOE rewards and no one ever made a big deal about that. I’m sure there are many similar situations over the years, for both dexes, for most protocols even. We’re talking about enormous amounts of money changing hands in web3, 4K-8K is pretty negligible.
But, on the other hand, I do believe that ‘tone from the top’ exists. If you’re willing to wave away small amounts of money instead of ‘doing the right thing’, it’s not a great sign.
A review of the forum post
Here’s the summary of the allegation by Entropy:
It has been alleged that Ramses is lowering fees to zero, enabling the team to capitalize on arbitrage opportunities within its own pools, before raising the fees back to normal levels for other traders. This practice results in LPs receiving no fees during this toxic flow trading, which could be deemed unethical.
Ramses replied to this, but the summary of the response from Entropy is more concise:
LPs on Ramses do not capture most fees, token lockers do.
The team’s plan is to eventually return the extracted value to token lockers and LPs.
The same arbitrage would be captured anyway by other bots.
The following post by Entropy summarizes what seems to be their conclusion
Our overall assessment is that if the team commits to returning past value extracted and any future value extracted to LPs/token lockers, that they never had malicious intentions. They have long contributed to arbitrum, and we think they deserve the benefit of the doubt here. Do we think there could have been more transparency with this MEV experimentation? Yes we do. And Ramses team agrees.
There’s a very post by ‘dk3’ who appears (not familiar) to be someone authoritative to this process that basically says this will be reviewed further, but seems relatively accepting of Ramses’ response.
There’s also a post that references what seems to be a now-deleted post claiming that the funds were bridged off-chain.
No discussion past this point, and I haven’t been able to find any kind of follow-up.
Initial thoughts
The technical
Presuming that this was all done above-board, the explanation for what they were doing and why they were doing it seems very reasonable to me.
With a few caveats of course; all pools involved would have to be gauged, and the majority of the profits would have to be returned to the pools themselves.
Obviously the pools would have eventually been arb’d by someone, and that person would have kept the excess profits. In the meantime, due to the overhead imposed by the fee the prices would be incorrect. This is basically break even for users, some might get a better price, some might get a worse price (net of fee).
So I think that assuming the caveats bear out, they’re cleared on the matter.
The political
Hashing things out in public like this has a lot of different competing incentives for different parties. What’s not said can be as important as what is said.
In this case, the straightforward read to me is that given the lack of follow-up, and the end state of the discourse, the relevant parties accepted the explanations and cleared Ramses of any wrongdoing.
There is a claim (I have not verified) that the original poster apologized for the post.
If you wanted to take the most negative view on this situation, you could maybe say that this just got swept under the rug, given the lack of follow up on the post.
But you could just as easily say that maybe it just got worked out behind the scenes and no one wanted to inflame things further.
Hard to say! People are complicated. Absent other evidence, I’m leaning towards ‘it got resolved’.
Thoughts on the general idea
Arbitrage will happen, and is a good and normal thing. If this value can be captured by a dex and returned to users of a dex, this seems like a straightforward value add to the LPs. That money would have gone to MEV bots. Might as well give it to the protocol users instead.
As long as you can confirm that none of the protocol users (in this case, LPs) are worse off, this is a great feature. In fact, I’m surprised this is not more widely done.
One thing I will note is that I personally dislike that the ability to mutate fees like this exists. They describe in their documentation why this ability exists, but it feels gross to me. The purist in me says that things that DO need to be dynamic instead of immutable should be automated, perhaps via a keeper.
Investigating the facts
Alright, so down to the nuts and bolts. Here are the questions I want to answer.
Were all the pools gauged?
How much did the bot make?
What happened to the money the bot made?
Assuming I like all the answers to these questions, I think they’re cleared of any wrongdoing. I have to do this work myself because Cryptofish is probably Brando quality at chain analysis. I’m going to limit my inquiry to Arbitrum for simplicity.
The account in question: 0x6e639af00851684e85913197a7d36bf3aa6b5a9a
Damn. That is a lot of transactions. Unfortunately it’s above the limit that arbiscan will ship you transactions for, so I’ll have to do some work in Flipside.
It seems to interact with a few contracts to do it’s MEV work:
After filtering out the MEV, there weren’t too many actual transactions to look through, thank god.
Funds transferred out
First place to start, as always, is in Arkham. Lot of stuff going on here, but I do see some outgoing transactions to what I assume is the bot dev on there.
I found this bridge of 2E to Avalanche, which was mentioned in the post.
Most recently, I see the remainder of the funds getting swept out:
Weird stuff
There are some tx that are tiny value and don’t mater, not sure what they’re about:
~.0001E bridging rsETH many times
Very tiny swaps for fraxETH
There are some small swaps for USDC to/from ETH, it’s not clear what they’re for.
I only found one transaction that I found to be suspicious.
Normally for an arb swap, you expect to see something like this, where the originator doesn’t send anything but receives a small amount of eth as output.
You don’t see that here. Instead you see just a plain swap going through the feeless contract. I inquired about this and was told that this was part of a short-lived test for cross-chain arb support.
Summary
Mixing the cross-chain activity with the local-chain activity makes things difficult to tie out. VERY DIFFICULT. But reviewing the bridge activity, it seems like a very small amount was initial bridged in (<1E) and the other bridges seem to be in pairs and net out.
Two of the contracts stored their balance in the contract and were withdrawn [1], [2] for about 2.5E total.
One of the contracts would swap WETH to the bot, and use part of the leftovers to continue swapping, meaning the WETH would accumulate in the account. This makes it difficult to calculate earnings, but it seems plausible that it’s the amount converted here [3].
So in total, about 6E earned to the bot.
Note that this is BOT EARNINGS; the amount ‘diverted’ from the voters would be less than this, although it’s hard to quantify how much less.
Missing info
Two bits are still missing here:
Were all the pools gauged?
What happened to the funds
#1 is hard to answer. I’m not sure it’s even worth looking into. I asked and was told that 95% of pools are gauged.
#2 is a bit more obvious. It seems like most of the funds sat in the bot wallet for a long time before being moved only recently. I believe the original post in the thread that ‘the funds were bridged to Avalanche’ was incorrect.
Final thoughts
I was told that some of the funds were given to the bot dev as compensation for the work. Although I applaud paying devs, that seems like an inappropriate incentive structure for work like this. The pay should be the pay, and the funds received from the activity handled appropriately.
It also seems like the remainder of the funds were not used to pay voters, although I await any transaction evidence counter to that. It’s possible they used other funds to do so, perhaps after being confronted with the evidence, but perhaps because they always planned to do it at the end.
As I mentioned above, this is not a lot of money we’re talking about, and I doubt anyone had malicious intentions. This feature seems like a great value add, assuming it’s implemented appropriately.
But it’s very easy to accidentally give the appearance of impropriety when there’s no such thing intended.
So is Cryptofish’s crashout actually justified?
I would say the rough outline of his complaints are accurate, but hysterically overblown, and as far as I can tell mostly aimed at the wrong person(s).