pancakeswap / pancake-frontend

:pancakes: Pancake main features (farms, pools, IFO, lottery, profiles)
https://pancakeswap.finance
GNU General Public License v3.0
2.69k stars 3.54k forks source link

[Feature Request] Decentralize Pancake Frontend #2046

Closed nghianguyen119 closed 2 years ago

nghianguyen119 commented 3 years ago

Is there an existing issue for this?

Is your feature request related to a problem you are facing?

Pancake smart contracts are trustless and decentralized because they live entirely on-chain. But I found that the frontend of Pancake still requires a server to be alive.

Some other projects such as Uniswap, Balancer V1, Curve,... hosted their frontend on IPFS to increase decentralization, security, and accessibility.

Describe the solution you'd like

I tried to make a demo for Pancake frontend on IPFS, you can find here: https://pancakeswap.unstoppabledefi.org/ Pancake on the public gateway: https://cloudflare-ipfs.com/ipfs/QmVpim8nqj9YNnG9sKZDU9BZHQoRufHqf1qE9Cxe6vWAgj/

The Github workflow to deploy Pancake on IPFS:

  1. Build the static web (that requires some modifications on the router and image paths of your source code)
  2. Deploy on Pinata (centralized IPFS pinning service)
  3. Deploy on Crust Network (decentralized IPFS pinning service)
  4. Modify DNS

If you are interested in this subject, don't hesitate to leave a comment, I'm working on some topics of Crust Network project and trying to bring web3 to the real world.

How does this feature benefit PancakeSwap users and CAKE holders?

Centralized frontend:

Hosting app on IPFS:

Anything else?

No response

Chef-Cheems commented 3 years ago

Those are all valid points. I just want to add that Akash Network looks more interesting to me from developer point of view. I haven't compared Akash vs IFPS in terms of cost and ease of management so I wouldn't argue that its better.

nghianguyen119 commented 3 years ago

Those are all valid points. I just want to add that Akash Network looks more interesting to me from developer point of view. I haven't compared Akash vs IFPS in terms of cost and ease of management so I wouldn't argue that its better.

That makes sense to me comparing with different decentralized storing projects!

From my perspective point of view, IPFS currently is the biggest decentralized storage network which is widely used by Web3 projects, like Uniswap Interface, Sushiswap DApp, Balancer DApp, Polkadot Apps and most of the NFT-projects(like Flow/HashMasks).

And currently, IPFS nodes are hosted in 2 ways: centralized (like Pinata/Infura/Cloudflare) and decentralized (like Filecoin/Crust). Centralized IPFS nodes provide stable but limited free storage space and a few IPFS replicas, while decentralized IPFS nodes can solve this problem.

Let's take Uniswap as an example, they're using Pinata+Crust as their storage plan, Pinata can help Uniswap to quickly pin its DApp in centralized IPFS node, then Crust will increase Uniswap's DApp replicas, to make it more decentralized and distributed, you can refer this to see the storing process of Uniswap: https://github.com/Uniswap/uniswap-interface/pull/1342

Furthermore, IPFS is supported by decentralized domain name systems (blockchain domains) such as Ethereum Name Service or https://unstoppabledomains.com/. You can have a look at https://uniswap.eth.link/, they use Ethereum Name Service and link the CID of their interface to that domain in a decentralized manner.

As for the cost, it is divided into 2 parts:

  1. Centralized IPFS Cost: Let's say Pinata, storing 1 GB data is free, and more pricing you can refer this
  2. Decentralized IPFS Cost: Let's say Crust, storing 1 TB data/year only cost $1-2, and all the Defi DApp are totally FREE in the early 2 years, Decentralized Cloud Foundation will cover this bill 😄

As for the management, there is plenty of toolkits can be choose with Pinata and Crust:

  1. Github Action: Pinata Github Action, Web3Authed IPFS Uploader, Crust Pinning Github Action, More
  2. Node.js SDKs: Pinata SDK, Crust Pinning SDK, Infura IPFS SDK
  3. Command line: IPFS Remote Pin with Pinata, Crust CLI

Hope this information can help you to learn more about IPFS!

nghianguyen119 commented 3 years ago

@Chef-Cheems If you plan to decentralize Pancake's interface, Crust Network team (including CTO) are willing to have a meeting with you. They have worked in this sector for more than three years (one of their products is decentralized pinning service of IPFS - the mainnet is live), so they have a better overview about decentralizing web-app than me.

I find that Pancake also uses IPFS for the NFT, you could have a look at the report of Pancake NFT here https://artforall.io/score/pancakeswap/0xdf7952b35f24acf7fc0487d01c8d5690a60dba07, I believe Crust Network can improve the overall score by replacing centralized pinning service.

PancakeSwap-bot commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 2 days.

R-K-H commented 3 years ago

Vote for keeping this issue open.

matbrgz commented 3 years ago

I vote to keep things simple, at this moment the decentralization of internet is a hype. I suggest to wait until the trend, and see which technologies will be more robust. At this moment, do not decentralize the frontend. The Vercel does a fantastic job on that.

PancakeSwap-bot commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 2 days.

R-K-H commented 2 years ago

Respectfully I disagree, to handle any heavy handed response and to provide usability for userbase, deploying a decentralized access point seems wise.

PancakeSwap-bot commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 2 days.