Deploy Uniswap v3 on Redstone

Description

Deploy Uniswap v3 on Redstone

Proposal Motivation

Redstone is a new L2, designed especially for applications built with MUD and autonomous worlds. We propose a canonical deployment of Uniswap v3 on Redstone, to facilitate the exchange of in-game assets that are beginning to propagate within onchain apps and autonomous worlds on Redstone.

Redstone was developed to provide a home for MUD applications and autonomous worlds that would otherwise struggle to scale on traditional L2’s. The underlying protocol on which Redstone runs, Plasma Mode, was designed in collaboration with OP Labs. Plasma Mode is a departure from traditional L2’s, which post all input data to L1 Ethereum. Instead, Plasma Mode posts only a commitment to input data to L1, while the actual data is stored offchain. This model brings two key affordances to developers: more flexibility when choosing DA providers and transactions that are in many cases cheaper than traditional L2’s. Crucially, the challenge contract for data inputs lives on L1, which means that Plasma Mode relies on only Ethereum to force data to be available.

With Uniswap v3 on Redstone at launch, Uniswap would have the opportunity to be the immediate DEX available to the nascent autonomous worlds space. An important thing to note about onchain games and autonomous worlds is that tokens which exist within them have some form of utility and context. While onchain composability arguably started with the ERC-20 token, autonomous worlds can bring composability to an even more mature state. Onchain games have evolving economies, many of which have in-game tokens, and also promote modding, and new clients and plugins. Many of these plugins can extend the original game, app, or world, creating richer in-game economies.

This deployment is being co-proposed by Redstone and AW House, a grants-giving organization for autonomous worlds. AW House will be managing the frontend for Uniswap v3 on Redstone, and is responsible for maintenance of token lists, and other engineering matters. We have enlisted Protofire to build the frontend for the Uniswap v3 deployment.

List of Actors:

  • Proposer: Redstone and AW House

  • Deployer: Protofire

  • Front-end: AW House

  • Bridge Provider: Standard OP Stack bridge

  • Sponsor: Michigan Blockchain

Redstone Background

We merged Plasma Mode into the OP Stack especially for Redstone, and expect other L2’s to use the protocol in the future. As stated above, Redstone (and Plasma Mode) were built for MUD applications and autonomous worlds–but what does this mean in practice? In the past two years we’ve seen a proliferation of data-intensive onchain games. Dark Forest, as an example, is ~650bytes per transaction, amounting to about 1 gigabyte over a ten day period (which was the length of a previous Dark Forest round). Uniswap v3 contracts on L1, as a comparative example, post about 2.5 megabytes per day, amounting to 25 megabytes over the same period (1/40th the amount of data).

Even traditional L2’s struggle to support the data and throughput-intensitivity of onchain games. OPCraft, a game built by Lattice in 2022, saw 2 million transactions in 10 days with a small user base, and cost 400-500k gas per transaction, mostly for its procedural world generation inside the EVM. Calldata was still large: 64 bytes per in-game move.

These early examples illustrated to us that a chain like Redstone, custom-built for onchain games and autonomous worlds, needed to exist.

Redstone Testnet

Redstone Holesky Testnet has been live since November 15th, 2023. In this time, games like Sky Strife and DF Archon have held playtests to test their own game mechanics, and Redstone itself.

Over the course of three playtests, ranging from 2-4 weeks, Sky Strife saw over 2,300 registered players, 4,800 matches, 400k transactions, and over 1.4 million Orb in circulation, which is the in-game asset players are rewarded for winning matches, and are used to create new Sky Strife matches. You can learn more about Orb, and how it will function on Redstone Mainnet here.

DF Archon, a community-run series of Dark Forest rounds, saw over 200k transactions within a 100-hour period.

Additionally, from the period of November 15 to the time of writing, Redstone Holesky saw over 23,000 unique bridge events.

Redstone Mainnet

From April 4th to April 30th, we held the Race to Mainnet, an opportunity for all teams deploying on Redstone to battle-test their applications before an official Redstone launch on May 1st. During this period, teams worked with our developers to ensure their projects were running smoothly, and also had the opportunity to playtest their games with the gaming guilds with World Explorers, WASD, and GG Quest.

