# Introduction

Welcome to the Celo Terminal wiki. Here you will find a collection of step-by-step guides and tutorials on how to self-custody your Celo assets and interact with the various decentralized apps on the Celo network.


# Self custody

## Setup

In this guide we will go through step-by-step instructions on how to manage your Celo assets (CELO, cUSD, etc...) on your own without an intermediary.

**NOTE** When you decide to self-custody your assets, you gain full control over them. However, you also take on the full risk and responsibility for your own assets. Make sure you understand the risks and follow best account management and security practices to avoid theft, or accidental loss of your funds.

### Step 1: Download Celo Terminal

Download latest Celo Terminal from: [https://celoterminal.com](https://celoterminal.com/)

### Step 2: Create or import an account

Decide what type of an account you want to use:

* If you have a [Ledger Hardware wallet](https://www.ledger.com/), you can use that to connect to Celo Terminal.
* If you already have an existing account (for example through: [Valora App](https://valoraapp.com/)), you can import it using its 24-word secret Mnemonic phrase.
* Or, you can create a new local account that will be stored on your computer, encrypted by your password.
  * **DO NOT FORGET THIS PASSWORD!** Without this password, there is no way to decrypt your local accounts keys. Thus you might lose access to your accounts forever.

Ledger hardware wallet would be the recommended way. Hardware wallets provide a very strong last line of defense against most types of crypto theft or accidental loss. If you have a Ledger device, follow [these instructions](https://docs.celo.org/celo-owner-guide/ledger) to install Celo Application on it (You only need to follow steps till `Setting up the Celo app` section, rest is not needed).

If you end up creating a new local account, make sure you either backup the whole accounts database to some place else, or just back up the secret mnemonic phrase of your newly created account to some place safe. If you somehow lose access to your local key, you will permanently lose funds kept in that account.

### Step 3: Test sending & receiving CELO & cUSD

Use `Send / Receive` app to test out sending and receiving CELO or cUSD tokens to finalize the setup. It is recommended to always make small (i.e. <1 CELO) transfers at first to make sure everything is setup correctly.

## Security recommendations

* If you plan on holding non-trivial amount of crypto assets, invest in a hardware wallet.
* Never share your 24-word mnemonic phrase or private-key string with anyone else under any circumstances.
* Use strong, unique password in Celo Terminal to secure your locally stored accounts. Using strong password protects you even if your accounts database gets stolen somehow.
* Keep backups of your locally stored accounts:
  * Option 1: Use a strong, unique password in Celo Terminal, and backup your accounts database to Dropbox or other similar service. Use 2FA (2 factor authorization) for the cloud service that you use for backups.
  * Option 2: Keep physical (i.e. written down on a piece of paper) backups of your mnemonic phrases somewhere safe.
* Do not subscribe to Celo Terminal **`beta`** upgrades:
  * **`Beta`** versions always have higher chance to have bugs or unexpected issues. If security is your absolute highest priority, we recommend not installing the **`beta`** releases.

## Advanced security

### Use local blockchain client

By default, Celo Terminal connects to [cLabs Forno](https://docs.celo.org/developer-guide/forno) node to interact with the Celo network. If you want to avoid any centralized dependency on cLabs, you can run your own local blockchain node and have Celo Terminal connect to that instead.

* [Setup full node](https://docs.celo.org/getting-started/mainnet/running-a-full-node-in-mainnet)
* Click network indicator in top-left of Celo Terminal and point it to local node: (e.x. `http://localhost:8545`)


# Staking with Celovote

## Staking? Celovote?

Celo network as part of its proof-of-stake protocol allows holders of CELO tokens to earn rewards if they participate in securing the network by locking the CELO tokens and voting in the elections.

You can read more in-depth technical documents about all this from official cLabs documentation pages:

* <https://docs.celo.org/celo-codebase/protocol/proof-of-stake>
* <https://docs.celo.org/celo-holder-guide/voting-validators>

Celovote provides a service that allows CELO holders to earn these rewards by delegating the voting rights to the service. Celovote performs all the voting on behalf of the user and optimizes votes for maximum returns. Users still retain full custody of their own CELO tokens and can stop using the service at any time.

Read more about Celovote in its FAQ: <https://celovote.com/faq>

## Staking in Celo Terminal

### Step 1: Lock CELO

To use Celovote service, you will need to lock at least 10 CELO. Use `Locker` app to lock up desired amounts of CELO.

### Step 2: Authorize with Celovote

Install Celovote app by clicking "More apps" and adding Celovote app to your Terminal. Once you authorize Celovote, you should see votes being cast on your behalf. Votes will be activated automatically after an epoch to start earning rewards.

![Celovote App](/files/-MZNksv1z-6UlAkhhUmt)

### Step 3: Locking more CELO or unlocking CELO

You can lock up more CELO at any time. Celovote will automatically cast votes and activate them on your behalf. You can also unlock CELO at any point in time. However, unlocking takes 3 days to process, so you will need to wait 3 days before you can withdraw back your CELO tokens.


# MultiSig accounts

## Multi-signature accounts

MultiSig refers to a special type of account that requires multiple separate entities or keys to confirm transactions before they are executed.

MultiSig accounts are commonly used to secure very sensitive accounts that either hold large amount of funds directly, or that might have indirect access to those funds through privileged access.

### MultiSig accounts in Celo Terminal

Celo Terminal comes with the native support for [Celo MultiSig contract](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/MultiSig.sol).

You can either create a new MultiSig account or import an existing one using the Accounts app. MultiSig account has an associated local owner account that proxies the transactions.

![](/files/-MZNlTujzCE2hWPURBUN)

### Using MultiSig account

MultiSig accounts, for the most part, can be used seamlessly throughout Celo Terminal as if they were just another regular account. A caveat is that if a MultiSig requires multiple signatures to execute a transaction, it won't show its effects until other owners confirm it.

NOTE: There is currently a restriction in the implementation such that MultiSig accounts can not deploy new contracts. Thus, if an app is attempting to deploy a new contract, it will fail for MultiSig accounts.

### MultiSig app in Celo Terminal

To confirm transactions that other owners send, you can install the MultiSig app from the app store. MultiSig app also provides other functionality to change owners, signature requirements, and other properties of the account.

![MultiSig app](https://github.com/zviadm/celoterminal/wiki/images/screenshot-multisig-app.png)

## Recommendations for creating MultiSig accounts

We recommend following these steps when creating a new MultiSig account:

* In "Create MultiSig" window, set "Signatures required to change MultiSig properties" to number of configured owners.
* Once MultiSig is created, using MultiSig app, submit a transaction to change required signatures to actual desired amount.
* All owners will have to confirm the transaction for it to succeed.

These extra steps are useful to make sure all MultiSig owners are familiar with the app and it also tests that all owners are capable of signing/confirming transactions.


# Using WalletConnect

WalletConnect is an open protocol for establishing secure communications between DApps and Wallets. Celo Terminal supports [WalletConnect v2.0](https://docs.walletconnect.org/v/2.0/) out-of-the box.

### Connecting to a DApp using WalletConnect

If the DApp supports WalletConnect, it will list it as one of the available wallet options.

![](/files/-M_RTRZ4csdTBi4MhrTY)

Once you select "Wallet Connect" option, DApp will generate a QRCode. You will need to Copy & Paste that QRCode in Celo Terminal app.

![QRCode Generated by the DApp](/files/-M_RTpG_Te75jxqocQed)

![QRCode pasted in Celo Terminal](/files/-M_RUI84VlmsTNcVjzRv)

Click Connect and Approve the connection with the DApp.

### Signing transactions through WalletConnect

When the DApp needs to perform a transaction, it will send it for signing to Celo Terminal using the WalletConnect protocol. When there are pending transactions, WalletConnect menu-item will show a notification.

![Pending transactions show up in the App menu](/files/-M_RUxJnaS--h0fWezzx)

When you open the WalletConnect app inside Celo Terminal, regular transaction flow will start. You will be able to sign or reject the transaction in Celo Terminal and it will be executed by the DApp itself afterwards.&#x20;

## Troubleshooting issues

WalletConnect v2 is still in the Beta mode, thus there can still be some unexpected issues. If you are running into any weird issues with the DApp connections, you can try following things:

* Reload Celo Terminal: "Ctrl + R" (on Windows), or "Command + R" (on Mac)
* If reloading doesn't fix the issue, you can disconnect all DApps and reset the state using the appropriate button in the WalletConnect app.

![](/files/-Ma0VyrBKmXG4s2ZwVLF)

&#x20;


# Connecting to Test networks

By default, Celo Terminal does not allow users to connect to non-Mainnet networks. This is done to protect the users from accidental mistakes or unexpected behavior. If you want to use Celo Terminal to connect to Alfajores or Baklava networks, you need to set special environment variables before launching the application.

***NOTE*** There is a higher likelihood that some apps might experience bugs if you constantly switch between the Mainnet and test networks.

### Launch for Baklava

Example of creating a launch script to connect Celo Terminal to Baklava network. (This is for MacOS):

```
# create file: launch-baklava.sh
```

```
export CELOTERMINAL_NETWORK_ID=62320
export CELOTERMINAL_ACCOUNTS_DB=home/.celoterminal/celoaccounts-test.db
/Applications/Celo\ Terminal.app/Contents/MacOS/Celo\ Terminal
```

```
# Make the script executable and run it
> chmod +x ./launch-baklava.sh
> ./launch-baklava.sh
```

***NOTE*** In addition to changing the NETWORK\_ID, this launcher script also changes accounts database location. This way, you can have separate set of accounts that you can use on the test networks vs on Mainnet.

### Env Variables

List of all CELOTERMINAL environment variables:

```
CELOTERMINAL_NETWORK_ID  - ChainId of the network to connect to.
CELOTERMINAL_NETWORK_URL - Default network URL to connect to.
CELOTERMINAL_ACCOUNTS_DB - Accounts database location. Path must have form of: <home | userData>/<path to the accounts database file>
```


# Registering new cERC20 tokens

## Register with Ubeswap

CeloTerminal utilizes Ubeswap token list internally, thus you can just register your token with Ubeswap to have it included in CeloTerminal automatically.

{% embed url="<https://github.com/Ubeswap/default-token-list>" %}

## Register with CeloTerminal

To register a new cERC20 (Celo ERC20) token in the predefined list of tokens that CeloTerminal supports, you can also simply create a pull request that adds the information for the new token in this file: [src/lib/erc20/registry.ts](https://github.com/zviadm/celoterminal/blob/main/src/lib/erc20/registry.ts)


# Developing Apps

Learn more about how to develop apps for Celo Terminal: [docs/developing-apps.md](https://github.com/zviadm/celoterminal/blob/main/docs/developing-apps.md).


