-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gnosis Chain for L2 payouts #287
Comments
This is an excellent specification. However I would consolidate the small and similar tasks (i.e. add chain ID) into a single bounty. Thanks for this. |
These are Although they are similar they correspond to different repositories so it is better to keep them apart. |
This is going to take a while, it's broken into several small issues worth just 12 USD, gas for the claim is worth more than that right now |
You could consider registering a dedicated claims wallet and queue up all your claim transactions with low gas speeds. |
Would take forever but that's the only way for now |
We could consolidate the following tasks into a single issue: |
According to the checklist it appears that we can start already issuing permits on gnosis chain. We should merge to main asap @0xcodercrane @Draeieg |
I put checkmarks for tasks with ready to review PRs. In order to start issuing permits on gnosis chain we need to merge the following PRs: |
alright as soon as the PRs get merged I'll kill two birds and test #267 at the same time |
Discussed in #276
Originally posted by rndquu April 28, 2023
Ethereum gas prices are high again and withdrawing payouts becomes more and more expensive.
Some folks are already complaining:
![Screenshot 2023-04-28 at 18 01 25](https://user-images.githubusercontent.com/119500907/235183318-dd1d58b6-72de-4d76-a55d-a44cfa262573.png)
There are many options for L2 solutions (here the term "L2" also includes sidechains). I think we can select any L2 solution which meets the following criteria:
Eth mainnet <=> L2
Gnosis Chain is not widely adopted but meets other criteria.
How fast is the bridge
Bridge website: https://bridge.gnosischain.com
It takes 20 block confirmations on ethereum mainnet (~4 minutes) to transfer DAI from ethereum mainnet to gnosis chain. Technically ethereum mainnet's DAI are converted to XDAI on gnosis chain (XDAI is used for gas payments on gnosis chain, 1 XDAI = 1 DAI).
It takes 20 block confirmations on gnosis chain (~2 minutes) to transfer XDAI from gnosis chain to DAI on ethereum mainnet. It requires 2 transactions: 1st transfer transaction is on gnosis chain and 2nd claim transaction is on ethereum chain (which is pretty expensive right now)
Codebase
Right now we support payouts in ERC20 DAI on ethereum mainnet. XDAI in gnosis chain is not a plain ERC20 token, it is used for gas payments (the same way as ETH is used in ethereum chain). While it seems to be natural to support XDAI (which is pegged to DAI) for payouts in gnosis chain it also requires us to maintain 2 codebases for permit2 and gnosis safe payouts. By "2 codebases" I mean supporting payouts in ERC20 and native gas tokens which adds complexity. That is why it is better to use WXDAI in gnosis chain which is a plain ERC20 token.
In short
ERC20 DAI in ethereum = ERC20 WXDAI in gnosis chain
. So bounty hunter payouts are going to be inWXDAI
in gnosis chain and inDAI
on ethereum mainnet.Bounty hunter flow
From a bounty hunter's view everything is the same. He posts
/wallet 0x01
and solves an issue. Payouts (permit2 URLs or automatic safe transactions) are performed in a chain that would be set in partner's config.Partner flow
Partner would need to add a
CHAIN_ID
parameter to the bot's config. So partner will be able to use either ethereum mainnet either gnosis chain.Also notice that while it is technically possible to create 2 gnosis safes with the same address (on mainnet and in gnosis chain) current gnosis safe web UI does not support this feature. From https://help.safe.global/en/articles/5267779-i-sent-assets-to-a-safe-address-on-the-wrong-network-any-chance-to-recover:
How to migrate on the bot's side
Basically we need to:
CHAIN_ID
from a partner's configThe text was updated successfully, but these errors were encountered: