Skip to content

Commit 9d79393

Browse files
corwintinesjncrabb
andcommitted
setup translations, and grammar/structure pass
Co-authored-by: jncrabb <[email protected]>
1 parent c15b8e6 commit 9d79393

File tree

4 files changed

+73
-39
lines changed

4 files changed

+73
-39
lines changed

public/content/developers/docs/design-and-ux/dex-design-best-practice/index.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
---
2-
title: Decentralised Exchange (DEX) Design Best Practice
2+
title: Decentralized exchange (DEX) design best practices
33
description: A guide explaining UX/UI decisions for swapping tokens.
44
lang: en
55
---
6-
# Introduction to Decentralised Exchanges
76

8-
Since the launch of Uniswap in 2018, there have been hundreds of Decentralised Exchanges launched across dozens of different chains.
7+
# Introduction to decentralized exchanges {#introduction-to-decentralized-exchanges}
8+
9+
Since the launch of Uniswap in 2018, there have been hundreds of decentralized exchanges launched across dozens of different chains.
910
Many of these have introduced new elements or added their own twist, but the interface has remained generally the same.
1011

1112
One reason for this is [Jakob’s Law](https://lawsofux.com/jakobs-law/):
1213

1314
> Users spend most of their time on other sites. This means that users prefer your site to work the same way as all the other sites they already know.
1415
1516
Thanks to early innovators like Uniswap, Pancakeswap, and Sushiswap, DeFi users have a collective idea of what a DEX looks like.
16-
For this reason, something like “best practice” is now emerging. We see more and more design decisions being standardised across sites. You can see the evolution of DEXes as a giant example of testing it live. Things that worked stayed, things that didn’t, got tossed out. There’s still room for personality, but there are certain standards a DEX should conform to.
17+
For this reason, something like “best practice” is now emerging. We see more and more design decisions being standardized across sites. You can see the evolution of DEXes as a giant example of testing it live. Things that worked stayed, things that didn’t, got tossed out. There’s still room for personality, but there are certain standards a DEX should conform to.
1718

1819
This article is a summary of:
1920
- what to include
@@ -24,7 +25,7 @@ All of the example wireframes were made specifically for this article, although
2425

2526
The Figma kit is also included at the bottom - feel free to use it and speed up your own wireframes!
2627

27-
## Basic Anatomy of a DEX
28+
## Basic anatomy of a DEX {#basic-anatomy-of-a-dex}
2829

2930
The UI generally contains three elements:
3031
1. Main form
@@ -34,25 +35,25 @@ The UI generally contains three elements:
3435
![Generic DEX UI, showing the three main elements](./1.png)
3536

3637

37-
## Variations
38+
## Variations {#variations}
3839

39-
This will be a common theme in this article, but there are various different ways these elements can be organised. The “details panel” can be:
40+
This will be a common theme in this article, but there are various different ways these elements can be organized. The “details panel” can be:
4041
- Above the button
4142
- Below the button
4243
- Hidden in an accordion panel
4344
- And/or on a “preview” modal
4445

4546
N.B. A “preview” modal is optional, but if you are showing very few details on the main UI, it becomes essential.
4647

47-
## Structure of the Main Form
48+
## Structure of the main form {#structure-of-the-main-form}
4849

4950
This is the box where you actually choose which token you want to swap. The component consists of an input field and a small button in a row.
5051

5152
DEXes typically display additional details in one row above and one row below, although this can be configured differently.
5253

5354
![Input row, with a details row above and below](./2.png)
5455

55-
## Variations
56+
## Variations {#variations2}
5657

5758
Two UI variations are shown here; one without any borders, creating a very open design, and one where the input row has a border, creating a focus on that element.
5859

@@ -62,7 +63,7 @@ This basic structure allows **four key pieces of info** to be shown in the desig
6263

6364
During the evolution of DeFi, lots of different things have been included here.
6465

65-
## Key Info to Include
66+
## Key info to include {#key-info-to-include}
6667

6768
- Balance in wallet
6869
- Max button
@@ -81,7 +82,7 @@ Extra details can be shown below the main form. As this type of info is mostly f
8182

8283
![Details shown in the corners of that main form](./4.png)
8384

84-
## Extra Info to Include
85+
## Extra info to include {#extra-info-to-include}
8586

8687
- Token price
8788
- Slippage
@@ -117,7 +118,8 @@ Entering numbers in Main Form → Scanning Details → Clicking to Preview Scree
117118
Should the details panel be visible at all times, or does the user need to click it to expand?
118119
Should you create friction by adding a preview screen? This forces the user to slow down and consider their trade, which can be useful. But do they want to see all the same info again? What is most useful to them at this point?
119120

120-
## Design Options
121+
## Design options {#design-options}
122+
121123
As mentioned, a lot of this comes down to your personal style
122124
Who is your user?
123125
What is your brand?
@@ -126,13 +128,15 @@ Even if you’re aiming for the pro users who want all info possible, you should
126128

127129
> No matter how beautiful, no matter how cool your interface, it would be better if there were less of it.
128130
129-
### Structure
131+
### Structure {#structure}
132+
130133
- tokens on the left, or tokens on the right
131134
- 2 rows or 3
132135
- details above or below the button
133136
- details expanded, minimized, or not shown
134137

135-
### Component Style
138+
### Component style {#component-style}
139+
136140
- empty
137141
- outlined
138142
- filled
@@ -157,7 +161,7 @@ Take a look at the below examples to see different ways you can put it all toget
157161

158162
![2 rows in a filled style](./12.png)
159163

160-
## But which side should the token go on?
164+
## But which side should the token go on? {#but-which-side-should-the-token-go-on}
161165

162166
The bottom line is that it probably doesn’t make a huge difference to usability. There are a few things to bear in mind, however, which might sway you one way or the other.
163167

@@ -175,15 +179,15 @@ The law of proximity states that items that are close together are perceived as
175179

176180
Ultimately, there are pluses and minuses for both options, but it is interesting how the trend appears to be towards token on the right.
177181

178-
# Button Behaviour
182+
# Button behavior {#button-behavior}
179183

180184
Don’t have a separate button for Approve. Also don’t have a separate click for Approve. The user wants to Swap, so just say “swap” on the button and initiate the approval as the first step. A modal can show progress with a stepper, or a simple “tx 1 of 2 - approving” notification.
181185

182186
![A UI with separate buttons for approve and swap](./14.png)
183187

184188
![A UI with one button that says approve](./15.png)
185189

186-
## Button as contextual help
190+
## Button as contextual help {#button-as-contextual-help}
187191

188192
The button can do double duty as an alert!
189193

@@ -197,11 +201,11 @@ If the main action - SWAP - is unavailable due to an error, the reason why can b
197201

198202
The button can also be **mapped to the action** that needs to be performed. For example, if the user cannot swap because they are on the wrong network, the button should say “switch to Ethereum”, and when the user clicks on the button, it should switch the network to Ethereum. This speeds up the user flow significantly.
199203

200-
![Key ctions being initated from the main CTA](./16.png)
204+
![Key actions being initiated from the main CTA](./16.png)
201205

202206
![Error message shown within the main CTA](./17.png)
203207

204-
## Build Your Own with this Figma File
208+
## Build your own with this figma file {#build-your-own-with-this-figma-file}
205209

206210
Thanks to the hard work of multiple protocols, DEX design has improved a lot. We know what info the user needs, how we should show it, and how to make the flow as smooth as possible.
207211
Hopefully this article provides a solid overview of the UX principles.

public/content/developers/docs/design-and-ux/heuristics-for-web3/index.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ description: Principles to improve the usability of Web3
44
lang: en
55
---
66

7-
# Heuristics for Web3
7+
# Heuristics for Web3 {#heuristics-for-web3}
88

99
Usability heuristics are broad “rules of thumb” that you can use to measure the usability of your site.
1010
These heuristics are specifically tailored for Web3 and should be used alongside Jakob Nielsen's [10 general principles for interaction design](https://www.nngroup.com/articles/ten-usability-heuristics/).
1111

12-
## Seven Usability Heuristics for Web3
12+
## Seven usability heuristics for web3 {#seven-usability-heuristics-for-web3}
1313

1414
1. Feedback follows action
1515
2. Security and trust
@@ -20,9 +20,9 @@ These heuristics are specifically tailored for Web3 and should be used alongside
2020
7. Control from the app, not the wallet
2121

2222

23-
## Definitions and Examples
23+
## Definitions and examples {#definitions-and-examples}
2424

25-
### 1. Feedback Follows Action
25+
### 1. Feedback follows action {#feedback-follows-action}
2626

2727
**It should be obvious when something has happened, or is happening.**
2828

@@ -39,10 +39,10 @@ Showing each step involved in a transaction helps users know where they are in t
3939

4040
![Informing the user about each step when swapping tokens](./Image1.png)
4141

42-
### 2. Security and Trust are Baked in
42+
### 2. Security and trust are baked in {#security-and-trust-are-backed-in}
4343

44-
Security should be prioritised, and this should be emphasised for the user.
45-
People care deeply about their data. Safety is often a primary concern for users, so it should be considered at all levels of the design. You should always be seeking to earn the trust of your users, but the way you do this can mean different things on different apps. It should not be an afterthought, but should be designed consciously throughout. Build trust throughout the user experience, including social channels and documentation, as well as the final UI. Things like the level of decentralisation, the treasury multi-sig status, and whether the team is doxxed, all affect users' trust
44+
Security should be prioritized, and this should be emphasized for the user.
45+
People care deeply about their data. Safety is often a primary concern for users, so it should be considered at all levels of the design. You should always be seeking to earn the trust of your users, but the way you do this can mean different things on different apps. It should not be an afterthought, but should be designed consciously throughout. Build trust throughout the user experience, including social channels and documentation, as well as the final UI. Things like the level of decentralization, the treasury multi-sig status, and whether the team is doxxed, all affect users' trust
4646

4747
**Tips:**
4848
- List your audits proudly
@@ -57,24 +57,24 @@ Include your audits in the footer, at a prominent size.
5757

5858
![Audits refernced in the website footer](./Image2.png)
5959

60-
### 3. The Most Important Info is Obvious
60+
### 3. The most important info is obvious {#the-most-important-info-is-obvious}
6161

62-
For complex systems, show only the most relevant data. Determine what is most important, and prioritise its display.
62+
For complex systems, show only the most relevant data. Determine what is most important, and prioritize its display.
6363
Too much information is overwhelming and users typically anchor on one piece of information when making decisions. In DeFi, this will probably be APR on yield apps and LTV on lending apps.
6464

6565
**Tips:**
6666
- User research will uncover the most important metric
6767
- Make the key info big, and the other details small and unobtrusive
6868
- People don’t read, they scan; ensure your design is scannable
6969

70-
**Example:** Large tokens in full colour are easy to find when scanning. The APR is big and highlighted in an accent colour.
70+
**Example:** Large tokens in full color are easy to find when scanning. The APR is big and highlighted in an accent color.
7171

7272
![The token and APR are easy to find](./Image3.png)
7373

74-
### 4. Clear Terminology
74+
### 4. Clear terminology {#clear-terminology}
7575

7676
Terminology should be understandable and appropriate.
77-
Technical jargon can be a huge blocker, because it requires the construction of a completely new mental model. Users are unable to relate the design to words, phrases and concepts they already know. Everything seems confusing and unfamiliar, and there is a steep learning curve before they can even attempt to use it. A users might approach DeFi wanting to save some money, and what they find is: Mining, farming, staking, emissions, bribes, vaults, lockers, veTokens, vesting, epochs, decentralised algorithms, protocol-owned liquidity…
77+
Technical jargon can be a huge blocker, because it requires the construction of a completely new mental model. Users are unable to relate the design to words, phrases and concepts they already know. Everything seems confusing and unfamiliar, and there is a steep learning curve before they can even attempt to use it. A users might approach DeFi wanting to save some money, and what they find is: Mining, farming, staking, emissions, bribes, vaults, lockers, veTokens, vesting, epochs, decentralized algorithms, protocol-owned liquidity…
7878
Try to use simple terms that will be understood by the broadest group of people. Do not invent brand new terms just for your project.
7979

8080
**Tips:**
@@ -89,22 +89,20 @@ Try to use simple terms that will be understood by the broadest group of people.
8989

9090
![Token rewards, displayed in U.S. dollars](./Image4.png)
9191

92-
### 5. Actions are as Short as Possible
92+
### 5. Actions are as short as possible {#actions-are-as-short-as-possible}
9393

9494
Speed up the user’s interactions by grouping sub actions.
9595
This may be done on the smart contract level, as well as the UI. The user should not have to move from one part of the system to another – or leave the system entirely – to complete a common action.
9696

9797
**Tips:**
98-
- Incorporate zappers for adding liquidity
99-
- Combine “Approve” with the “Deposit” action
100-
- Combine “Deposit” and “Stake” actions
101-
- Allow the user to close a loan position and withdraw collateral entirely
98+
- Combine "Approve" with other actions where possible
99+
- Bundle signing steps as close together as possible
102100

103101
**Example:** Combining “add liquidity” and “stake” is a simple example of an accelerator that saves a user both time and gas.
104102

105103
![Modal showing a switch to combine the deposit and stake actions](./Image5.png)
106104

107-
### 6. Network Connections are Visible and Flexible
105+
### 6. Network connections are visible and flexible {#network-connections-are-visible-and-flexible}
108106

109107
Inform the user about what network they are connected to, and provide clear shortcuts to change network.
110108
This is especially important on multichain apps. The main functions of the app should still be visible while disconnected or connected to a non-supported network.
@@ -120,7 +118,7 @@ This is especially important on multichain apps. The main functions of the app s
120118

121119
![Dropdown button showing the connected network](./Image6.png)
122120

123-
### 7. Control from the App, not the Wallet
121+
### 7. Control from the app, not the wallet {#control-from-the-app-not-the-wallet}
124122

125123
The UI should tell the user everything they need to know and give them control over everything they need to do.
126124
In Web3, there are actions you take in the UI, and actions you take in the wallet. Generally, you initiate an action in the UI, and then confirm it in the wallet. Users can feel uncomfortable if these two strands are not integrated carefully.
@@ -133,4 +131,4 @@ In Web3, there are actions you take in the UI, and actions you take in the walle
133131

134132
**Example:** A subtle container shows the user what relevant tokens they have in their wallet, and the main CTA provides a shortcut to change the network.
135133

136-
![Main CTA is promptinng the user to switch network](./Image7.png)
134+
![Main CTA is prompting the user to switch network](./Image7.png)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"/content/developers/docs/design-and-ux/heuristics-for-web3/Image1.png": {
3+
"hash": "55375e45",
4+
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAyklEQVR4nK1SsQ2DQAx8iQ3ov0bQJPlUKdiCARiAAWgpfgEWYAEWQBRJKiZgAga56Kw8IpFDEyydbNnvO+ttkyQJ/oE5nMBau4tdgqIoUNe1wHuPtm3FEyHPNyqBtRZd14E2TZPEoZlE8zxLrWmaj0mMRjAMA/I8R1mWqKpKlJmj8c0uQd/3osiGrTJtfIy43K7I0kwn8O+RqRqUl2VZCe7PB07ujCxN9U+M4xhRFMEYI2DMXECo/dwCp9g2aPhepXpIzrnVazj0El+ZhVZirq6olgAAAABJRU5ErkJggg=="
5+
},
6+
"/content/developers/docs/design-and-ux/heuristics-for-web3/Image2.png": {
7+
"hash": "01ef6abc",
8+
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAfElEQVR4nO3QMQpDIQwG4IAXcHLwCOLk5CBOIt7/GiKCmwj+xQwPSmkpvK10+Ej4EzKE5py4g/4H8As/WGvhW3vvl4xaa+i9s9N/UmvlOsa4Mso5I6XESilvWWvhnOPee3/t0xkopdhZiDEihPDkZFJKEBG01lyFEDDG4AEPnqP0wGBwIQAAAABJRU5ErkJggg=="
9+
},
10+
"/content/developers/docs/design-and-ux/heuristics-for-web3/Image3.png": {
11+
"hash": "d138e577",
12+
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAABBUlEQVR4nLWSMUvDQBSAb/Mf+Gv8A+7uUh0c1CFDoEGaQt0C2iVDxoCdAqWT4BAkQkUpbZcribSXJlmyZNT9k14pUqwKVYePe+/u+Hjv3YkkSfgN4k8FUk40WwvyfE6eZyilPl2cvkyZp6lmo0CpGd3eHd3eLYPBM1JKzfJMMRwNue8/0H961LI1gZQT3l4rxM4eQuzSbJh6r6oqsjwjnSmsqyb7pwccWidrVYiPChRn5wZ164LxeITneRiGQRiGBEFA7fiIm06HKIqI43jzDNrta2y7geu6WmCaJo7j4Ps+tm1z2Wrp+MshlmWpKYpCr4sWVvkqXrT0zTMuB/cT//eRthG8AwK9igcsxSbkAAAAAElFTkSuQmCC"
13+
},
14+
"/content/developers/docs/design-and-ux/heuristics-for-web3/Image4.png": {
15+
"hash": "a31435f1",
16+
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAk0lEQVR4nGM4d+7cf0owA1UNOHr0KGUG3Ll75//9+/f/X7l6hTQDrly98n/dqjX/y4vK/udkZP0/d/r0/+vXrxNnwOnTp/8/e/Lsv2uw538GBob/rBLc//UdzP6DxIk24OWzF/+tfRzBBjBIsv2X1JYnOjwYYIy9u/b8nz119v+VS1aAvUNyIF65egUFD0w6GBADAFHYe2AWjEaDAAAAAElFTkSuQmCC"
17+
},
18+
"/content/developers/docs/design-and-ux/heuristics-for-web3/Image5.png": {
19+
"hash": "7319d43a",
20+
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAABIUlEQVR4nK2SUUrDQBRF59cV6FJcQwXrCkTwV7CtLsYFCKLVuop++anVSTKNheQ5SZoO00hTsKS3zNQWg6k/duAyzH3vHt7AY67r4j9iWwVwzivlug6E8MC58/3eAAiCAEmS/FJIEUR/AKIQRLQZIKWE1hqrUxRzez+/Jbh97CKSBKW0nagSEMeRheR5jtnsywqYI8vGSNMhKNYgOYTwvGqAUgpjrTFKU3zICCOlUBTFepKnFwl/EMPvizKg98ox0YSDRgeMnYDtnIHtXSy121rexmPHqDU6ttdk1gDOHUT0jqubLvZPr1E7v0P98gFHrXscNtuoN9vWMzXTY3pNpvQFY1DgY5oRJjrEpwpKMp6pmZ5VuGIPHDvaX/oZ3somLgAMnZccaZ58ywAAAABJRU5ErkJggg=="
21+
},
22+
"/content/developers/docs/design-and-ux/heuristics-for-web3/Image6.png": {
23+
"hash": "d858f18e",
24+
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAcUlEQVR4nGP4TwAwMDCAsbau7v+pU6eC2QEBAf8tLCz+b9q06T9Dc3Pzf3xYXkjkv6629n8HB4f/mZmZ/w0MDMAGeHh4/C8qKvrPEBER8R8fLiwp+Z9fkA/WDOKDaBhOSEj4zwAiKMEMowb8Hw2DhP8AmHCj3m1Q35sAAAAASUVORK5CYII="
25+
},
26+
"/content/developers/docs/design-and-ux/heuristics-for-web3/Image7.png": {
27+
"hash": "c87680a1",
28+
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAABzUlEQVR4nH2RzW/TQBDF94TEAQnxx6HeuJWPf4BrlCtXLiiHKqK0UqhLQXVyaCQqNwYFS5bjJk4aI6XaRm6Ds3WdGNfFCQ/NhJSKr5GetOPV/t68sWi321jK87xrjUYjxHGMJEn+qSAIIN7vH2B9fQOGYcA0TWiaBsdxUK/XUSgUUCwWMRwOQfUdv+pYSgwGxxDmgYlqtcqulmVB13U0m01EUcQOpCzLMJ/PWTcrDEMIY+8dqrsaOl6XnQlAIIpAPbkTYJbnuMwyuH0JKSVHYMCzF2U8L63h0G3B87qo1Wo8gVKKIxEkjifsmH2bofzWwK6uQ8ohTs/OIDYr29h6rfESe70e74IAywXmec6jR9EF0vQSSTLleJPkagHodDw4Tuv6L5Cj67o8HsVI0/Rn3jEDb5ZSYwjf78P3fXYnLc8EsG2b4XReRLiCbpkwGg0GkoFYPvxdRHccG5/9Ix6bKp/N8KHf4u8ncvAfQLeLsYoQqinOoxQq+orgS4yRmmA6yXAep3wXBKd/Ag7bHi5CiftPdyDECsTdxxC3ViHuPYG4/RDizqNFLx6gVPn09wl8/wj7poPSpoGNnY8obzXw6o2Jl9sLUb9WMWHZLn4ALXmazS7QbyEAAAAASUVORK5CYII="
29+
}
30+
}

src/intl/en/page-developers-docs.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"docs-nav-development-frameworks-description": "Tools that make developing with Ethereum easier",
3131
"docs-nav-development-networks": "Development networks",
3232
"docs-nav-development-networks-description": "Local blockchain environments used to test dapps before deployment",
33+
"docs-nav-dex-design-best-practice": "Decentralized Exchange (DEX) design best practices",
3334
"docs-nav-dot-net": ".NET",
3435
"docs-nav-erc-20": "ERC-20: Fungible Tokens",
3536
"docs-nav-erc-721": "ERC-721: NFTs",
@@ -45,6 +46,7 @@
4546
"docs-nav-gas": "Gas",
4647
"docs-nav-gas-description": "Computational power required to process transactions, paid for in ETH by transaction senders",
4748
"docs-nav-golang": "Golang",
49+
"docs-nav-heuristics-for-web3": "Heuristics for Web3",
4850
"docs-nav-integrated-development-environments-ides": "Integrated Development Environments (IDEs)",
4951
"docs-nav-integrated-development-environments-ides-description": "The best environments to write dapp code",
5052
"docs-nav-intro-to-dapps": "Intro to dapps",

0 commit comments

Comments
 (0)