The following teams participated in the Race to Mainnet and will be launching Redstone in May:

  • Biomes, an “onchain Minecraft-like sandbox” by a team of digital physics aficionados and OPCraft fans

  • DEAR, a new game from ARPA Network, featuring whimsical pixel-based artwork and a struggle between good and evil

  • DF Ares, community-organized rounds of the beloved onchain game Dark Forest

  • Downstream, an infinitely moddable MMO, and the “world’s first Post Singularity Civilisation Simulator” built by Playmint

  • GG Quest, an onchain gaming guild bringing quests, leaderboards, and progression to onchain games

  • Sky Strife, a fully onchain RTS game built by the Lattice team, featuring fast-paced combat and tactical matches

  • Small Brain Games, the much-beloved developer of onchain games like words3, draw.tech, and most recently Yonk, will be releasing a game for Redstone

  • This Cursed Machine, a "science-fiction body horror fulfillment center simulator” by Moving Castles, an indie studio based in Berlin

Yesterday, Redstone went live to outside users for the first time. Games like DEAR, Sky Strife, and This Cursed Machine will all be launching with in-game tokens, and all games launching on Redstone support plugins, modding, and extensions – meaning that game mechanics could be further augmented by in-game assets launched in the future. As an example, plugin ideas from the Biomes team includes rewards for winning in-game contests, and tax collection on digital land.

Even before Redstone Mainnet was live to users, we already saw instances of user-generated content. At the AA Worlds Summit in Lisbon in April 2024, one team built a plugin linking four games on Redstone testnet which enabled players to mint tokens in-game.

After Redstone launches to users, we expect to see an acceleration in the amount of composability and modding present in autonomous worlds.

Our Collaboration With Optimism

As detailed in our introduction, Plasma Mode was built in collaboration with OP Labs. With Redstone, we are committing to the Superchain, and joining the Optimism Collective as OP Stack core developers.

Our partnership with Optimism has emerged over the past year and a half. In late 2022, we deployed OPCraft, a Minecraft-like game built with MUD, on an OP Bedrock testnet. While the game worked well, we also realized that if the game were posting transactions to mainnet, it would be prohibitively expensive for most users to play (and data-intensive for chains themselves to run). After researching optimal ways to scale transactions in MUD worlds, our research brought us to Plasma, an early option proposed by researchers attempting to scale Ethereum.

It is not a coincidence that many of the leaders at Optimism were also early Plasma researchers. In early 2023, we began to collaborate more seriously with the Optimism team on developing what would eventually become Plasma Mode. In November 2023, we formally announced Redstone, Plasma Mode, and that we would be joining the Superchain.

Success Criteria

Uniswap v3 on Redstone will:

  • Expose Uniswap to an entirely new domain in the Ethereum ecosystem: onchain gaming and autonomous worlds. While Uniswap is present on many chains and different kinds of ecosystems, Uniswap does not yet have a deployment on a chain that is especially built for onchain games. This is an emergent ecosystem, and would benefit Uniswap to be the first DEX on Redstone.

  • Undergird the burgeoning economy on Redstone: as explored above, Redstone will be launching with a number of games that use ERC-20 tokens in their gameplay. Uniswap has the opportunity to facilitate the swapping of these tokens. The goal is for Uniswap to the the de-facto global DEX on Uniswap. We currently have no other DEXes deployed.

  • Enable the discoverability of new games and tokens on Redstone: When new games with tokens deploy on Redstone, we do not want them to worry about whether users will be able to trade their assets on day 1. Uniswap will be able to alleviate this.

Deployment Details

Optimistic approval of this proposal by Uniswap governance will lead the below Uniswap v3 contracts to be deemed as the canonical deployment on Redstone. The approval wil be complete if there are no severe points of contention posed during the 7-day RFC stage and if the veto option during the Onboarding Package Snapshot does not attain a majority vote.

As is the case with all canonical v3 deployments, this deployment will be subject to Ethereum Layer 1 Uniswap Protocol governance and control. The text record of the uniswap.eth ENS subdomain titled v3-deployments.uniswap.eth will be amended by the Accountability Committee to include the reference to the stated v3 contracts. This amendment will occur only after a successful RFC and Snapshot phase.

Relevant Uni v3 Contracts:

The Uniswap contracts are owned by this crosschain account controlled by the Uniswap DAO on L1.

Uniswap’s Onboarding Package

