Proposal: Allow Patrons to add liquidity on the xDAI network

The Patron role is earned by adding liquidity to a Balancer pool. Gas is expensive on mainnet. A quick test of adding 3.9 SEED / 0.07 wETH to Balancer is asking for 0.25 ETH ($440) to do the transaction.

I would like to make it possible for someone to qualify as a Patron by adding liquidity using Honeyswap for an xDAI token, mSEED, and bridged wETH, WETH.

mSEED or “Mirrored SEED” is an xDAI token whose minting is pegged to SEED on the mainnet. Each time a SEED mint event occurs on the mainnet, it is mirrored in mSEED.

The Arbitrary Message Bridge (AMB) uses a pair of oracles on the chains being bridged to make arbitrary calls across them. Using the AMB, it should be possible to automate the mirroring process.

An obvious question is why not use a “bridged” version of SEED? A bridged token works by:

  1. Mainnet contract accepts an amount of SEED
  2. The contract puts the SEED in a vault and signals via the AMB to the xDAI mint
  3. xDAI minting contract creates an amount of xSEED to match the quantity on SEED on the mainnet
  4. User does with xSEED whatever they want
  5. Going back, xSEED is burned and SEED released from the vault

The issue is that the bridge process executes in part from the mainnet and incurs the exorbitant costs. The mirrored token creates a controlled token supply without any mainnet operations.

An open question is what should the initial balances be for the mSEED token? There are a few possibilities:

  • Everyone starts with a zero balance. This option is undesirable because it delays the creation of a token supply.
  • Everyone gets whatever their current holdings are on mainnet.
  • Everyone gets however much they’ve been minted on mainnet.
  • Everyone gets the total number created on mainnet / 300 (for the 300 Players)

Unfortunately, it is not entirely straightforward to determine the token balances for an ERC-20 token. My personal preference at the moment is the equal division to all players. The inequality between old and new Players is pretty extreme: I have 360 SEED, pΞTH has 3,100. The deployment of this contract can be like the start of a new race.

There are a few technical options. The primary one is that ERC-20 doesn’t have support for batch transfers. When the MetaGame DAO mints tokens, it does so to a treasurer’s address. The treasurer then runs the SourceCred system and uses something like disperse.app to distribute SEED in proportion to the distribution of XP.

This means that if my mirror contract is only copying minting events, it will only create tokens for the treasurer, not the Players.

ERC-1155 is a more advanced token standard that adds a batchTransfer method which permits doing a set of operations in a single call. If it were being used, the dispersal and mint actions could be a single event. Also, it makes writing the mirror contract much simpler.

There are a couple different options for how to make it possible to do the SEED dispersal using an ERC-1155 interface.

One is to create an ERC-1155 compliant contract that knows about SEED and constructs calls to its methods. Another is to allow 1:1 conversion to an upgraded token. The former is less disruptive to existing investments, the later is cleaner and easier.

The overarching goal is to allow investment in the xDAI chain with a minimum of mainnet operations.

11 Likes

Hey man I really like the idea and cost savings to players and patrons is always important.

However, the parallel chains is a bit hard to fully understand. I want to ask some questions to help understand. mSEED gets shadow minted if mainnet mints. That still requires mainnet minting and gas costs of minting all the seeds in the first place. The bridge route requires more gas to lock seeds and the bridge message fee. Is there any concern about these costs?

Beyond just the tokens getting to xDai mSEED or xSEED. Can you please help me understand how we improve seed price or LP into the smart pools from xDai? Is the idea that cross chain arb will raise the other chain?

Further digging into mSEEDs without them being synced with mainnet seeds, what happens if people spend or transfer mSEEDs around. How does that relate to their mainnet SEEDs holdings?

I also wonder about how that would impact LP providers and allow us to use the liquidity in our balancer smart pool from L2. It will take more education to teach people how to use xDai and LP on a second chain. I did not think balancer was on xDai. Can you walk me though the workflow a new patron might follow if they have never used xDai before and if possible we can evaluate transactions involved and potential cost savings.

The more I think about it, the more I think tracking the mainnet is an unnecessary complication. We can mint from the XP distribution and not have to worry about main chain at all.

It means a duplication of work. I want to do some more investigations into how to streamline the process. I really want the xDAI token to be a ERC-1155 and have a batchTransfer method. It’d also be nice if it had ERC-20’s wallet compatibility…

I’m very trepidation about venturing into Solidity for a project that could end up being responsible for actual money. I just don’t know where the balance should lie between being safe (ERC-20) & having technical flexibility (ERC-1155) & compatibility with existing systems (a melange of the two).

Thought this might be a relevant data point. The r/ethtrader subreddit, which distributes the $DONUT ERC-20 token to users based on karma, is experimenting with distributing on xDAI. It appears that some in the community are just paying the gas fees themselves? A multi-sig wallet claims the tokens on mainnet for those that have opted in to xDAI distribution, brings those tokens over the bridge, and distributes on xDAI. No claiming required for contributors.

2 Likes

Hey guys. I am a big xDAI Fan and a member at 1Hive. I would love to see SEED on HoneySwap. xDAI is so much better for communities like MetaGame. for the vast amount of transactions, the security offered by Ethereum is really not justified IMO.

However, this creates two separate unconnected tokens. there will. be no way to move liquidity between mainnet and xDAI.

As a side note, The 1Hive community are launching an Aave fork really soon :tm:. Being that the two projects are closely aligned, I think it would be pretty easy to get seed added for lending and borrowing, giving seed even more utility

3 Likes

Has anything new developed here? @dysbulic ?

The xDai considerations have been largely on hold as the mainnet minting was worked out. The release of a tool for claiming SEEDs should quiet the clamoring for SEED on mainnet, so hopefully things can progress with xDai.

The current proposed solution is to mint a new token on the xDai network that will be liquidity backed with bridged SEED (xSEED). This requires someone to go through the minting process to create an officially sanctioned xDai token.

An alternative is to provide liquidity for xSEED using another token like HNY, but that creates a weird setup where xSEED is assumed to have no value when it has value originating from the Balancer pool on mainnet.

I bridged a few SEED the other day, and have been enjoying spending them. Until there is a route for Patrons to onboard using xDai, I don’t expect to see other people doing much bridging.

1 Like

I would like to bridge to xDai sometimes maybe yes. Honeyswap them around.

1 Like

assuming there were a bridge up, maybe the claiming UI that @METADREAMER put together could be extended to support a mint and bridge workflow so that user looking to interact with seeds predominantly on xDAI could avoid needing to move through multiple applications to get there.

Personally, I am a 1hive member and user of honeyswap. I’d be more than happy to move some liquidity into a seeds/xDAI or seeds/honey pair.

1 Like

¿How does that work? The bridged token has value b/c of the mainnet. Honeyswap wouldn’t know anything about that, so wouldn’t it force you to essentially start at zero again?

If you’re going to do that, shouldn’t you just create a new token?

I’m pretty sure token governance for the mainnet is controlled through a DAO. The structure makes sense. It seems like a first step in creating a new token is setting up the DAO to control the mint.

Are you familiar with this documentation:

Are you familiar with this documentation?

I’m the only one who has bridged tokens. It cost me about 0.1ETH.

If there were a 100% xDai Patron onboarding solution they could put the ETH that would have gone to gas toward liquidity. Well, they have to get xDai in the first place. That is possible with fiat for much of the world, but not the US.

My understanding is the best route to a 100% solution is the mint of an xDai specific token and backing it with HNY or xDai or whatever.

1 Like

Are you doing anything with your xSeed?