Raydium SRM Grant Proposal

you missed me saying IF it seems in that final sentence. you also missed the question " Do you think the Serum Foundation should treat Raydium at 25%, the same way say Atrix/Some other project is 100% to CLOB? ". what do you think?

My answer was that every dollar of volume we’ve contributed should be counted at least equally as it generates the same amount of fees for Serum as volume from any other source.

Raydium operates a competing source of liquidity though. Raydium controls the proportion of its liquidity that it sends to Serum, and I’m under the impression that it has been walking that down over time. So it IS appropriate to count its dollars of liquidity differently.

It’s not unreasonable for Serum to prefer partners who don’t compete with its core offering, and to juice the allocation for their liquidity. Admittedly, that might be because those partners simply haven’t built out the infrastructure to compete. @kaiba can you give us any promises on your intentions with respect to building competitor AMM pools, say in the next year? Conversely, @AlphaRay, can you give us any assurances on the % of liquidity that would be sent to Serum under your proposal?


I can promise that Atrix will continue to provide all of its liquidity to Serum for the next year, and beyond. We have no plans to build any internal pools and don’t believe in fragmented liquidity when a solution like Serum exists on Solana.

We outlined our vision for liquidity on Serum and the role of AMMs in our proposal for Atrix, which should help clarify our intentions - Atrix SRM Grant Proposal

1 Like

Not really sure what gives you the impression we’ve ever reduced the amount of liquidity sent to Serum. Raydium has always been diligent in providing more than ample efficient liquidity to Serum while not wasting resources sending orders to the far ends of the orderbook. As JumpCypto pointed out, this is the liquidity that matters and should be counted for.
Raydium can definitely assure you that it has never reduced the percentage of liquidity sent to Serum and that it has no plans to do this. In fact, the amount of liquidity Raydium sends to the orderbook would only increase from this point if Serum deems that it is not a waste of resources and would help the ecosystem.

Hey guys,

We’ve received a number of questions about the amount of liquidity that Raydium sends to Serum, and much of the debate has centered around a protocol that delivers all of its liquidity to Serum vs. posting a percentage of total. However, as @adrian @JumpCrypto and @nkosi have all pointed out, the fact remains that it is extremely important for liquidity on the orderbooks to be effective in order to drive trading volume and value for Serum.

Up until now, we’ve discussed productive liquidity and the value of it in concept only. While due to several users asking for more information, we did some additional research on the Serum orderbook to see how effective Raydium’s AMM actually is, how it compares to others, and what that actually looks like.

After a quick look, we noticed that Atrix is currently placing 3 orders on each side of the orderbook for SOL-USDC. The first order at 0.5% from mid, second at ~10% from mid and the last one at about 1000x the mid price. The last 2 orders are generally unlikely to ever get hit and we feel that this type of market making is ineffective and not in the spirit of helping the Serum Foundation with their goals. Conversely, Raydium currently posts 7 orders on each side of the mid within a 2% depth on SOL-USDC, with the first order 0.3% from the mid. Atrix is a new protocol and we give them the benefit of the doubt that the market making will improve. However, we felt that it is important to put this forward as a clear example, rather than just a simple ‘what if’ concept, of where a lot of TVL can end up sitting on the orderbook.

As avid supporters of Serum, we also believe that grants should be distributed effectively and in the areas where they deliver the most value. We have gone into detail in this post to show that TVL is far from a standalone metric, and can be very deceptive when taken out of context. We hope this helps to clarify some of the pitfalls of this topic and look forward to continue building alongside the Serum community to create a healthier trading environment for everyone.

Orders from Atrix SOL-USDC pool:


I’ll add some context to Atrix’s order placement. To start, Atrix adds orders at the ends of the book according to x*y=k (constant product) to support TVL on Serum, as Serum’s success is Atrix’s success. Of course, instead of placing these tail-end orders, Atrix could place a couple more orders closer to the center of the book, facilitating slightly more volume. However, we think it’s OK to sacrifice a small amount of center liquidity for a large amount (80%+ of Atrix) TVL being allocated to Serum from Atrix’s TVL due to tail-end orders. This also isn’t any manipulation we are doing to the constant product equation, it’s placed according to the exact math. If it were the case that this liquidity shouldn’t be counted towards TVL, then Uniswap V2 or Sushiswap would have 10x less TVL than they claim.

However, we definitely agree with @AlphaRay that Atrix could provide more liquidity closer to mid-price, and @JumpCrypto that volume matters. To that, we are working on some technical improvements to our AMM program to place more orders on the book, along with additional improvements to other types of pools. I’ll follow up with some technical details:

Currently, Atrix’s order placements/cancels are atomic within single transaction, to ensure we stay EXACTLY consistent with the constant product equation to minimize any extra divergence loss which is not due to the equation itself. Because of this atomic, single transaction restriction, there are only so many orders Atrix can fit into a single transaction, because of Solana’s current runtime limits and compute cost to place and cancel all of our Serum orders. But there is still of course some room to optimize, which we are working on. Edit: To add, non native SOL-based Atrix pools, like mSOL-USDC, have more orders and tighter orders than presented in the above screenshot.

