ARC-49: Astroport <> Skip MEV Recapture (Round II) - New, Improved, and Inclusive

Astroport <> Skip Proposal (II)


Skip would like to work with Astroport to co-create a custom MEV solution to recapture MEV and return it to the Astroport community wherever the DEX is deployed 💰

We believe this will create a new source of sustainable, non-inflationary revenue for the Astroport community as it expands across the Cosmos :atom_symbol:

:rotating_light: But now, in an even better way…

TLDR: Skip proposes to create an open, competitive auction for Astroport orderflow, to allow all participants to compete to give the most amount back to the Astroport community, that would be available to all Astroport frontends.

:scroll: Context

This proposal is a refinement and improvement based on the first Astroport proposal posted here: https://forum.astroport.fi/t/arc-44-astroport-skip-sharing-mev-back-with-the-astroport-community/991.

From that conversation, we received a lot of useful feedback that we baked into an updated version. Additionally, other proposals have been discussed since then, and this proposal is aimed at building a more inclusive solution that can leverage participation from all parties to maximize revenue for Astroport via fair competition.

Thank you all for the feedback, and please share any thoughts you have on the below, refined proposal!

:x: Problems with Previous Proposals

  • :stop_sign: Exclusivity
    • Our previous proposal, and the one from Redpoint, ask to receive an exclusive right to backrun transactions originating from the Astroport frontend
    • Although, from a business sense, this might be attractive, it fundamentally limits the upside potential of the Astroport community in picking an MEV provider.
    • In addition, there is much more MEV available to be extracted by additional coordination outside the realm of pure cyclical arbitrage on Astroport pools, including:
      • CEX/DEX arbitrage
      • Intra-chain DEX/DEX arbitrage
      • Cross-chain arbitrage
    • Fundamentally, by limiting backrunning opportunity to one party, this limits the upside coming from potential participants that could bid to backrun Astroport transactions.
  • :brick: Reliability
    • Additionally, a problem specific to Skip’s last proposed V0 implementation was the contingency on validators adopting Skip’s mev-tendermint solution
    • This could have led to delays in transaction submission, and creates a fundamental external dependency
  • :link: Extensibility (With other frontends)
    • Finally, previous proposals do not address the question of other Astroport-interfacing frontends in their earliest versions, including TFM, and in the future others
      • Even if the canonical Astroport router is changed, since Astroport pools are permissionless, additional frontends can skip the router and use the pools directly.
        • The new proposed solution makes router changes unnecessary and gas-wasteful, as cyclical backrunning will already be returned.
      • Therefore, the right solution should be able to interface with all frontends out of the gate, as they are also part of the Astroport community and will affect LPs as does the canonical frontend

    :white_check_mark: Updated Solution

    🤝 Competitive Order Flow Auction (OFA)

    Skip is updating its proposal to create for Astroport a competitive and maximally profitable two sided auction for Astroport orderflow.

    Skip’s specialty is extremely fast, profitable auctions (we run a sub-second auction for over 150 validator mempools that has built 100,000+ blocks as of today), and believe it is the ideal solution to build competition for Astroport orderflow.

    That is to say, Skip will build an auction where:

    • Backrunners bid competitively to backrun message(s)
      • For each transaction, the unsigned msg with swap intention can be auctioned off to any party that places a winning bid to backrun it
      • Astroport’s official frontend sends unsigned messages to the OFA
      • The unsigned transaction is revealed to searchers that are participating in the auction, where they compete via bid payments for the ability to append a final message to the original transaction
        • The final message is a MEV capturing backrun, leveraging their own liquidity
      • The final message is restricted to a WasmExecuteMsg that routes arbitrary logic from the searcher through Skip’s OFA CosmWasm contract.
        • The OFA contract provides safety guarantees to the sender of the original transaction including that their swap never fails if the searcher is unable to capture MEV, their token balances never decrease from the searcher’s activity, and that the searcher uses their own liquidity source for the MEV capture.
        • Searchers will be required to keep liquidity in the contract, preventing “shill bidding” or winning opportunities that they ultimately can’t pay for
      • We expect that the maximum bid will quickly come to baseline at the profit obtained via cyclic arbitrage among Astroport pools
        • Eventually, it should exceed this amount for cyclic arbitrage, given the extractable value from cross-chain, CEX/DEX and DEX/DEX arbitrage
    • Modifiable payment splits
      • The frontend that interfaces with Astroport pools can specify payment splits of how it wants MEV (or “bid revenue”) to be distributed
      • This could go to a single address to then be more granularly split according to the community’s preferences
      • The split can be changed any time, and other frontends could also compete with their own splits, as long as they direct their orderflow to the open auction
    • Integration with the Astroport official frontend, and others
      • As before, the frontend should direct trading intents to the auction, where they can be optimally backrun after receiving bids from all traders
      • This solution is not dependent on validators running Skip’s mev-tendermint, as it relies upon atomic transaction upgrading
      • We expect to open the auction for <1 second, based on our experience with our existing auction systems
      • We could optionally add a “fast submit” option to skip the auction entirely
      • We can separately discuss with other frontends such as TFM (already integrated with Skip) to participate in the auction
    • Open-source backrunning contracts & simulation, so the community can participate!

      As part of this proposal, Skip commits to open-sourcing a backrunning bot for Astroport to the community, so that anyone can use it and compete in the auction!

      We have already done this with great success - see our Skipper bot (github .com/skip-mev/skipper) that is heavily used today on Terra2 and Juno and has made the auctions competitive. We will modify this bot to do transaction upgrading so it’s compatible with the auction, and to have out-of-the-box integration with Astroport. And best of all, it won’t be kept private by anybody :slight_smile:

    • Progressive Permissionlessness
      • Searcher participation in the auction will start permissioned as we work towards an open system that preserves Astroport users privacy while allowing permissionless set of searchers to participate in the auction.
        • The timeline to build permissionless auctions would be roughly 4-6 months, but we can start permissioned backrunning within 2 months.
      We propose partnering with a trusted party as the first participant in this orderflow marketplace, to run the open-source bots we provide (in the open) as we build out the permissionless system

      We think this will give quicker access to accountable backrunning recapture for the Astroport community (i.e. 2 months), and is not the intended long-term solution.

      NOTE: for transparency, we asked Redpoint to partner with us as this exclusive partner (in return for all fees), but they declined the offer. Thus, we will be open-sourcing everything and asking a trusted party to run the open source bots for the interim.

      • Participation in the auction will be open - parties like Redpoint, Blink, existing searchers, and others can participate in open, fair competition
      • Potential: Batch Auctions

        We are also exploring, as a solution to issues with permissionless auctions, to auction batch access to orderflow. I.e., this means that searchers would bid for (say) 1 hour of Astroport orderflow.

        This solves many of the issues associated with searcher accountability, and may lead to higher long-term payoffs for Astroport (as flow is generally more valuable then one-off orders).

        If we believe there is value here, we will follow up with a separate discussion in a couple months to propose it as a potential direction. Otherwise, our focus for auctioning will remain on a per-tx basis.

      :stopwatch: Updated Timeline

      • April: finish and launch first pass of the auction interface, integrated with Permissioned Searcher to begin arbitrage redistribution
        • Begin testing controls on permissionless system to prevent frontrunning, overbidding issues, and finalize mechanism design
      • August: Ship the permissionless auction solution by end of August 2023, and open up to all participants

      :moneybag: Compensation

      • 5% fee of the Skip auction, no upfront grant
        • Skip is dedicated to building the right MEV primitives in Cosmos to maximize sovereignty and efficiency
        • Given the importance of this solution, and the alignment we believe it will bring with the blockspace side of the auction, we can lower the fee taken from our original proposal
        • It is important that orderflow is not locked up with a single provider for any period of time, and we are willing to incur the build cost to make sure this does not happen
        • We also are no longer asking for any upfront or later ASTRO grant, as this solution has generalizable properties and we will not be maintaining our own backrunning bot infrastructure, instead making it permissionless.
        • Skip has raised substantial capital (>$6.5m), has a team of 14 people, and has built working, reliable MEV integrations for most major Cosmos chains. We would be delighted to bring our long-running expertise and products to service Astroport for years to come.
          • We are integrated already into Injective, Terra2, and will be live on future chains that Astroport is launching on. We believe the OFA will fit well with our other products, and is the start of a long-term collaboration with Astroport.
        • For the period of exclusive testing, the 5% fee would go entirely to the integrated searcher, as compensation for collaborating with us (and who would be expected to bid 100% of cyclical arb)
          • This ensures that Astroport fees will never go above 5%
          • Afterwards, searchers will bid in open competition

          If we can’t find a suitable partner within 2 weeks of this proposal passing, we will run the open-source code at max bid ourselves, which can be verified on-chain.

      :handshake: Contact

      Please reach out to us if interested in discussing or collaborating!

      Twitter: @SkipProtocol

      Discord: discord.gg/9Uq8NFMQJ7

      Site: skip.money

      Telegram: @magmar100

      3 Likes

      Hi there. So, first of all, I don’t think this is a bad proposal. It would capture arbitrage for the community. But it isn’t optimal. In v2 of my proposal, I discuss some of the issues with off-chain solutions, and I believe those issues apply to your proposal as well.

      Skip select has top of block execution (e.g. TXs in the auction will be placed at the top of the block) and TX execution success guarantees. This Astroport auction has neither. But it looks to me like you are saying that this auction, and Skip Select, would share the same benefits.

      I disagree and here is why.

      (1)

      An off-chain simulator cannot always know the order of the TXs in the block it is simulating (geolocation, validator block reordering, etc.)

      • This becomes more prevalent the more active the market gets.
      • More TXs in the mempool means less guarantee of TX ordering (network effect).
      • TXs can fail on-chain that pass simulation (example: slippage tolerance is violated).

      This is even worse for the auction…

      • Chain users may submit TXs during the time the auction is open, changing pool prices and therefore, introducing unreliability into searcher bidding.

      In summary, searchers may submit bids to your auction that ultimately fail.

      • Searchers may reduce their bids to deal with this issue, reducing revenue for Astroport at the worst possible time (when the chain is the busiest).

      (2)

      You said, “Even if the canonical Astroport router is changed, since Astroport pools are permissionless, additional frontends can skip the router and use the pools directly.”

      • For the same reason, additional frontends can completely skip your auction. They will skip your auction because they have no incentive to compete in it.
        • Why would someone who can keep 100% of the arbitrage profits enter your auction? It lacks economic incentive.

      You stated “The split can be changed any time, and other frontends could also compete with their own splits, as long as they direct their orderflow to the open auction”.

      • Other front-ends can keep 100% of arbitrage by not using your auction. So in my mind, either frontends will enter the auction but let Astroport keep almost nothing, or if you force them to give significant profits to Astroport, they won’t use your auction.

      • Even if other frontends like TFM do join the auction, some frontends might not play ball or might not care. These frontends’ arbitrage would be captured by the router if the solution was on chain.

      (3)

      “We are also exploring, as a solution to issues with permissionless auctions, to auction batch access to orderflow. I.e., this means that searchers would bid for (say) 1 hour of Astroport orderflow.”

      • This might work. OR it might eliminate competition. Only searchers with a lot of cash on hand would ultimately be able to afford the overhead of doing this, and if they can, they would use it to push others out of the market.

      One question as well:

      Your proposal says, “The final message is restricted to a WasmExecuteMsg that routes arbitrary logic from the searcher through Skip’s OFA CosmWasm contract.”

      How do you handle gas fees?

      Hi Kyle!

      Thanks for you feedback. We understand the permissionless version of the auction is competitive with your request for exclusive access, but we do believe permissionless systems are better in the long run. We hope in the future you choose to compete, alongside others who have committed to.

      For 1), it’s true that searchers won’t know exactly what state they are executing against. Neither would this be the case if you or another searcher were exclusive. Bids will be risk adjusted if you can’t control for state, of course. The solution here would be to integrate the OFA auction with the Skip-Select auction, but this has other downsides in terms of waiting for Skip validators to be up next. We may use Skip Select to deliver transactions to the top of the block where it is feasible to do so, but otherwise we won’t rely on it to avoid increasing execution time by any amount.

      That’s not to say that backrunning won’t be valuable, but searchers will have to risk-adjust. But our proposal contends that having that risk-adjustment and bidding be permissionless, rather than only one locked-in participant, will yield a higher outcome, as it has with our other auctions over time.

      For 2) this doesn’t make sense to us. Of course frontends can not use any product, there is no enforcement here. But, as our existing integration with TFM already shows, frontends are incentivized to use OFAs as it returns MEV funds the way they wish. We imagine a world where frontends compete, and distribution preferences are free to choose. But ultimately, some distribution is better than no distribution, and frontends today are not capturing any of the arbitrage. We are leaving distribution preferences up to frontends, as our mission remains sovereignty in these choices.

      You can’t force frontends to do anything, and you need open competition in these systems, and users will pick the right solution. The answer, in our eyes, is not to force everyone through the router. Astroport should stay decentralized, and frontends should be able to offer the frontend splits that they believe are correct, and use its pools permissionlessly.

      1. I don’t think this is the case - we have learned over the last 6 months of running millions of auction iterations that even though searchers can buy up opportunities, these systems tend towards fair competition. Worst case, Skip can find partners to bid close to true value using open-source code to baseline the auction, and we have other methods to prevent the “lockup” periods, such as forced buy-out prices that searchers can set for another searcher to buy out their period (credit to Tarun Chitra for this idea). This is also how 1Inch fusion roughly works, with success.

      Our contract for the auction enforces that the searcher pays the gas on transaction if they wish to backrun

      Thank you Mag. I don’t have any questions (yet), just wanted to say that this is a great proposal and huge improvement from the first iteration.

      2 Likes

      Thanks unsinn! And thanks for your feedback that went into this new version :slight_smile: The big feedback we indexed on was the community was uncomfortable with exclusive order flow agreements, and so the auction tries to solve around this.

      1 Like

      I think the mechanism depicted in this proposal is sound and the solution most likely to remain relevant as activity on Astroport picks up.

      I strongly concur with the general feedback against exclusive rights, especially when coupled with on-chain simulation and calculation: not only does this effectively enshrine a single strategy/corpus of strategy (mev leak 1), it also completely ignores cross-chain, CEX/DEX and statistical arbitrage (mev leak 2).

      At the heart of dealing with MEV is extraction: what is not recaptured will leak away from the application’s stakeholder. While an exclusive solution may be better than no solution at all, no single searcher will ever be capable of identifying the best strategy available across all markets at all times, so leveraging competitive markets for what they do best - aggregating disparate information - is by far preferable in my opinion.

      2 Likes

      Thanks for this revised proposal, @mag . I’m supportive of the competitive OFA model and perhaps the best of it, no upfront cost to the protocol.

      1 Like

      Hi there! Long-time Cosmos-builder, first time Astro-poster. I recently joined Skip and wanted to add some broader context on why we’re interested in working with Astroport. Skip sees itself as a design partner for building a new type of MEV economy tailored to Cosmos. We want to develop long-term relationships with protocols and help them build better full-stack market mechanisms. Astroport is a particularly interesting partner because of its multi-chain architecture, which is where we see Skip ultimately providing the most value in the long run. Skip is currently the largest blockspace market provider on all chains where Astroport plans to deploy. This means Astroport is a perfect design partner as we start to think about how to better unify execution across different domains. With the introduction of ABCI++ we are starting to see chains get more interested in expressing additional preferences over their blockspace. We believe those preferences will ultimately gain greater awareness of orderflow market structure and exogenous chain state. This is a pretty deep distributed systems challenge and complex multi-stakeholder coordination process, but that’s what gets us up in the morning. All of this is of course outside of the scope of the current proposal, but I think it’s important to convey that we view this initiative as a starting point for Skip to start spending more time in the Astroport community. We want to first understand the community’s needs and learn where we can provide value, and then begin to help Astroport think through how the protocol might evolve and further differentiate in light of where advanced blockspace and orderflow markets are going.

      Mag left his contract above, but if anyone wants to chat about this stuff I’ll leave mine as well. :slight_smile:

      Twitter: @hxrts
      Telegram: @hxrts
      Email: sam@skip.money

      3 Likes

      Thanks Sam and nice to hear from you.

      I would love to have a discussion about these proposals & how they impact the future direction of Astroport. Would you guys be interested in joining me and the Astroport team for a Twitter space or similar open discussion for the community?

      Of course! We’ve already been planning a chat with the community & @Sandro, would love to see you there :slight_smile:

      highly suggest the astroport community takes the Skip MEV recapture analysis seriously and puts it on-chain to a vote. This proposal would amplify profits

      1 Like

      ARC-49 is now up for voting here: https://app.astroport.fi/governance/proposal/40

      Appreciate everyone’s feedback throughout both iterations of the proposal.

      1 Like