MagicSwap: the First AMM with Universal Token Compatibility
The first AMM in crypto to support pools for both ERC-20s and NFTs through a single router, and enable trading of all items within game economies.
Treasure is pleased to announce MagicSwap v2, the first AMM in crypto to support pools for ERC-20s and NFTs through a single router. MagicSwap enables trading of all items within a game economy (fungible and non-fungible) rather than requiring users to use Uniswap and NFT marketplaces separately. At launch, the protocol will support ERC-20s, ERC-721s, and ERC-1155s with the ability to quickly add new NFT types using our custom vaults.
MagicSwap includes automated royalties that can be set for each pool–a feature that is directly integrated into the pool creation process. The protocol will be incorporated into the Trove marketplace over time, enabling users to use the swap without having to interact with the AMM itself.
Release is slated for early Q2 2023 on Arbitrum. MagicSwap is currently being audited by Macro. After Arbitrum, we plan to deploy the protocol on Arbitrum Nova and explore expansion on other chains to begin connecting the entirety of web3 gaming through Treasure’s infrastructure. MagicSwap utilizes $MAGIC as the governance and fee token for the Arbitrum implementation. $MAGIC will remain the governance token for implementations on other chains, although the fee token will likely be ETH.
MagicSwap was custom designed as a tool for building immersive gameplay experiences that keep users focused on the game rather than the prices of assets. Many critics of web3 have claimed that crypto games have been “over-financialized.” MagicSwap allows for a less speculative experience without eliminating the advantage of blockchain-based gaming (e.g. transferable assets, allowing skilled players to be rewarded for their achievements). MagicSwap establishes the optimal middle ground between GameFi and soulbound token economies.
We will publish a detailed technical explanation of how MagicSwap works on Gitbook in due course. Here, we provide a high-level overview of how MagicSwap addresses key pain points faced by blockchain game developers and enables growth of the overall web3 gaming ecosystem.
Key Advantages
Universal Token Compatibility
Current AMMs either support NFTs or ERC-20s but not both, forcing users to visit multiple marketplaces to trade. MagicSwap connects the entirety of web3 game economies through a single router, even allowing for pools with different types of NFTs. This feature, not currently available in existing AMMs, unlocks the possibility for things like “Treasure tiers”–groups of NFTs that the pool treats as fungible.
Game-Native UX
MagicSwap enhances the trading experience for users by enabling them to trade NFTs without directly handling an ERC-20. MagicSwap can be built directly into games through NPC shop vendors or in-game bazaars. This UX keeps players immersed in the game world, not on NFT marketplaces, and focused on their collectibles rather than the price of a token.
Automated Royalties
The protocol has a three-tier royalty structure (protocol fee, liquidity provider fees, and creator royalties). $MAGIC governance will decide the fixed protocol fee. Pools can include LP fees as well as creator royalties, with the DAO having the ability to set a minimum default for both. Projects that supply liquidity for their assets in MagicSwap can set their own royalties while also guaranteeing that lower-royalty marketplaces cannot syphon off their revenue.
In-Game Marketplaces
Forcing users to manually list their items on the marketplace can detract from the overall game experience. Users are pulled away from the game in two ways. First, selling peer-to-peer takes time, disrupting the flow of the game. Second, peer-to-peer trading requires listing items for a specific price and evaluating offers. The user is programmed through this experience to see their game items in terms of money rather than in-game utility.
Our initial reason for building the AMM was noticing users’ complaints about having to trade ERC-1155s individually on Trove and evaluating bids separately. We built MagicSwap to eliminate needless kinds of friction, while allowing game developers to introduce friction when it enhances the game. (We discuss this idea in more detail in the next section.)
Sweeping
MagicSwap allows users to sweep any number of NFTs from the pools. You can choose which NFTs you’d like to buy and sell on the swap page, making for simple and convenient trading UX. Most crucially, new projects will be able to create tokens that can be swept in unlimited quantities from a pool while only requiring the user to pay a single transaction cost like on Uniswap (a feature not available on other NFT AMMs). Unlimited sweeps can even be conducted for ERC-721s at the gas cost of one ERC-721 purchase compared to other AMMs.
Automated Economic Balancing
MagicSwap allows for game economies that auto-balance based on player trading. This feature reduces the damage caused by miscalibrated emissions as well as absolves developers of accusations of “nerfing” a particular strategy. NPCs can be programmed to make these adjustments rather than the team having to manually adjust the game design after launch. Auto-balancing will be a very promising mechanism for open world games, MMORPGs, and certain kinds of sandboxes.
Practically all games have a use for dynamic pricing to some extent. Take, for example, a legendary sword with a max supply of 100 units. Underestimating the effort that players must put into acquiring this sword would ruin its specialness and result in the items being distributed to the earliest players rather than the most skillful ones. The AMM dynamically adjusts the cost of legendary items to make sure the effort required is commensurate with the developer’s expectations.
Oracle
The protocol includes a decentralized TWAP oracle based on Uni-V3. Values in AMM pools do not need to represent “price.” Developers can experiment with using the relative values of items within pools as a way to auto-balance any kind of game mechanism, like drop rates, character strength, and guild relationships. (In the final section, we discuss Treasure’s plan to utilize this oracle to a greater extent than necessary in a gaming ecosystem.)
NFT LP Rewards
A later version of the protocol will allow pool creators to distribute rewards to liquidity providers using an implementation of the Sushi rewards program. Unlike SushiSwap, MagicSwap allows for liquidity providers to be rewarded in ERC-20s and NFTs with pool creators being allowed to select up to five tokens (including both fungible and non-fungible tokens).
Many projects will not want to incentivize liquidity for their in-game items to definancialize the experience as much as possible, but we recognize that some projects will lean more heavily to GameFi mechanics. In this case, NFT farming will be a crucial tool for creating a sustainable game economy.
NFT-NFT Pools
MagicSwap allows projects to create pools that use an ERC-1155 as the base pair, a first for NFT AMMs. Many traditional games feature in-game currencies like gems and rupees rather than a traditional coin. MagicSwap allows for high-supply collectibles to be used as in-game currency rather than a financialized token, emulating the traditional gaming experience that has been lacking in web3 to date.
We believe this feature will help the Treasure ecosystem grow significantly. The original $MAGIC thesis was that projects would prefer to use an existing currency with established liquidity rather than creating their own token. Launching an ERC-20 puts an enormous burden on developers. Projects struggle to maintain liquidity, and after the speculative period is over, a death spiral occurs in which declining price of the ERC-20 causes a sharp reduction in both liquidity and user base.
Moreover, users are conditioned to think of ERC-20s as speculative instruments, meaning developers are discouraged by their communities from adjusting the emissions of their in-game currency. This predicament makes it much harder to correct miscalibrated game loops and results in undue stress and community conflict. Using a NFT as the game currency will likely reduce the expectations on developers to prioritize the item’s market cap over the game experience as well as preserves projects’ ability to tweak the emissions as needed to balance the game.
MagicSwap represents a more mature version of the original $MAGIC thesis: games need local currencies to drive in-game progression, but many developers will prefer using a high-supply collectible as the game currency while adopting $MAGIC as the marketplace and ecosystem token.
Better Game Design
A key lesson that Treasure learned in its first year is that not all forms of trading are desirable. In particular, encouraging players to hoard assets and view their game progress in terms of “yield” undermines the overall experience and transforms enjoyment-seeking gamers into financial speculators.
We built MagicSwap with a vault permissioning option that game developers can use to establish rules for trading out of the pool. Permissioning may seem like an “anti-crypto” design choice, but in the context of games, designers need to maintain tight control over their game economies to create desired experiences for players. This mechanism also facilitates entirely new web3 games.
Location-Based Marketplaces
Many traditional games include location-specific marketplaces like bazaars. The player can only buy and sell with other players in the bazaar. Today, crypto-gamers can trade with anyone regardless of their in-game location. Games often introduce friction, like geography-based trading, to force players to make strategic choices and enhance the immersiveness of the game world. Introducing spatial components to in-game trading allows for instant trading and creating strategic choices for players like guild-based cooperation, smart NPC vendors with different inventory, and hunting for rare marketplaces with the best deals.
Non-Financial Token Economies
Game developers can utilize MagicSwap to create a web of tokens that can be traded amongst each other without providing the users easy access to a financial off-ramp. The game (or even a set of games) can enjoy the benefits of dynamically adjusting prices in the internal economy without introducing any degree of financial speculation. This general mechanism can be applied in specific contexts to control which aspects of the game become financialized. For example, a game can allow players to swap various resources but not convert into USD. The game could still include a degree of financialization if players can craft ways to upgrade their character or produce rare items. These rare items could be sold peer-to-peer on the Trove marketplace, thereby introducing friction to the collectible trading experience but not to trivial items like a cheap in-game resource.
The combination of Trove and MagicSwap corrects the primary problem with friction in today’s game economies: players can exit their ERC-20 position in one transaction, but trading low-cost NFTs must be done peer-to-peer. Treasure’s infrastructure keeps users focused on playing and earning rare collectibles rather than an in-game currency.
Character-Bound, Not Soulbound
The least realistic part of web3 gaming is that items are held by wallets rather than characters. Even if developers prevent transferability of assets outside a player’s wallet, a cunning user can simply accumulate items from many characters’ achievements and then funnel these points towards an upgrade for one character. Pairing pool permissioning with character-bound inventory will help reduce over-financialization of gaming and produce a genuine sense of first-person gameplay sorely lacking in web3 today.
Role of $MAGIC
MagicSwap utilizes $MAGIC as the governance as well as fee token. The protocol takes a 0.5% fee for trades in MAGIC conducted through MagicSwap pools. The protocol will also collect the royalties currently in place on the Trove marketplace: 2.5% for the DAO and a variable 0-20% for the project creator. Higher cost of AMM trades will serve as deterrence for players to hoard assets and exploit the in-game economy. MagicSwap pools will initially be created by the DAO, under guidance from the community-led AMM Council, with the possibility of experimenting with more permissionless options later.
For non-financial assets without USD value, the team will approximate the protocol fee for each pool based on previous trading data on the Trove marketplace. Revenue from MagicSwap implementations on other chains will likely be collected in ETH, which will go to supporting the DAO treasury.
this all sounds nice on paper, but I'd like to see a more detailed technical whitepaper exploring these ideas, as this blog does not go into detail and it reads more like concepts
I wish you could operate it.
To others, it seems like they have already given up on development.
There are almost no updates.