In contrast, AFAIK, Raydium places and cancels their orders using multiple transactions, not atomically. This often leads to order placements which are not exactly equal to constant product. When there are large market moves in a small period of time, this can cause a large amount of extra divergence loss to LPs which is not due to the constant product equation. As seen below, orders at prices 162.399 and 163.087 have far less size allocated to them than the following the constant product equation exactly would suggest. As you get further from the mid-price, order sizes are supposed to strictly increase, not increase and decrease in an arbitrary manner. However, since Raydium utilizes internal pools for most of their liquidity and a large portion of swaps, any extra divergence loss due to Serum orders may not be significant to Raydium LPs.

Orders from Raydium’s SOL-USDC pool:
Screen Shot 2021-10-15 at 5.50.35 PM

These orders are actually a correct decomposition k=xy. The reason the third and fourth bid is smaller in size is due to a previous trade taking part of the fourth bid and Raydium replacing the bids infront of it to stay inline with the k=xy + profit equation so that LP providers still make the same amount for liquidity provided. It’s also an efficient way to replace orders that were picked off rather than replacing the entire book so that orders are still placed atomically and the middle of the book is well populated for others to trade against. These efficiencies are what makes Raydium a strong market maker on Serum and how it has been able to capture so much more value for its LPs.

I’m not sure if that makes sense with regard to divergence loss for LPs specifically in the case that there is a large market move and the non-exact xy=k orders get filled before Raydium can recalculate. But if there is data backing up Raydium’s greater profits for LPs specifically for Serum orders, would love to see it.

To also give an update on my previous reply, we’ve revamped Atrix’s order placement for our mSOL-USDC pool to have a much tighter spread with more orders and are working on deploying this to other pools.

Orders from Atrix’s updated mSOL-USDC pool:
Screen Shot 2021-10-16 at 3.52.40 AM

The truth is in the pudding, no? Would think this would have been a core feature for a Serum dedicated AMM, especially before applying for emissions. Maybe run the protocol for a bit, use your own emissions and try again next month? Coming off a little thirsty

Hey all ssj from solfarm here

We drive most of our leverage farming trades through serum and can tell for a fact that the only thing we care about is tight spreads and low slippage. We dont let users open a leverage farming position if the spread or slippage is too high ( >1% spread or >2% slippage ).

While Atrix provides most of its TVL on serum who is gonna hit the tail-end orders though. With the launch of aggregators like https://jup.ag/ trades will just get routed to where it gets the best price. With the above assumptions in mind even though Atrix provides a lot of TVL to Serum if its bids dont get hit and it cant generate value for LPs what reason do they have to use it over Raydium which has a higher chance of orders getting hit and there by generating more revenue through fees.

1 Like

@therealssj check out the spread I posted in my latest reply above for our mSOL-USDC pool. We can work on making this even tighter with more technical work and are very open to feedback on our order placement.

And to clarify the tail end orders once again. We can’t use the TVL in the tail end orders in the center orders if we follow xy=k exactly, or else that wouldn’t be xy=k. Uniswap V2 and Sushiswap have over 90% of their TVL that is unused in “tail-end” positions. We have some ideas about leveraged xy=k positions that could help this, but are still researching these ideas.

@rocketman I’m not sure where this is hostility coming from, since Raydium is proposing to allocate 90% of the SRM grant for their own protocol, far greater than Atrix proposed, and now Atrix is also very competitive on spread and order placement just like Raydium.

Hey, sorry about the tone. Not trying to come off hostile. Understand you all are a new protocol, just seems like most of these projects have built their relationship with Serum with a certain degree of good faith over the course of the last year or so, and mainly relying on their own emissions to do this. I’ve played around with Atrix a little bit. Would personally like to see how your protocol can dev on it’s own and build a strong user base. Looks like a lot of people here are in agreement that TVL isn’t everything, but the next biggest thing would be cross-marketing and bringing new users to Serum to drive long term growth. It’s uphill sledding for the Solana ecosystem as a whole. Established AMMs (Orca, Saber, Raydium) built a brand first.

Definitely agree with you that Serum should work with projects that are aligned with Serum’s goals. We’re also working on building out the Atrix brand and community, as evidenced by our partnership with Marinade Finance and others. Marinade chose Atrix as a partner for their pools and farms, which have now gained a ton of traction.

On the other hand, I think it’s good for Serum to support new protocols that add value to the Serum ecosystem, not just large established projects, which then could lead to entrenchment and less innovation in the ecosystem due to lack of competition in the long run.

1 Like

On April 25, you said that 50% of your volume is flowing to CLOB. And now, you say that only 25% are flowing through. Let’s assume your proposal is granted and after a few months from now on, you suddenly say that only 5-10% of your volume is flowing through and then what will happen? How can we verify your words since information from your team is not public?

We haven’t changed any of the logic for the swaps and our logic has always been to give users the best price. The volume percentages changing is likely due to the amount of liquidity on Raydium increasing over the past few months and being able to provide users with better prices.
One thing to note is that the volume we are sending to Serum now is much higher than it was back in April.

@AlphaRay, has your percentage of liquidity sent to Serum (vs sent to your internal AMM) changed between April and now?

We send our liquidity to Serum according to the equation k=xy which is the same as it is for the internal swap so users would get the same amount of Raydium liquidity through swapping or through the Serum orderbooks.

Its actually increased over time as we’ve found new efficiencies.

Edit: Seems it wasn’t this account which asked this question earlier?