Skip to content

Commit

Permalink
Merge pull request #207 from osmosis-labs/stage
Browse files Browse the repository at this point in the history
Stage release
  • Loading branch information
daniel-farina authored Jul 18, 2023
2 parents c28ad07 + 2c6c03d commit 7a007a3
Show file tree
Hide file tree
Showing 93 changed files with 49,363 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/networks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ These following API's are recommended for development purposes. For maximun cont
| Utilities | ... | [https://explorer.osmotest5.osmosis.zone/](https://osmotest5.osmosis.zone/) | ... |
| API Reference | [RPC API Reference](/api)<br/> [LCD API Reference](/api/?v=LCD) | [RPC API Reference](/api)<br/> [LCD API Reference](/api/?v=LCD) | [RPC API Reference](/api)<br/> [LCD API Reference](/api/?v=LCD) |
| Swagger | [LCD Swagger](https://lcd.osmosis.zone/swagger/)<br/> [RPC Swagger](https://rpc-docs.osmosis.zone/) | [LCD Swagger](https://lcd.osmotest5.osmosis.zone/swagger/)<br/> [RPC Swagger](https://rpc-docs.osmosis.zone/) | [LCD Swagger](https://lcd-test.osmosis.zone/swagger/)<br/> [RPC Swagger](https://rpc-docs.osmosis.zone/) |
| Faucet | Not Available | [faucet.osmotest5.osmosis.zone/](https://faucet.osmotest5.osmosis.zone/) | [faucet.osmosis.zone](https://faucet.osmosis.zone/) |
| Faucet | Not Available | [faucet.osmosis.zone](https://faucet.osmosis.zone/) | Discontinued |

## Networks
Osmosis now offers several testnets and devnets, to learn more go to the https://github.com/osmosis-labs/testnets repo.
Expand Down
41 changes: 41 additions & 0 deletions docs/osmosis-outpost/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
sidebar_position: 1
sidebar_label: What is an Osmosis outpost
---
# What is an Osmosis Outpost

An Osmosis outpost is a platform that makes it *much simpler* to perform swaps
on different *Cosmos chains*, without having to manually send the tokens to
Osmosis to trade them, or worse, to build their own DEx.

The outpost performs the swaps through the **Osmosis DEX** and can send the
swapped token to the outpost chain. Such a platform uses **IBC protocol** and
**smart contracts** to allow users on the outpost chain to *perform the swaps*.

It is important for the UI of such a platform to be *simple, intuitive, and*
*highly customizable* for each outpost chain and, for this reason, **nabla**
provides a set of **components** and **templates** to allow any enabled chain
to realize its own *frontend outpost*.

If you want to create your own outpost platform, please follow the instruction
available at the [Introduction page](./user-interface-setup/introduction).

### 📡 Stay tuned

If you have integrated the platform, please let us know so we can share the news
with our community! Moreover, to stay updated with any changes or new features,
please follow us. You can find how to reach us [here](../../contact).

### 📖 User guide
We realized a set of **tutorial** to follow your users step by step on *how to*
*perform a swap* and *how to troubleshoot some common issues*. You can find it
[here](../user-guide/how-to-do-a-swap).

### 📞 Support
Once you have integrated the widget, or created your new platform application,
we recommend you create a support channel in your own community for users to
troubleshoot issues that users may encounter while using the widget or the app.

If you, our your users, discover any **issues or errors** while using the
platform, please *reach us* through the channels available
[here](../../contact).
25 changes: 25 additions & 0 deletions docs/osmosis-outpost/contact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
sidebar_position: 5
sidebar_label: Contact
description: Contact nabla and Osmosis teams.
---

# Contact

You can reach the nabla and Osmosis teams out both on Discord or Twitter.

### nabla

Discord: https://discord.com/invite/DfPJ6Sq6F7

Twitter: ​​https://twitter.com/nabla_hq

Website: https://nabla.studio

### Osmosis

Discord: ​https://discord.com/invite/osmosis

Twitter: https://twitter.com/osmosiszone

Website: https://osmosis.zone
58 changes: 58 additions & 0 deletions docs/osmosis-outpost/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
sidebar_position: 4
sidebar_label: FAQ
description: How to recover funds if the swap fails.
---

# Frequently Asked Questions

### What is a swap?
A swap involves **trading one token for a different one**. To perform such
an operation you need an exchange. There exists both *Centralized Exchanges*
(like Binance) or *Decentralized Exchanges* (like Osmosis).

### What exchange do I use to perform the swaps?
The Osmosis outposts use the **Osmosis decentralized exchange** to perform the
swaps. In fact, instead to build their own DEx, the outpost chains can use
*this structure provided by Osmosis* and the *IBC technology* to increase the
*user experience* and *on-boarding process* of their platforms.

### What about the fees?
You will pay for the **IBC transaction costs** on the outpost chain and the
**swap costs** on the Osmosis pools. The *costs for the transaction are shown*
*on the wallet you are using*, while the *costs for the swap are shown on the*
*interface*.

### No route for this trade
If you want to perform a swap but the swap button is disabled and says
"No route for this trade", there is no route available on the contract to
perform this swap directly. You can try to break the operation in two
sub-operations, or sub-swaps, maybe passing through the OSMO token.

### Not allowed
If you want to perform a swap but the swap button is disabled and says
"Not allowd", this means that you denied the connection of the dApp to one of
the chains involved in the swap operations. You can allow/deny such permissions
directly through your wallet (e.g., keplr).

### How can I add assets to the platform?
Assuming you have already performed all the necessary configuration on the
**Osmosis smart contracts**, you can list new assets on the platforms by adding
them to the
[Osmosis Outposts Assetlists](https://github.com/nabla-studio/osmosis-outposts-assetlists)
repository.

#### ‼️ Important consideration about adding assets to the platform

The data provided through the assetlist are realized to be consumed by an
`outpost`.

For this reason, according to how an outpost is designed, you need to ensure
that all the tokens you are listing, are able to be swapped on Osmosis and
recevied from and sent to the `outpost chain`.
To do this, you need to list only the tokens who can reach your blockchain.

> E.g., if you are constructing the `Juno outpost` and `Stride blockchain` does
> not have configured the Packet Forward Middleware (PFM), you cannot list stride
> on your outpost, since you cannot receive your stride tokens back to the `Juno`
> `blockchain` automatically.
8 changes: 8 additions & 0 deletions docs/osmosis-outpost/user-guide/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "User Guide",
"position": 3,
"link": {
"type": "generated-index",
"description": "How to use the frontend user interface of an Osmosis outpost."
}
}
58 changes: 58 additions & 0 deletions docs/osmosis-outpost/user-guide/how-to-do-a-swap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
sidebar_position: 1
sidebar_label: How to perform a swap
description: How to perform a swap.
---

# How to perform a swap

### 1. Connect a wallet

To **swap tokens**, the fist step is to connect the wallet containing such
tokens to the dApp. To do this, you can *click* on one of the two "connect
wallet" buttons available on the page (one on the bottom right, the other on
the bottom center). Once the wallet is connected to the dApp, you can see the
corresponding address to the top right part of the page.

![Connect the wallet image](/img/user-guide/how-to-do-a-swap/connect-wallet.jpg "connect the wallet")

### 2. Select the "from" tokens

You need to choose **which** tokens you would like to swap. You can perform
such selection via the first *dropdown* list in the top section of the form.

![Select the from token image](/img/user-guide/how-to-do-a-swap/from-token.jpg "select the from token")

### 3. Select the "to" tokens

Then you need to select **to which** tokens you would like to swap. Such a
selection can be done via the *dropdown* list in the bottom section of the
form.

![Select the to token image](/img/user-guide/how-to-do-a-swap/to-token.jpg "select the to token")

### 4. Enter the amount of tokens

You must set the **amount** of tokens you want to swap. You can input
this value in the *numeric input* in the top section of the form, next to the
*from token dropdown*. The counter value in dollars is shown (as per
Coingecko’s prices) exactly below the value in crypto. Once you edit such a
value, the corresponding value for the other token is automatically evaluated,
and it appears in the bottom section of the form, next to the *to token*
*dropdown*.

<!-- If you prefer to set the number of tokens to be received through the swap
rather than the number of tokens to be swapped, you can set the amount in the
bottom section of the form, next to the *to token dropdown*. This will
automatically evaluate the corresponding value for the swapping "from" tokens. -->

![Enter the token amount image](/img/user-guide/how-to-do-a-swap/token-amount.jpg "enter the token amount")

### 5. Swap the tokens

Press the **swap** button and confirm the transaction through your wallet. Now
you need to wait for the whole process to be completed (*transactions*
*broadcasted* to the networks and *smart contract executed*) and... then you're
done!

![Swap the tokens image](/img/user-guide/how-to-do-a-swap/swap-tokens.jpg "swap the tokens")
35 changes: 35 additions & 0 deletions docs/osmosis-outpost/user-guide/recover-funds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_position: 2
sidebar_label: Recover funds
description: How to recover funds if the swap fails.
---

# How to recover funds

Even if the user interface allow to swap tokens with a very low effort, the
swap process involves *several steps and actors*, like **IBC transactions**,
**smart contract executions**. In such a context, it is reasonable that some
steps could fail. Obviously, even if any of the steps fail, the funds are not
lost. More specifically, *until the tokens are not swapped*, if any step fails,
the **tokens remains on your original wallet**; *once they are swapped*, if any
step fails, the **tokens are guarded by the smart contract**. In this case, you
can recover them in your recovery address *also through the user interface*.

### 1. Access the recovery screen

Assuming you have token to recover associated to the wallet you are currently
using, to **recover** such tokens guarded by the smart contract, the fist step
is to *click on the "Recover Funds" button* available on the page (on the top
left).

![Recover funds image](/img/user-guide/recover-funds/recover-funds.jpg "recover the funds")

### 2. Proceed with recover

At this point, you can see a list with the funds which needs to be recovered.
From this page, you can complete the recovery request by clicking on the
"Recover Funds" button and confirm the transaction through your wallet. Now you
need to wait for the whole process to be completed (*transactions broadcasted*
to the networks and *smart contract executed*) and... then you're done!

![Recover the tokens image](/img/user-guide/recover-funds/recover.jpg "recover the funds")
46 changes: 46 additions & 0 deletions docs/osmosis-outpost/user-guide/recovery-address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
sidebar_position: 3
sidebar_label: Set recovery address
description: How to set a custom recovery address.
---

# How to set a custom recovery address

Since some steps could fail during the swap process and, *once they are
swapped* but not received, the *tokens which are guarded by the smart contract*
can be recovered by a recovery address, you can set it *through the user*
*interface*.

> **_IMPORTANT:_** The recovery address can be set for the next swap. It
cannot be modified once the swap started.

By default, it is set to the **osmosis address** associated to the
**connected wallet**.

> **_IMPORTANT:_** If the recovery address is associated to a wallet you do
not own, you will not be able to recover funds if the swap process fails.

### 1. Access the settings

To set a custom recovery address you need to access the **settings** of the
dApp. To do this, you must click on the *settings icon* in the top right corner
of the interface.

![Access the settings image](/img/user-guide/settings/settings.jpg "access the settings")

### 2. Enter the custom recovery address

At this point, you can set any valid osmosis address as the recovery address.
Despite this, however, it is **important** that you remember the fact that
*if you do not own the wallet associated with the address you are setting up*,
**you will not be able to access the funds** if an error occur in the swap
process.

![Enter recovery address image](/img/user-guide/settings/enter-address.jpg "enter the recovery address")

### 3. Save the modification

Now you have to save the edits you performed, close the settings and... then
you're done!

![Save and Close image](/img/user-guide/settings/save-and-close.jpg "save and close the settings")
36 changes: 36 additions & 0 deletions docs/osmosis-outpost/user-guide/set-slippage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
sidebar_position: 4
sidebar_label: Set slippage tolerance
description: How to set the slippage tolerance.
---

# How to set the slippage tolerance

When you make a trade and the price changes during the processing period,
slippage refers to the amount of price difference you are okay with accepting.
It is important to consider this factor when placing a trade. **By default,**
**the slippage tolerance is set to the 3%**.

### 1. Access the settings

To set a custom value for the slippage tolerance you need to access the
**settings** of the dApp. To do this, you must click on the *settings icon* in
the top right corner of the interface.

![Access the settings image](/img/user-guide/settings/settings.jpg "access the settings")

### 2. Set the slippage tolerance value

At this point, you can *select the slippage tolerance* from one of the
available values *by clicking on the corresponding button*.
Otherwise, you can insert a custom value by filling the last input box with any
**valid numeric value**.

![Enter slippage tolerance value image](/img/user-guide/settings/set-slippage-tolerance.jpg "enter the slippage tolerance value")

### 3. Save the modification

Now you have to save the edits you performed, close the settings and... then
you're done!

![Save and Close image](/img/user-guide/settings/save-and-close.jpg "save and close the settings")
8 changes: 8 additions & 0 deletions docs/osmosis-outpost/user-interface-setup/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "User Interface",
"position": 2,
"link": {
"type": "generated-index",
"description": "How to build the frontend user interface for an Osmosis outpost."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Frontend Platform Interface",
"position": 2,
"link": {
"type": "generated-index",
"description": "How to customize the frontend platform interface for an Osmosis outpost."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sidebar_position: 4
sidebar_label: Build for Production
description: How to build for a production environment.
---

# Build for Production

Assuming you have completely followed the whole guide up to this point, you
have your working and fully customized version of the platform. In such a
scenario, to build the dApp for a production environment, you need to prepare
the libraries builds and then build the web application.

### 1. Build prod for stencil library of web components:

```bash
nx run outpost-web-ui:build:production
```

### 2. Build prod for react library of UI components:

```bash
nx run outpost-web-ui-react:build:production
```

### 3. You can now proceed building your dApp for a production stage:

```bash
nx build web --configuration=production
```

And... you are ready to [deploy](https://nextjs.org/docs/deployment) your
brand-new, fully customized platform, allowing your users to exchange their
tokens with low effort and with a user experience all to envy!
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Customization Guide",
"position": 3,
"link": {
"type": "generated-index",
"description": "How to customize the frontend platform interface for an Osmosis outpost."
}
}
Loading

1 comment on commit 7a007a3

@vercel
Copy link

@vercel vercel bot commented on 7a007a3 Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.