DimensionDev / Maskbook

The portal to the new, open Internet. ([I:b])
https://mask.io
GNU Affero General Public License v3.0
1.51k stars 310 forks source link

[Bounty] Solana and Serum in Maskbook #1722

Closed yisiliu closed 2 years ago

yisiliu commented 4 years ago

Introduction and Background

Maskbook is designed and developed as a chain agnostic tool, which relies on no chains and in another word, supports all the chains. Currently, Maskbook is focusing on DAPPs on Ethereum but we would like to integrate more chains into our extension to provide users more options. Therefore, we are redesigning our internal wallet into a multi-chain wallet and by the time the new design is finalized, we would like to start integrating new blockchains other than Ethereum.

Content

Solana Wallet

Solana is a scalable and high performance blockchain. We would like to integrate their wallet creation, management and support relevant on-chain operations. Wallet integration is considered as the phase two of this bounty and we are expecting this to start once we release our wallet standard.

Serum UI Integration

Serum is a decentralized on-chain trading platform which supports both orderbook and swap. We would like to integrate its interface in our trader plugin. It allows users to hover their mouse on any token hashtag starting with "$" on Twitter to view its price, trending and a uniswap exchange interface if there is a pair. Integrating Serum, we can support more options other than uniswap so that users could directly trade tokens with Solana without leaving Twitter. This is considered the phase two.

Deadlines

TBD.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 5000.0 USDC (5000.0 USD @ $1.0/USDC) attached to it as part of the solana-labs fund.

aahutsal commented 4 years ago

Why not use the WalletConnect protocol as the base?

yisiliu commented 4 years ago

@aahutsal We have already integrated WalletConnect as an option in our internal wallet but we still need to have our own wallet for users who don't have WalletConnect. And, does WalletConnectsupport Solana or any other blockchains? In our new wallet architecture, we are not limited to any specific chain to support all the exciting systems.

Tedko commented 4 years ago

Why not use the WalletConnect protocol as the base?

@yisiliu @aahutsal yeah i think WalletConnect dont support SOL or other chain.

aahutsal commented 4 years ago

@Tedko @yisiliu by default WalletConnect supports only ETH (aka ERC20) network. But with some modifications we've done for NEO network, it supports non-ERC20. That's how I've found your project request on gitcoin.co and placed my bid there. Placing my Work Plan here:

Work Plan

Since I've already worked on a similar project for NEO blockchain (proof: https://github.com/aahutsal/neo-walletconnect) I'd warn that you go the wrong path. There's a WalletConnect protocol designed for the mature Ethereum network. There is a bunch of wallets already created that works with WalletConnect protocol with Ethereum and other ERC20 coins. For the NEO network project, my task was to create some architecture that would allow WalletConnect capable wallets to work with non-ERC20 blockchain (NEO), which I've done.

In the repository, you would find the generic architecture described and some dockerized components we use to run NEO blockchain privately. Working code is not submitted due to NDA, of course. I'd basically suggest considering this proposed approach, save your time, monies and get a much better WalletConnect capable engine (which is de-facto the only world standard for now for connecting dApp -> WalletConnect -> Wallet).

yisiliu commented 4 years ago

@aahutsal sounds great! My next questions will be 1. does it support all elliptic curves or even RSA(eg Arweave)? and 2. can it run as a local service with a local storage so that users won't need to install WalletConnect wallets? Thank you!

aahutsal commented 4 years ago

@yisiliu

  1. Currently it does support only a limited set of requirements NEO network guys requested. But since I see the need for other blockchains in similar integration we might probably start a new project (aka grant) on gitcoin.co, collect funds, gather requirements, and implement all other features requested. Basically it's hardly using code injection (e.g. Provider feature in terms of WalletConnect. Think crypto algorithms could also be injected if we properly implement the architecture.
  2. I've updated my previous comment, please, check it open repo and read diagrams explaining architecture. Actually, it's all you need for now it seems.
yisiliu commented 4 years ago

@aahutsal thanks bro! I am quite busy this week but I will try my best to explore your repo and will get back to you soon. I really appreciate your proposal and I am looking forward to our potential cooperation!

aahutsal commented 4 years ago

@yisiliu I'm also leaving tomorrow till Monday. Schedule the meeting if you wish here: https://calend.ly/aahutsal

yisiliu commented 4 years ago

@aahutsal Booked on Nov 3rd! Thanks.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 266 years from now. Please review their action plans below:

1) developerfred has been approved to start work.

As a user and admirer of the product, I would love to work on that bounty and enable integration with new portfolios and UIs. Starting with Serum and Solana. I'm excited to start this bounty. 2) aahutsal has been approved to start work.

Since I've already worked on a similar project for NEO blockchain (proof: https://github.com/aahutsal/neo-walletconnect) I'd warn that you go the wrong path.

There's a WalletConnect protocol designed for the mature Ethereum network. There is a bunch of wallets already created that works with WalletConnect protocol with Ethereum and other ERC20 coins.

For the NEO network project, my task was to create some architecture that would allow WalletConnect capable wallets to work with non-ERC20 blockchain (NEO), which I've done. In the repository, you would find the generic architecture described and some dockerized components we use to run NEO blockchain privately.

Working code is not submitted due to NDA, of course. I'd basically suggest considering this proposed approach, save your time, monies and get a much better WalletConnect capable engine (which is de-facto the only world standard for now for connecting dApp -> WalletConnect -> Wallet).

Learn more on the Gitcoin Issue Details page.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 264 years, 6 months from now. Please review their action plans below:

1) developerfred has been approved to start work.

As a user and admirer of the product, I would love to work on that bounty and enable integration with new portfolios and UIs. Starting with Serum and Solana. I'm excited to start this bounty. 2) ult-processor has been approved to start work.

I really admire this project and I will like to contribute to it.

Learn more on the Gitcoin Issue Details page.

aahutsal commented 4 years ago

@aahutsal Booked on Nov 3rd! Thanks.

@yisiliu thanks for approval. Unfortunately, I have been late for a meeting that been scheduled 30 mins ago. Can we reschedule for today afternoon?

yisiliu commented 4 years ago

@aahutsal yes I did email you for the link lol. I am not sure if I am gonna make it this afternoon. Can we do it tomorrow afternoon?

aahutsal commented 4 years ago

sure, tomorrow would work for me

aahutsal commented 4 years ago

@aahutsal yes I did email you for the link lol. I am not sure if I am gonna make it this afternoon. Can we do it tomorrow afternoon?

Please, schedule yourself: https://calendly.com/ahutsal

aahutsal commented 4 years ago

@aahutsal yes I did email you for the link lol. I am not sure if I am gonna make it this afternoon. Can we do it tomorrow afternoon?

Okay. You booked Friday. Would work for me. Tty then.

yisiliu commented 4 years ago

@aahutsal That wasn't me. I just booked tomorrow.

aahutsal commented 4 years ago

@aahutsal That wasn't me. I just booked tomorrow.

My bad. That was not you :) See you've booked tomorrow. Talk then.

aahutsal commented 4 years ago

@yisiliu could you please clarify how many "new blockchains other than Ethereum" should be integrated with the scope of a current project?

yisiliu commented 4 years ago

@aahutsal for now we are looking at: Ethereum, Polkadot and its parachains, Solana, NEAR, and Arweave(quite different tbh).

aahutsal commented 4 years ago

By Ethereum you mean Ethereum only, or all ERC20/ERC721? It's quite a lot, @yisiliu !

developerfred commented 4 years ago

@yisiliu and @Tedko What is the Maskbook Solana wallet for fee for swaps made on twitter?

Tedko commented 4 years ago

By Ethereum you mean Ethereum only, or all ERC20/ERC721? It's quite a lot, @yisiliu !

For Ethereum it will be a full useable wallet for our mask.io internal wallet. That include erc20/721; try the latest ones you can actually see we already have 721 beta.

aahutsal commented 3 years ago

@Tedko @yisiliu I'm working on docker-compose that's intended to run all nodes for blockchains listed (Ethereum, Polkadot, Solana, NEAR, and Arweave). My PIXELBOOK 2019 with 16GB RAM gets slow running all of that. Besides that - it would take ages and gigabytes to sync nodes running.

I think we should consider moving these nodes to some public IP and probably scaling them horizontally (similar to what Infura.io does for Ethereum) - which would be a must for your wallet (which is a browser extension by design). That's going to be a separate service. I can consider participation.

developerfred commented 3 years ago

@aahutsal try use gitpod.io for running your nodes.

aahutsal commented 3 years ago

@aahutsal try use gitpod.io for running your nodes.

Thanks, @developerfred . I'll ask you once I need your assistance.

developerfred commented 3 years ago

@aahutsal No worries, at any time

aahutsal commented 3 years ago

@yisiliu @Tedko I guess you got my previous message - I'm not asking where to get the more powerful machine to finish that project. I own a bunch of hardware locally. I'm talking about the challenges your end-users will be faced with.

Tedko commented 3 years ago

@yisiliu @Tedko I guess you got my previous message - I'm not asking where to get the more powerful machine to finish that project. I own a bunch of hardware locally. I'm talking about the challenges your end-users will be faced with.

Gotcha. I will ping public chain folks see whether they have the solution. -

aahutsal commented 3 years ago

kk

Tedko commented 3 years ago

kk

For Near: https://rpc.mainnet.near.org

For Solana i guess they also have the rpc solution :_)

aahutsal commented 3 years ago

Well, I know that most of the services run their own HTTP REST endpoints. I've considered that long ago. This solution has its own pros and cons. I'll explain in detail in the email I'm working on. Will sent to @yisiliu and ask CC you. Since the gitcoin project is a contest project I guess it's reasonable to keep discussing via email privatelly.

Tedko commented 3 years ago

Well, I know that most of the services run their own HTTP REST endpoints. I've considered that long ago. This solution has its own pros and cons. I'll explain in detail in the email I'm working on. Will sent to @yisiliu and ask CC you. Since the gitcoin project is a contest project I guess it's reasonable to keep discussing via email privatelly.

No problem. my email: suji.yan [AT] dimension.im

aahutsal commented 3 years ago

@Tedko can you confirm you received the email I've sent a few hours ago?

yisiliu commented 3 years ago

@Tedko can you confirm you received the email I've sent a few hours ago?

I think so. Thank you!

Tedko commented 3 years ago

We received thx

On Thu, Nov 19, 2020 at 18:03 Yisi Liu notifications@github.com wrote:

@Tedko https://github.com/Tedko can you confirm you received the email I've sent a few hours ago?

I think so. Thank you!

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/DimensionDev/Maskbook/issues/1722#issuecomment-730264404, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTAVTJS7LNXC2Q7MVU62QTSQTUQTANCNFSM4SQLI7JQ .

aahutsal commented 3 years ago

@yisiliu @Tedko Guys I need your decision - am I allowed to use Clojure to create a proxy application or NodeJS with Typescript is a must? Javascript (Typescript) language is not well suited for managed multithreaded applications, while Clojure is designed for that.

Jack-Works commented 3 years ago

@aahutsal Hi, our application is based on web extension. If you'd like to use any other technologies, please make sure it can be compiled into JavaScript or WebAssembly. Otherwise we have no way to integrate your code into our codebase.

Jack-Works commented 3 years ago

And if you would like to use other languages, please contact me to verify if the bridge to the JavaScript really works before you actually write codes.

aahutsal commented 3 years ago

@Jack-Works ClojureScript will be compiled to Javascript. But I'm talking about other things. During the discussion, we came to agreement to run the proxy server + Dockerized nodes somewhere (Amazon AWS) to serve those blockchains that do not have pubic REST interfaces. Please, review that document: https://github.com/aahutsal/wcsidechain/blob/master/SOLUTIONS.org

developerfred commented 3 years ago

@aahutsal you can interact with blockchains through contracts, one solution that turns contracts into query api is The Graph Protocol.

aahutsal commented 3 years ago

@aahutsal you can interact with blockchains through contracts, one solution that turns contracts into query api is The Graph Protocol.

Thanks for your suggestions. a) not all blockchains needed runs contracts b) to interact via a contract it should connect to the public node. Not all blockchains run public nodes like https://www.rinkeby.io/ and since they don't allow installing additional local software - just browser extension we should run a proxy server somewhere. This is what I'd discuss if you allow me @developerfred

aahutsal commented 3 years ago

@Tedko seems you said you have an AWS account? Can you please email me credentials to access some server? I'd install and show what I have done.

yisiliu commented 3 years ago

@aahutsal What spec do you need? And please paste your ssh public key here so that I can give you the access.

aahutsal commented 3 years ago

4GB RAM or better 8GB RAM is preferred. I will send my key with the next msg.

aahutsal commented 3 years ago
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiMnVc3teL9CNIlNocXcgCmcZrbSxAieoy6ER4kYBYg6ln6d/mg7RogU/jJhJVSRnuKqiwad4yMQU6hVPafJvtfh5kkaafUfkgNanl0P+zZatY2PQa9XMZeameDPlVZvgY6lb9RTxlXnW4NzeHwJ23qTFQr6jjglr1Z3aKxnrzdGemC3Vn2OOQSs1e9hZ/8TNErX7yDGnrgWRWqI+Vano9l+wVZ1vqpyP0B5sigTELTlGmXPdLSYtRr5nmd4VTa3ilKpq8GaMGibE4w1Qi2W5Us0AHXF8ZVIQld/8ushi6/wtZrI2wG2BWKQSZ74FSHFztOg4ivkfos9YHfN1OX9kF gutsalarsen@penguin
yisiliu commented 3 years ago

@aahutsal Expect the EC2 machine tomorrow morning UTC+8 please. I will let you know when it's ready

aahutsal commented 3 years ago

thanks

septs commented 3 years ago

@aahutsal an tips, https://github.com/{username}.keys e.q: https://github.com/aahutsal.keys