contracts icon indicating copy to clipboard operation
contracts copied to clipboard

UniBridge: Single bridge contract for tokens

Open dmihal opened this issue 4 years ago • 4 comments

Description

New bridge for fungible tokens.

  • Doesn't require re-deploying new bridge contracts for each token
  • Allows deploying ERC777 & ERC20 tokens on L2
    • Tokens can be converted ERC777 <-> ERC20 on L2
  • L1 contracts can calculate the address of L2 tokens (using Create2)

Contributing Agreement

dmihal avatar Mar 01 '21 00:03 dmihal

Left points for discussion in the #devex channel on Discord.

Only things that I think would warrant additions to the actual contracts are a way for new tokens (meant to be used on Optimism) to lock in using ERC20 or ERC777

Also I would like to add some withdrawAndCall functionality like I've been talking with @ben-chain about for a while but that can be seperate from this PR 👍

transmissions11 avatar Mar 03 '21 00:03 transmissions11

@TransmissionsDev Ya there's lots of features I'd like to add around withdrawals as well, but I figured I'd try to limit the scope of this PR

dmihal avatar Mar 03 '21 10:03 dmihal

We need a depositFor function in order to allow interactions via smart-contracts. Similar to Polygon: https://docs.matic.network/docs/develop/ethereum-matic/pos/calling-contracts/erc20#deposit

rockfridrich avatar Mar 17 '21 09:03 rockfridrich

I'm sorry this PR has been sitting here for so long, without at least having some feedback from the team. FWIW, different people have had some discussion with @dmihal on other channels, so we're not completely ghosting on him.

IMO, the main obstacle to merging this is that review needs to be done carefully, and there is a significant amount of code here.

I'll sync with the team and try to come back next week with:

  1. a decision for if this should be in scope for the repo
  2. a timeline for review

maurelian avatar Mar 19 '21 19:03 maurelian