Skip to content

Commit ea4a10b

Browse files
Merge pull request #3015 from pyth-network/add-express-relay
feat(express-relay): adding introduction page for express relay
2 parents df1090d + e350c07 commit ea4a10b

File tree

3 files changed

+123
-5
lines changed

3 files changed

+123
-5
lines changed
Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,69 @@
11
---
2-
title: Overview
3-
description: A placeholder landing page
4-
icon: CardsThree
2+
title: "Express Relay: Eliminate MEV with Priority Auctions"
3+
description: >-
4+
Express Relay enables better orderflow mechanisms that eliminate MEV. Protocol developers can recapture MEV while searchers get unified access to opportunities.
5+
icon: Gavel
56
full: true
67
---
78

8-
# Take Back Control with Express Relay
9+
# Introduction
910

10-
Integrate directly with searchers to recapture MEV. Go to market faster. Accelerate your protocol's growth.
11+
Express Relay is a priority auction which enables better orderflow mechanisms that eliminate [Maximal Extractable Value](https://www.ledger.com/academy/glossary/maximal-extractable-value-mev) (MEV).
12+
13+
- **For Protocol Developers:** Express Relay allows protocols to recapture MEV and access a network of searchers for more competitive pricing than on-chain sources provide.
14+
With Express Relay, protocols get access to plug-and-play liquidity.
15+
16+
- **For Searchers:** Express Relay provides easy and unified access to a range of orderflow opportunities across integrated DeFi protocols.
17+
18+
## Integration
19+
20+
To integrate with Express Relay, you can integrate as a protocol (to power token swaps) or as a searcher.
21+
22+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mt-8">
23+
<IntegrationCard
24+
href="./integrate-as-protocol"
25+
colorScheme="blue"
26+
title="Integrate as a Protocol"
27+
description="Power token swaps and recapture MEV with Express Relay integration"
28+
icon={
29+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
30+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
31+
</svg>
32+
}
33+
/>
34+
35+
<IntegrationCard
36+
href="./integrate-as-searcher"
37+
colorScheme="green"
38+
title="Integrate as a Searcher"
39+
description="Access unified orderflow opportunities across DeFi protocols"
40+
icon={
41+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
42+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
43+
</svg>
44+
}
45+
/>
46+
</div>
47+
48+
## Learn
49+
50+
To learn more about Express Relay, refer to the following resources:
51+
52+
<div className="mt-8">
53+
<IntegrationCard
54+
href="./how-express-relay-works"
55+
colorScheme="purple"
56+
title="How Express Relay Works"
57+
description="Understand the mechanics behind Express Relay's priority auction system"
58+
icon={
59+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
60+
<path
61+
strokeLinecap="round"
62+
strokeLinejoin="round"
63+
strokeWidth={2}
64+
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
65+
/>
66+
</svg>
67+
}
68+
/>
69+
</div>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
type IntegrationCardProps = {
2+
href: string;
3+
icon: React.ReactNode;
4+
title: string;
5+
description: string;
6+
colorScheme?: "blue" | "green" | "purple";
7+
};
8+
9+
export const IntegrationCard = ({
10+
href,
11+
icon,
12+
title,
13+
description,
14+
colorScheme = "blue",
15+
}: IntegrationCardProps) => {
16+
const colorClasses = {
17+
blue: {
18+
bg: "bg-blue-100 dark:bg-blue-900",
19+
text: "text-blue-600 dark:text-blue-400",
20+
hoverText: "group-hover:text-blue-600 dark:group-hover:text-blue-400",
21+
},
22+
green: {
23+
bg: "bg-green-100 dark:bg-green-900",
24+
text: "text-green-600 dark:text-green-400",
25+
hoverText: "group-hover:text-green-600 dark:group-hover:text-green-400",
26+
},
27+
purple: {
28+
bg: "bg-purple-100 dark:bg-purple-900",
29+
text: "text-purple-600 dark:text-purple-400",
30+
hoverText: "group-hover:text-purple-600 dark:group-hover:text-purple-400",
31+
},
32+
};
33+
34+
const colors = colorClasses[colorScheme];
35+
36+
return (
37+
<a
38+
href={href}
39+
className="block group bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg p-6 hover:border-gray-300 dark:hover:border-gray-600 transition-colors"
40+
>
41+
<div className="flex items-center gap-3 mb-3">
42+
<div
43+
className={`w-8 h-8 rounded-lg ${colors.bg} flex items-center justify-center`}
44+
>
45+
<div className={`w-4 h-4 ${colors.text}`}>{icon}</div>
46+
</div>
47+
<h3
48+
className={`text-lg font-semibold text-gray-900 dark:text-white ${colors.hoverText}`}
49+
>
50+
{title}
51+
</h3>
52+
</div>
53+
<p className="text-gray-600 dark:text-gray-400">{description}</p>
54+
</a>
55+
);
56+
};

apps/developer-hub/src/mdx-components.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { Tab, Tabs } from "fumadocs-ui/components/tabs";
33
import defaultMdxComponents from "fumadocs-ui/mdx";
44
import type { MDXComponents } from "mdx/types";
55

6+
import { IntegrationCard } from "./components/IntegrationCard";
7+
68
export function getMDXComponents(components?: MDXComponents): MDXComponents {
79
return {
810
...defaultMdxComponents,
@@ -12,5 +14,6 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
1214
InfoBox: InfoBox,
1315
// Fuma has a Callout component in `defaultMdxComponents` which we still want to overwrite
1416
Callout: InfoBox,
17+
IntegrationCard,
1518
};
1619
}

0 commit comments

Comments
 (0)