The purpose of the Uniswap Onboarding Package is to allow new deployments of Uniswap v3 to get set up with three month’s worth of liquidity incentives, a frontend, and an incentive distribution tool like Merkl. These resources will help position Uniswap to have a formidable presence on new EVM chains.

Criteria for Package Adoption:

After the 7-day RFC period concludes for this proposal, a temperature check will be posted via Snapshot. This off-chain vote will be used to determine how much in incentives–if any–the DAO would like to allocate to this deployment. The options are–

  • $250k

  • $500k

  • $750k

  • $1M

  • No Incentives

A temperature check will be considered met as long as the total number of votes cast for the funding options is over >10M. If there isn’t a clear winner for which level of incentives the chain should receive, a discussion can be had before the onchain proposal. All incentives will be distributed in terms of $UNI.

Timeline

  • On May 1st, the Protofire frontend for Uniswap v3 contracts on Redstone went live.

  • This RFC will be live for 7 days before the Onboarding Package temperature check is posted

  • The onchain vote to approve the incentive–if one is elected–will occur thereafter

  • The Accountability Committee will alter the relevant subdomain after a successful RFC and temperature check

3 Likes

Hello, a couple questions:

  1. How did you decide on the list of contracts? I noticed that the contract list does not include UniversalRouter and some other contracts, like Permit2. Compare with this list, for instance. The SwapRouter has been superseded by the universal router, according to Uniswap’s docs.

  2. Am I correct in thinking that any incentives also include costs for Merkl, but not for Oku (as you already have a frontend)?

1 Like

Hi @kfx–thanks for your questions.

  1. Here is a list of contracts that you should be on the lookout for. If you check other deployments apart from the Rootstock one, you’ll see that this is the list of contracts that are required.

SwapRouter02 can handle most routing needs effectively, addressing various trading scenarios and path optimizations. As for Permit2, its inclusion depends on whether you aim to implement gas-saving features like EIP-2612 permit functionality, which allows users to approve transactions using signatures instead of on-chain transactions. This can reduce things like gas costs, yes. Regarding the UniversalRouter, if the deployment requires handling more complex or specific routing logic that SwapRouter02 does not cover, then UniversalRouter can be beneficial.

The message sender and message receiver addresses, as in the RSK proposal, would be important for non-L2 deployments–ie deployments that don’t use a canonical bridge and have to rely on, say, Wormhole for message passing.

  1. You are correct about the Merkl costs. Those will be included no matter what incentive package we create–although over time the DAO will attain a discount on fees. The Accountability Committee will keep the DAO updated regarding costs here over the coming weeks/months, but you can presume a default take rate of 3%. As for front-end, Oku was not used for this deployment. AW House took care of front-end, and that cost has already been dealt with. You may access the site at this link..

For those who are curious and want to keep track of some stats, check out this Dune page. As of three days into mainnet, over 500 ETH has been bridged over to Redstone. The goal is to have Uniswap be the de facto source for swapping assets on this gaming L2.

1 Like

Redstone has only 526 ETH TVL on their Layer 2.

Due to the Extremely low TVL, we are not convinced that this deployment will be beneficial for Uniswap yet. Despite this, Redstone has already financed a front end meaning deploying without incentives has no additional costs for the DAO.

We will vote for this proposal with no incentives. However, we recognise the ecosystem is still in its early stages and incentives may be justified in the future.

Just a quick accuracy check, 526 ETH (now 537 ETH) converts to roughly $1.6M TVL, not $750k.

Nevertheless, completely respect the choice to hold off on incentives for now, and appreciate you deciding to vote on the proposal!

1 Like

This is a valid point. We will also not be voting in favor of this proposal.

This proposal has completed the 7-day RFC phase. All contracts have been deployed and verified. The deployment has therefore been optimistically approved by the Uni DAO. We will now turn to a temperature check to vote on whether or not the DAO would like to employ the Uniswap Onboarding Package to help incentivize Uniswap pools on Redstone. This vote also includes a veto option, allowing any delegates who hold a dissenting opinion to veto this deployment altogether.

To make a more informed decision, please view these sites for some stats about current Redstone activity:

You may place your vote here.

2 Likes

The following reflects the views of L2BEAT’s governance team, composed of @kaereste and @Sinkas, and it’s based on the combined research, fact-checking, and ideation of the two.

Echoing the sentiments of @0xkeyrock.eth and @jengajojo, we too will be voting for the deployment to happen without incentives.