Decentralization of protocol frontend

getUnrekt
3 min readNov 29, 2020

--

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 :

  1. Distributed Denial of Service (DDOS attack)
  2. Domain name DDOS / Malicious takeover
  3. 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.

For example:

  • Stop the developer or malicious 3rd party from draining the LPs or token.
  • Prevents infinite mint of tokens.

In these cases, direct interaction with the smart contract via etherscan.io or bscscan.com won’t help either.

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

  1. 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-core.3967345a.js
  • 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

6. DONE!

You may navigate to your PC folder where you saved the files, it should list the following :

Deployment

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

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

https://<yournetlifyhandle>.netlify.app/index.html

To access ACS Stableswap interface

https://<yournetlifyhandle>.netlify.app/stableswap-index.html

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.

Unrekt’s Mirror

We have cloned the frontend as a backup on our unrekt.net site.

https://acryptos-mirror.unrekt.net/

Note that the mirror copy is a minimalistic copy. It’s functional for smart contract interaction, however some images and UI elements may be left out.

--

--

getUnrekt
getUnrekt

Written by getUnrekt

https://unrekt.net — Ethereum and BSC Smart Contract approval toolbox

No responses yet