# Clone Applications

Use this guide to create and publish a clone (variant) of an existing Bitcoin or Ethereum device application. It focuses on the minimal steps required to complete the task.

## Prerequisites

- Understanding of the device app development framework (learn more [here](../../references/framework))
- Ledger VS Code extension installed and configured (learn more [here](../../beginner/vscode-extension))
- Icons templates [here](../../submission-process/deliverables/icons)
- Signed commits enabled: `git commit -S -m "message"`

## Bitcoin

If you are building a Layer 2 Bitcoin application :

### Fork \[app-btcext-boilerplate]\(https\://github.com/LedgerHQ/app-btcext-boilerplate)

### Customize it

- Add icons
- Customize Makefile and hooks
- Implement validation logic and UX
- Update the README

### Build and test

- Build with the Ledger VS Code extension
- Add tests and ensure CI passes

## Ethereum clones

### 44/60 path

> **Warning:** Make your changes to the `develop` branch only.

> **Warning:** For security reasons, the repository is set up to accept only pull requests with signed commits. To sign your commits, use the -S flag : <code>$ git commit -S -m your commit message</code>

### Fork the Ethereum application

Fork the [Ethereum app](https://github.com/LedgerHQ/app-ethereum).

### Modify app-ethereum/src\_common/network.c

Add your chain ID, chain name and Ticker to [network.c](https://github.com/LedgerHQ/app-ethereum/blob/develop/src/network.c) following this example:

```js copy
{.chain_id = 592, .name = "Astar", .ticker = "ASTR"},
```

### Add an icon for Ledger Stax

Add your 64x64px gif icon in the `glyphs` folder following this naming convention: `chain_yourchainid_64px.gif`.
Use the template provided [here](../../submission-process/deliverables/icons#stax-template).

### Add your Network to Chainlist.org

Click "Add Your Network +" on [the Chainlist homepage](https://chainlist.org/) and follow the ReadMe to add your Network.

### Open a pull request

When your application is ready, open a pull request on the Ethereum application repository.

### Other paths

> **Warning:** If your chain does not use the `44/60` path, you won't be able to use Metamask with your device app.

> **Warning:** Make your changes to the `develop` branch only.

> **Warning:** For security reasons, the repository is set up to accept only pull requests with signed commits. To sign your commits, use the -S flag : <code>$ git commit -S -m your commit message</code>

The following page uses the Walton Chain as an example, please replace every `WaltonChain` occurence with the name of your coin and chain.

### Create a file in app-ethereum/makefile\_conf/chain

Following the next example, add a `.mk` file in `app-ethereum/makefile_conf/chain`

```c copy
APP_LOAD_PARAMS += --path "44'/999999'"
TICKER = "WTC"
CHAIN_ID = 15
APPNAME = "WaltonChain"
```

> **Caution:** It is necessary to choose a Derivation Path and a Chain ID specific to your network to prevent the risk of replay attack (Introduced by EIP155) that can happen when using the same Derivation Path ( m/44'/60'/0') and Chain ID as Ethereum. This could expose your users to loss of funds.<br />
> You can either use the same Derivation Path but define a new chain ID (make sure this is not used by another network) or use slip44/BIP44 standard to reserve a dedicated coin type that will allow you to define a new derivation path.

### Upload your app's icons

- Add your 16x16px Nanos , 14x14px Nano S Plus / Nano X and 32x32 Stax gif icons in the `icons` folder following these naming conventions: `nanos_app_chain_yourchainid.gif`, `nanox_app_chain_yourchainid.gif`, `stax_app_chain_yourchainid.gif`
- Add your 64x64px gif icon in the `icons` folder following this naming convention: `stax_yourchainid_64px.gif`.
  Use the template provided [here](../../submission-process/deliverables/icons).

### Build the application

To build the clone application, use the Ledger VSCode extension. [Follow the beginners' guide if you need help](../../beginner/vscode-extension).

### Add your Network to SLIP-0044

Open a PR to add your network [in this file](https://github.com/satoshilabs/slips/blob/master/slip-0044.md)

### Open a pull request

When your application is ready, open a pull request on the Ethereum application repository

## Publishing the application

When your application or PR is ready, follow the process in [Publishing an application](../../submission-process/process).
