aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/why.tsx
blob: cdf7960c2aab6983c8caea43d54f27d65099cbc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
import * as _ from 'lodash';
import * as React from 'react';
import DocumentTitle from 'react-document-title';
import ScrollableAnchor, { configureAnchors } from 'react-scrollable-anchor';
import styled from 'styled-components';

import { Banner } from 'ts/@next/components/banner';
import { Button } from 'ts/@next/components/button';
import { Definition } from 'ts/@next/components/definition';
import { Hero } from 'ts/@next/components/hero';
import { Column, Section, WrapSticky } from 'ts/@next/components/newLayout';
import { SiteWrap } from 'ts/@next/components/siteWrap';
import { Slide, Slider } from 'ts/@next/components/slider/slider';
import { Heading } from 'ts/@next/components/text';

import { ModalContact } from '../components/modals/modal_contact';

const offersData = [
    {
        icon: 'robustSmartContracts',
        title: 'Robust Smart Contracts',
        description: `0x Protocol's smart contracts have been put through two rounds of rigorous security audits.`,
    },
    {
        icon: 'extensibleArchitecture',
        title: 'Extensible Architecture',
        description: `0x's modular pipeline enables you to plug in your own smart contracts through an extensible API.`,
    },
    {
        icon: 'eficientDesign',
        title: 'Efficient Design',
        description: `0x’s off-chain order relay with on-chain settlement is a gas efficient approach to p2p exchange, reducing blockchain bloat.`,
    },
];

const functionalityData = [
    {
        icon: 'secureTrading',
        title: 'Secure Non-custodial Trading',
        description: 'Enable tokens to be traded wallet-to-wallet with no deposits or withdrawals.',
    },
    {
        icon: 'flexibleOrders',
        title: 'Flexible Order Types',
        description: 'Choose to sell assets at a specific “buy it now” price or allow potential buyers to submit bids.',
    },
    {
        icon: 'buildBusiness',
        title: 'Build a Business',
        description:
            'Monetize your product by taking fees on each transaction and join a growing number of relayers in the 0x ecosystem.',
    },
];

const useCaseSlides = [
    {
        icon: 'gamingAndCollectibles',
        title: 'Games & Collectibles',
        description:
            'Artists and game makers are tokenizing digital art and in-game items known as non-fungible tokens (NFTs). 0x enables these creators to add exchange functionality by providing the ability to build marketplaces for NFT trading.',
    },
    {
        icon: 'predictionMarkets',
        title: 'Prediction Markets',
        description:
            'Decentralized prediction markets and cryptodervivative platforms generate sets of tokens that represent a financial stake in the outcomes of events. 0x allows these tokens to be instantly tradable in liquid markets.',
    },
    {
        icon: 'orderBooks',
        title: 'Order Books',
        description:
            'There are thousands of decentralized apps and protocols that have native utility tokens. 0x provides professional exchanges with the ability to host order books and facilitates the exchange of these assets.',
    },
    {
        icon: 'decentralisedLoans',
        title: 'Decentralized Loans',
        description:
            'Efficient lending requires liquid markets where investors can buy and re-sell loans. 0x enables an ecosystem of lenders to self-organize and efficiently determine market prices for all outstanding loans.',
    },
    {
        icon: 'stableTokens',
        title: 'Stable Tokens',
        description:
            'Novel economic constructs such as stable coins require efficient, liquid markets to succeed. 0x will facilitate the underlying economic mechanisms that allow these tokens to remain stable.',
    },
];

configureAnchors({ offset: -60 });

