Skip to content

Commit 6f688f8

Browse files
committed
Updates for key generation instructions
1 parent 3298b1a commit 6f688f8

File tree

4 files changed

+128
-0
lines changed

4 files changed

+128
-0
lines changed

docs/tutorial/coins/backup.jpg

306 KB
Loading

docs/tutorial/coins/index.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Convex Coins
2+
3+
## About Convex Coins
4+
5+
Convex Coins are the native currency of Convex. It's a utility token that lets you use the full power of the Convex Network. It's also a scarce resource: the coin supply is limited by design.
6+
7+
Convex Coins can be subdivided into coppers. 1 Convex Coin = 1,000,000,000 coppers (one billion). This means that you can use small fractions of a Convex Coins: useful for precise calculations of micropayments etc.
8+
9+
10+
## Receiving Coins
11+
12+
Receiving coins is generally a good thing. You might receive Convex Coins for multiple reasons:
13+
- You purchased some from the release curve
14+
- You were awarded coins from the Convex Foundation as a contributor
15+
- Someone is making a payment to you, e.g. for goods and services that you provide
16+
- You are using an app that makes use of Convex Coins
17+
18+
So how do you actually receive them? They are a digital asset, after all, and you can't put them in your pocket.
19+
20+
To receive coins you need a Convex account. Convex accounts are recorded as part of the Convex global state, which is updated, verified and protected by peers of the decentralised network. Accounts hold a balance of Convex Coins and are designated with an address which looks like:
21+
22+
```
23+
#23798
24+
```
25+
26+
If you have an account you use already, that's great: you can just provide the address and receive coins directly. The sender can use this address to make any transfer to you as required.
27+
28+
### Getting an Account
29+
30+
If you don't have an account, then any other user of the network can create one for you. If you are new to Convex, the person or organisation sending you coins will normally do this for you.
31+
32+
However, it is very important to secure the new account so that only you can access it. Accounts and the coins they contain are protected by strong cryptography, so to do this you will need to provide an Ed25519 public key. This is usually shown as a 32-byte hex string that looks like:
33+
34+
```
35+
0xe3B4746e32f32Eb7B1c6Af045dd7238ee5eea71B33c8b5CD91a22BcDAc5b0c54
36+
```
37+
38+
Account are *psuedonymous*: The account public key or address alone doesn't identify you as an individual, but it is possible that others may discover additional information that associates you with the account.
39+
40+
### Creating an Ed255198 key pair
41+
42+
You can create an Ed25519 key pair any way you like - there are multiple tools and software solutions that can do this for you and help you to secure your private keys.
43+
44+
One easy option is to use Convex Desktop. If you choose to create a key using Convex Desktop. The key generation screen looks like this:
45+
46+
![alt text](keygen.png)
47+
48+
At the bottom you can see the key pair generated:
49+
- Private Ed25519 seed: `5b32f8ff94d1f901098fa41a4045449726849dda5e1a3de34ae123037418795c` (KEEP SECRET!!!)
50+
- Ed25519 Public key: `0xe3B4746e32f32Eb7B1c6Af045dd7238ee5eea71B33c8b5CD91a22BcDAc5b0c54` (OK to share!)
51+
52+
To minimise risk, Convex Desktop does not save keys on your computer (unless you tell it to), so make sure you have taken an offline backup of the necessary information to recreate it. Typically you will want to keep:
53+
54+
```
55+
Mnemonic: sing bomb stay manual powder hard north mixture sausage lunch retreat desert
56+
Passphrase: hello1234567890ZZ
57+
```
58+
59+
Note: The BIP39 path is always `m/44/864/0/0/0` by default. You don't need to remember this if you use the default, but if you change this then make sure you back this up too!
60+
61+
**DOUBLE CHECK**: Make sure you can independently recreate your key pair from the mnemonic and passphrase you have written down. If you can't then you have probably made a mistake and it would be safer to create a new one!
62+
63+
### Creating extra accounts
64+
65+
Once you have an account, you might want more than one. This can be useful for multiple reasons:
66+
- Security: if you lose they key to one account, the others are safe
67+
- Separating accounts for different purposes, e.g. developer work vs. savings
68+
- Having an account that is shared with others with a limited balance
69+
- Privacy: You don't want all your transactions going through a single account
70+
71+
Alternatively, you might want to create an account for someone else so that you can transfer coins to them.
72+
73+
If you are a power user or developer, you can use the Convex REPL to create a new account. Example usage as follows:
74+
75+
```clojure
76+
;; Create account with this desired public key. Make sure you use the PUBLIC key here!!
77+
(create-account 0xe3B4746e32f32Eb7B1c6Af045dd7238ee5eea71B33c8b5CD91a22BcDAc5b0c54)
78+
=> #21568
79+
80+
;; Send 100 Convex Coins to the new account
81+
;; Note: 1 Convex Coin = 1000000000 coppers, so remember to add 9 zeros!
82+
(transfer #21568 100000000000)
83+
```
84+
85+
When you create a new account, make sure you record the account number. While it is possible to go and look back at transaction history and/or search for accounts that have your public key if you forget it, it's a lot easier if you just write down the account number!
86+
87+
## Securing your Coins
88+
89+
### Basic rules
90+
91+
NEVER give your private key (or the seed phrases used to create it) to anyone else. Anyone with access to these can sign transactions for your account, and steal your coins. As a wise man once said: Not your keys, not your coins!
92+
93+
ALWAYS ensure you are signing transactions on a device that you control and trust. For small coin to medium balances, your laptop may be fine. If you are at higher risk, sign transactions only on an air-gapped laptop (i.e. not connected to the internet).
94+
95+
### Physical Backups
96+
97+
If you have a significant holding of Convex coins, you may wish to keep a secure physical backup of your mnemonic phrase. Writing it down and putting it in a safe is an option, or you might choose to use something more durable like a metal seed phrase storage device (these are available relatively cheaply online).
98+
99+
Here's an example of a backup of the example mnemonic used above:
100+
101+
![alt text](backup.jpg)
102+
103+
Don't forget to backup your passphrase as well (that can more plausibly be something that you can remember, but still, plenty of people have lost Bitcoin due to forgetting it....).
104+
105+
### Custodial Accounts
106+
107+
Some companies (e.g. exchanges) may offer custodial accounts on Convex. These accounts are similar to the self-custody account described above in that they have an address like `#82456` and can receive / send Convex coins, with two key differences:
108+
- The company providing the custody will keep the private key safe. You don't have it.
109+
- You can't execute transactions yourself: you will need to use the services of the custody provider (e.g. using their app)
110+
111+
Custodial accounts have the advantage that you don't need to manage your own key security. This can be easier for many users, and can be very secure if the custodial provider manages the keys properly on your behalf.
112+
113+
The risk is that you are dependent on the custody provider to keep the keys secure and faithfully execute transactions on your behalf. Only use custody providers that you trust!
114+
115+
### Account Controllers
116+
117+
Accounts can optionally specify a `*controller*`, which is a facility that allows other accounts to control your account.
118+
119+
Typical reasons to do this might include:
120+
- You have a secure fallback account that you can use to recover coins and other assets if you lose the private key to your regular account
121+
- You want to control your account via code (e.g. via a smart contract)
122+
- You want a trusted third party to have the ability to recover your account even if you lose your keys
123+
- An app may set itself as the controller so that it can restore / take actions in your account on your behalf
124+
125+
This is a useful and powerful feature but it should be **used with caution**. Account controllers have full control of the account: they can change the keys, move funds etc. Do not set a controller unless you trust the controller account to act in your best interests. At the very least, you should expect the controller account to be **more secure** than the account that it controls.
126+

docs/tutorial/coins/keygen.png

84.7 KB
Loading

docs/tutorial/convex-lisp/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Convex Lisp is a powerful modern Lisp for decentralised systems.
99

1010
It is designed from the ground up to support immutable lattice data structures and functional programming for robust but flexible decentralised programs.
1111

12+
You don't need to know Convex Lisp to use Convex, but it's a powerful tool for developers wishing to build dApps and digital assets. Most of the core Convex on-chain tools are written in and designed to be used from Convex Lisp.
13+
1214
## Why Lisp?
1315

1416
The CVM is designed to be able to support many different languages and paradigms. However, we wanted a powerful language that would empower developers on Convex from the beginning, and chose Lisp as the first language on the CVM for a number of reasons:

0 commit comments

Comments
 (0)