Decentralization of protocol frontend
Many users depend on the websites that provide a simple way to interact with the smart contracts of defi projects.
In the event that the main project site is offline, having a duplicate copy of the frontend may assist user with various smart contract interactions.
The main frontend of a protocol can be down due to various reasons :
- Distributed Denial of Service (DDOS attack)
- Domain name DDOS / Malicious takeover
- Abandoned project
A clone front end will save you the headache from interacting with the smart contract directly, especially for various complex smart contract calls.
Having a duplicate copy of the project does NOT help when the protocol has inherent protocol exploits, or has in-built malicious code or mechanisms.
- Stop the developer or malicious 3rd party from draining the LPs or token.
- Prevents infinite mint of tokens.
Most projects store a copy of the frontend in their github repository. These frontend ‘source code’ are unpacked and not readied for deployment directly. Navigating and using github is not difficult but might be too nerdy an action for most users.
We will attempt to simplify the frontend cloning process through a quick and easy walk through of cloning the acryptos.com (ACS) site.
Cloning the site
- Load https://app.acryptos.com/ on your Chromium based browser.
(Brave browser/ Google Chrome / Microsoft Edge)
2. Ctrl-Shift-I (or right click ->’Inspect’) to enable the browser’s ‘Developer Tools’.
3. Navigate to ‘Sources’ tab
This should list the resources for acryptos.com app
4. Right click to save the following files :
- index.html (index)
- acryptos.719dabb7.css (cosmetics)
note: the listing checksums/filename changes over the revision
5. Navigate to stableswap page and save the following:
- index as stableswap/index.html
you will have to create the folder stableswap
You may navigate to your PC folder where you saved the files, it should list the following :
To deploy these files, you will need to upload the files to a webserver.
web3 wallets like Metamask, Mathwallet will not load / interact with a locally deployed (within your PC/mac) file referencing.
One can deploy these files with one of the free static web/app hosting site like
- amazon S3
The Netlify’s option will be the simplest for most user.
Signup for a free account and upload the 4 files accordingly.
To access ACS Vault
To access ACS Stableswap interface
When to clone?
When is a good time to clone a project’s frontend?
As we implied before, as a project changes, the files that interact with the smart contracts may also change.
We recommend that you consider making a backup of a project’s frontend whenever you see an update to the project, or at least when an update has any material impact on you.