Skip to content

[DRAFT] Feature Sidebar + Section #490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,18 @@ const config = {
editUrl: "https://github.com/jup-ag/space-station/tree/main/",
}),
],
[
"content-docs",
/** @type {import('@docusaurus/plugin-content-docs').Options} */
({
id: "features",
path: "features",
routeBasePath: "features",
sidebarPath: require.resolve("./sidebars-features.js"),
sidebarCollapsed: true,
editUrl: "https://github.com/jup-ag/space-station/tree/main/",
}),
],
[
'@docusaurus/plugin-client-redirects',
{
Expand Down Expand Up @@ -162,6 +174,22 @@ const config = {
to: '/blog-redirect',
from: '/blog',
},
{
to: '/features',
from: '/guides/how-swap-works',
},
{
to: '/features',
from: '/guides/jupiter-swap/how-swap-works/metropolis',
},
{
to: '/features',
from: '/guides/jupiter-swap/how-swap-works/how-swap-works',
},
{
to: '/features',
from: '/guides/jupiter-swap/how-swap-works/metis-routing',
}
],
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
---
sidebar_label: Metis Routing
description: Learn how Jupiter Metis Routing boosts Solana swaps using a unique algorithm for quicker trades, lower slippage, and scalable upgrades.
title: Metis Routing
slug: /jupiter-swap/how-swap-works/metis-routing
sidebar_label: Metis
description: Learn how Jupiter Metis boosts Solana swaps using a unique algorithm for quicker trades, lower slippage, and scalable upgrades.
title: Metis
---

<head>
<title>Jupiter Metis Routing: Optimize Swaps on Solana</title>
<title>Jupiter Metis: The Routing Engine Behind Jupiter Swap</title>
<meta name="twitter:card" content="summary" />
</head>

### Why is Metis important? What are we solving?

### How does it work?

### Core Concepts

---

### Original Copy

Metis is a heavily modified variant of the [Bellman-Ford algorithm](https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm) catered for the key requirements of offering best price routing at scale in a very dynamic operational space.

Metis is designed to operate seamlessly on Solana’s hyper-fast blocktimes, supported by major improvements to our backend infrastructure. This ensures that trades are executed quickly and efficiently, even under high demand.
Expand All @@ -20,7 +29,7 @@ Metis enhances our industry-leading aggregator by improving route discovery for

To find the best price, Metis streams the input tokens to incrementally build a route to split and merge at any stage. By generating the routes for each split iteratively one after another, we can also use the same DEX in different splits - allowing us to find routes with better prices with more complex trades.

![Metis2](../../../img/jup-swap/Metis-2.png)
![Metis2](../features/img/Metis-2.png)

### Combine Route Generation and Quoting

Expand All @@ -32,12 +41,10 @@ v2 runs fast when the total number of DEXs used is small since Solana limits us

Metis(v3) is equipped to handle both of these trends, since the algorithm is able to scale to include more DEXs in a route when account lock limits are increased, and can support more DEXs with only a modest increase in running time.

![Metis3](../../../img/jup-swap/Metis-3.png)
![Metis3](../features/img/Metis-3.png)

### Performance Improvements

Metis is able to refresh quotes in parallel and in real time. Compared to v2, metis on average quotes prices that are 5.22% better. These imporivements increase sharply based on the trade size.

![Metis4](../../../img/jup-swap/Metis-4.jpg)

[Read about more awesome features of Jupiter Swap! ->](./2-how-swap-works.md)
![Metis4](../features/img/Metis-4.jpg)
45 changes: 45 additions & 0 deletions features/100-how-swap-works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
sidebar_label: How Swap Works [DELETE]
description: Learn how Jupiter Swap uses smart routing and safety features to innovate token trading on Solana. Discover its mechanisms in this beginners guide.
title: How the Jupiter Swap Works [DELETE]
---

<head>
<title>Understanding Jupiter Swap: Smart Routing & Features</title>
<meta name="twitter:card" content="summary" />
</head>

The Jupiter Swap is a decentralized exchange aggregator designed to provide the best rates for swapping SPL tokens on the Solana blockchain. It routes trades through multiple liquidity sources to ensure optimal prices, low slippage, and efficient transaction execution. Users benefit from its seamless interface, deep liquidity, and the ability to perform complex token swaps in a single transaction.

### **Jupiter V3 Upgrades**

Jupiter V3 introduced multiple improvements to the swap experience!

The Metropolis upgrade introduced Instant Routing, Dynamic Slippage, Smart Token Filtering, Ecosystem Token List and new Safety features.

Metis, a routing protocol, was also introduced to improve route discovery, reducing slippage and scalability in V3.

### Token Ledger For Increased Swap Success Rates

The Token Ledger is a collection of three instructions *(Set Token Ledger, Send Instruction, Swap Instruction)* that consolidate withdrawal and swap instructions into a single transaction. Integrators/partners can now effortlessly instruct a swap to be executed based on the actual sent amount, after taking into account fees and slippages.

Before the introduction of the Token Ledger, swap instructions relied on a simulation-driven approach to approximate the amount deducted from a user's wallet to facilitate the swap. This estimation approach often ended up with discrepancies between the estimated and actual amounts, especially during periods of market volatility with high slippages, leading to swap failures.

Consider this scenario where a user intends to withdraw 1,000 USDC from Meteora’s USDC vault into wBTC. Note that users hold vUSDC LP tokens in Meteora vaults.

1. In the first instruction, the Token Ledger will verify and record the user’s initial USDC balance within their wallet. For the purpose of this example, let’s assume the initial balance is 100 USDC.
2. In the second instruction, an amount equivalent to 1,000 USDC in vUSDC is withdrawn from Meteora vaults into USDC, and we examine the user’s balance. Due to factors like slippage, the USDC balance is found to be 1090 USDC.
3. For the third instruction, subtracting the initial 100 USDC from the current 1090 USDC balance, it’s evident that the user has effectively withdrawn 990 USDC, which will then be utilized to swap for wBTC as the final output token.

Without the Token Ledger, the previous swap method relied on estimated amounts, which could fluctuate due to market volatility and performance variations, frequently resulting in suboptimal user experiences.

With the Token Ledger, integrators can issue swap instructions based on actual amounts that have taken into account slippage and related fees. This eliminates the need for simulation and significantly increases the success rate of swaps, all within a single transaction.

The Token Ledger caters to a wide range of use cases, which include but are not limited to:

- Withdrawing assets from a protocol to any desired token, such as converting to USDC from a wBTC vault.
- Supporting protocols that transition positions to a different token from their original position, as seen in Perpetuals.
- Facilitating the exchange of NFTs for tokens other than SOL.

Read more about the Token Ledger:
https://station.jup.ag/docs/apis/swap-api#using-token-ledger-instruction
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
---
sidebar_label: Metropolis
description: "Explore Jupiter V3 Metropolis: better token discovery, improved slippage, and seamless trading. Enhance safety and efficiency."
description: Learn how Jupiter Metropolis powers the swap infrastructure with instant routing, market indexing and intelligent token search.
title: Metropolis
slug: /jupiter-swap/how-swap-works/metropolis
---

<head>
<title>Jupiter Metropolis Explained: Enhanced Swapping Guide | Jupiter Station</title>
<title>Jupiter Metropolis: The Markets and Tokens Infrastructure Behind Jupiter Swap</title>
<meta name="twitter:card" content="summary" />
</head>

The Jupiter swap backend systems have been completely re-engineered for the Metropolis update. This upgrade has significantly improved token discovery, slippage management, token search functionality, and safety measures.
### What is Metropolis? What are we solving?

![Metropolis-1.jpect](../../../img/jup-swap/Metropolis-1.jpeg)
### Markets Routing

### Instant Routing for New Tokens
New tokens from Raydium, Meteora, and Orca are immediately added to Jupiter Routing. This means that newly launched tokens can be utilized across the entire Jupiter suite instantly! This includes features like DCA, Limit Orders, and Value Averaging, or simply swapping at the best prices available.
### Instant Routing

<video controls style={{ maxWidth: '65%', height: 'auto' }}>
<source src={require('../../../static/media/instant-routing-video.mp4').default} type="video/mp4" />
Your browser does not support the video tag.
</video>
### Intelligent Token Search

### Master Token List Standard

---

### Original Copy

### Dynamic Slippage
Dynamic Slippage offers a seamless swapping experience. You can set a maximum slippage cap and never worry about slippage issues again. By leveraging a combination of backend liquidity computation and frontend inference, the best possible slippage rate is calculated, which is likely to pass while minimizing MEV.
The Jupiter swap backend systems have been completely re-engineered for the Metropolis update. This upgrade has significantly improved token discovery, slippage management, token search functionality, and safety measures.

![Metropolis-1.jpeg](../features/img/Metropolis-1.jpeg)

### Instant Routing for New Tokens
New tokens from Raydium, Meteora, and Orca are immediately added to Jupiter Routing. This means that newly launched tokens can be utilized across the entire Jupiter suite instantly! This includes features like DCA, Limit Orders, and Value Averaging, or simply swapping at the best prices available.

<video controls style={{ maxWidth: '65%', height: 'auto' }}>
<source src={require('../../../static/media/dynamic-slippage-video.mp4').default} type="video/mp4" />
<source src={require('../features/static/media/instant-routing-video.mp4').default} type="video/mp4" />
Your browser does not support the video tag.
</video>

Expand All @@ -36,7 +40,7 @@ Dynamic Slippage offers a seamless swapping experience. You can set a maximum sl
With the rapid growth of tokens on Solana, finding the correct token can be challenging. The token list search feature has been vastly improved, taking into account near real-time information such as liquidity, volume, community verification, and potential dubious tokens. Imposter tokens and duplicates are automatically filtered out, making the search much faster and more accurate.

<video controls style={{ maxWidth: '65%', height: 'auto' }}>
<source src={require('../../../static/media/token-search-video.mp4').default} type="video/mp4" />
<source src={require('../features/static/media/token-search-video.mp4').default} type="video/mp4" />
Your browser does not support the video tag.
</video>

Expand All @@ -45,16 +49,7 @@ With the rapid growth of tokens on Solana, finding the correct token can be chal
This upgrade enhances the token verification process. Instead of relying on a single strict list as in V2, Metropolis incorporates a range of lists across the entire ecosystem. Currently, different token lists are aggregated into an Ecosystem Master List, with new labels such as "LST," "Pump," "Clone," and a unified standard for partners to contribute.

<video controls style={{ maxWidth: '65%', height: 'auto' }}>
<source src={require('../../../static/media/master-token-list-video.mp4').default} type="video/mp4" />
Your browser does not support the video tag.
</video>


### Streamlined Warnings UX
Non-blocking labels are now more relevant and provide warnings about issues like freeze authority and strict list verification in an easily digestible format directly on the swap interface.

<video controls style={{ maxWidth: '65%', height: 'auto' }}>
<source src={require('../../../static/media/safety-warnings-video.mp4').default} type="video/mp4" />
<source src={require('../features/static/media/master-token-list-video.mp4').default} type="video/mp4" />
Your browser does not support the video tag.
</video>

Expand Down
7 changes: 7 additions & 0 deletions features/3-magic/1-slippage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_label: Slippage
description: Learn how Jupiter Magic enables the best user experience through dynamic mechanisms on slippage, gas and retreis.
title: Slippage
---

## Hello
5 changes: 5 additions & 0 deletions features/3-magic/2-transaction-landing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_label: Transaction Landing
description: Learn how Jupiter Magic enables the best user experience through dynamic mechanisms on slippage, gas and retreis.
title: Transaction Landing
---
5 changes: 5 additions & 0 deletions features/3-magic/3-retry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_label: Retry
description: Learn how Jupiter Magic enables the best user experience through dynamic mechanisms on slippage, gas and retreis.
title: Retry
---
13 changes: 13 additions & 0 deletions features/4-merlin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_label: Merlin
description: Learn how Jupiter Merlin safeguards users through detailed token information and safety notifications.
title: Merlin
---

### What is Merlin? What are we solving?

### Token Information

### Safety Notifications

### Protective Trading Settings
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
35 changes: 35 additions & 0 deletions features/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_label: Features of Jupiter Exchange
description: Learn how Jupiter Metis Routing boosts Solana swaps using a unique algorithm for quicker trades, lower slippage, and scalable upgrades.
title: Features of Jupiter Exchange
---

This section explains the various foundations that make Jupiter one of the best and most powerful places to trade tokens on Solana.

## Metis

Metis is the algorithm behind Advanced/Performant Routing in order to find the best Best Prices for your token swaps.

Learn more about **[Metis](./1-metis.md)**.

## Metropolis

Metropolis is the backend infrastructure stack that helps you:
- Discover more tokens
- Manage slippage automatically
- Search for tokens more quickly & safely
- Understand warnings and issues more easily

Learn more about **[Metropolis](./2-metropolis.md)**.

## Magic

Dynamic Slippage, Transaction Landing, Retry.

Learn more about **[Dynamic Slippage](./3-magic/1-slippage.md), [Transaction Landing](./3-magic/2-transaction-landing.md)** and **[Retry](./3-magic/3-retry.md)**.

## Merlin

MEV Protection, Token Info, Rekt Alerts

Learn more about **[Merlin](./4-merlin.md)**.
Binary file added features/static/media/lock-walkthrough.mp4
Binary file not shown.
2 changes: 1 addition & 1 deletion guides/12-general/6-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description: "Discover FAQs on Jupiter Swap, DCA, and more. Get quick answers an
- Slippage occurs because of changing market conditions between the moment the transaction is submitted and its verification.
- Your slippage rate is an important setting, it works as a protection. If the price falls below your slippage rate, then the transaction will fail in order to prevent you from getting less tokens than you want.
- You can adjust your slippage. By default, slippage is set to 0.5%, meaning if the price slips more than 0.5% of your quote, the trade will not be completed.
- Learn more about [slippage and price impact](/guides/2-jupiter-spot/2-jupiter-swap/2-how-swap-works/2-how-swap-works.md)
- Learn more about [slippage and price impact](/features/magic/slippage)

### What does it mean when I get the 'some routes failed to load...'

Expand Down
Loading