export class NextWhy extends React.Component {
    public state = {
        isContactModalOpen: false,
    };
    public render(): React.ReactNode {
        const buildAction = (
            <Button href="/docs" isWithArrow={true} isAccentColor={true}>
                Build on 0x
            </Button>
        );
        return (
            <SiteWrap theme="dark">
                <DocumentTitle title="Features & Benefits - 0x" />
                <Hero
                    title="The exchange layer for the crypto economy"
                    description="The world's assets are becoming tokenized on public blockchains. 0x Protocol is free, open-source infrastracture that developers and businesses utilize to build products that enable the purchasing and trading of crypto tokens."
                    actions={buildAction}
                />

                <Section bgColor="dark" isFlex={true} maxWidth="1170px">
                    <Definition
                        title="Support for all Ethereum Standards"
                        titleSize="small"
                        description="0x Protocol facitilites the decentralized exchange of a growing number of Ethereum-based tokens, including all ERC-20 and ERC-721 assets."
                        icon="supportForAllEthereumStandards"
                        iconSize="large"
                        isInline={true}
                    />

                    <Definition
                        title="Networked Liquidity"
                        titleSize="small"
                        description="0x is lowering the barrier to entry by building a layer of networked liquidity that allows businesses to tap into a shared pool of digital assets."
                        icon="networkedLiquidity"
                        iconSize="large"
                        isInline={true}
                    />

                    <Definition
                        title="Flexible Integration"
                        titleSize="small"
                        description="0x is a modular system that enables businesses and projects, known as relayers, to easily add exchange functionality to any product experience."
                        icon="flexibleIntegration"
                        iconSize="large"
                        isInline={true}
                    />
                </Section>

                <Section maxWidth="1170px" isFlex={true} isFullWidth={true}>
                    <Column>
                        <NavStickyWrap offsetTop="130px">
                            <ChapterLink href="#benefits">Benefits</ChapterLink>
                            <ChapterLink href="#cases">Use Cases</ChapterLink>
                            <ChapterLink href="#functionality">Features</ChapterLink>
                        </NavStickyWrap>
                    </Column>

                    <Column width="55%" maxWidth="826px">
                        <Column width="100%" maxWidth="560px" padding="0 30px 0 0">
                            <ScrollableAnchor id="benefits">
                                <SectionWrap>
                                    <SectionTitle size="medium" marginBottom="60px" isNoBorder={true}>
                                        What 0x offers
                                    </SectionTitle>

                                    {_.map(offersData, (item, index) => (
                                        <Definition
                                            key={`offers-${index}`}
                                            icon={item.icon}
                                            title={item.title}
                                            titleSize="small"
                                            description={item.description}
                                            isWithMargin={true}
                                        />
                                    ))}
                                </SectionWrap>
                            </ScrollableAnchor>

                            <ScrollableAnchor id="cases">
                                <SectionWrap isNotRelative={true}>
                                    <SectionTitle size="medium" marginBottom="60px">
                                        Use Cases
                                    </SectionTitle>
                                    <Slider>
                                        {_.map(useCaseSlides, (item, index) => (
                                            <Slide
                                                key={`useCaseSlide-${index}`}
                                                heading={item.title}
                                                text={item.description}
                                                icon={item.icon}
                                            />
                                        ))}
                                    </Slider>
                                </SectionWrap>
                            </ScrollableAnchor>

                            <ScrollableAnchor id="functionality">
                                <SectionWrap>
                                    <SectionTitle size="medium" marginBottom="60px">
                                        Exchange Functionality
                                    </SectionTitle>

                                    {_.map(functionalityData, (item, index) => (
                                        <Definition
                                            key={`functionality-${index}`}
                                            icon={item.icon}
                                            title={item.title}
                                            titleSize="small"
                                            description={item.description}
                                            isWithMargin={true}
                                        />
                                    ))}
                                </SectionWrap>
                            </ScrollableAnchor>
                        </Column>
                    </Column>
                </Section>

                <Banner
                    heading="Ready to get started?"
                    subline="Dive into our docs, or contact us if needed"
                    mainCta={{ text: 'Get Started', href: '/docs' }}
                    secondaryCta={{ text: 'Get in Touch', onClick: this._onOpenContactModal.bind(this) }}
                />
                <ModalContact isOpen={this.state.isContactModalOpen} onDismiss={this._onDismissContactModal} />
            </SiteWrap>
        );
    }

    public _onOpenContactModal = (): void => {
        this.setState({ isContactModalOpen: true });
    };

    public _onDismissContactModal = (): void => {
        this.setState({ isContactModalOpen: false });
    };
}

interface SectionProps {
    isNotRelative?: boolean;
}

const SectionWrap =
    styled.div <
    SectionProps >
    `
    position: ${props => !props.isNotRelative && 'relative'};

    & + & {
        padding-top: 60px;
        margin-top: 60px;
    }

    @media (min-width: 768px) {
        & + &:before {
            width: 100vw;
        }
    }

    @media (max-width: 768px) {
        text-align: left;

        & + &:before {
            width: 100%;
        }
    }
`;

interface SectionTitleProps {
    isNoBorder?: boolean;
}
const SectionTitle =
    styled(Heading) <
    SectionTitleProps >
    `
    position: relative;

    ${props =>
        !props.isNoBorder &&
        `
        &:before {
            content: '';
            width: 100vw;
            position: absolute;
            top: -53px;
            left: 0;
            height: 1px;
            background-color: #3d3d3d;
        }
    `}


    @media (max-width: 768px) {
        &:before {
            width: calc(100vw - 60px);
        }
    }
`;

const NavStickyWrap = styled(WrapSticky)`
    padding-left: 60px;
    z-index: 15;

    @media (max-width: 768px) {
        display: none;
    }
`;

const ChapterLink = styled.a`
    color: ${props => props.theme.textColor};
    font-size: 22px;
    margin-bottom: 25px;
    display: block;
    opacity: 0.8;

    &:hover,
    &:active {
        opacity: 1;
    }
`;