Skip to content

Commit

Permalink
Merge pull request #417 from djeck1432/feat/documentation
Browse files Browse the repository at this point in the history
Added Defi_spring and Spotnet Documentation
  • Loading branch information
djeck1432 authored Dec 22, 2024
2 parents b63b08d + ef95f01 commit fc9d486
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ services:

volumes:
postgres_data:
redis_data:
redis_data:
2 changes: 1 addition & 1 deletion frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { TELEGRAM_BOT_LINK } from './utils/constants';
import { useCheckMobile } from './hooks/useCheckMobile';
import PositionHistory from './pages/position-history/PositionHistory';
import WithdrawAll from 'pages/spotnet/dashboard/withdraw-all/WithdrawAll';

import SpringDefiPage from 'pages/spotnet/defi-spring/Defi-spring';
function App() {
const { setWalletId, removeWalletId } = useWalletStore();
const [showModal, setShowModal] = useState(false);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/layout/footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Footer() {
Overview
</NavLink>
<Link to="/terms">Terms & Conditions</Link>
<Link to="/defi">Defi Spring Rewards</Link>
<Link to="/springdefi">Defi Spring Rewards</Link>
</nav>
<div className="footer-social">
{socialLinks.map(({ name, href, icon: Icon }) => (
Expand Down
107 changes: 97 additions & 10 deletions frontend/src/pages/documentation/Documentation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ const Documentation = () => {
{ title: 'Cosmos Overview', link: '#cosmos-4' }
]
},
{ name: 'Getting Started', link: '#getting-started' },
{ name: 'Features Overview', link: '#features' },
{ name: 'The Hub And Zones', link: '#hub-1' },
{ name: 'The Hub And Zones', link: '#hub-2' },
{ name: 'The Hub And Zones', link: '#hub-3' },
{ name: 'The Hub And Zones', link: '#hub-4' },
{ name: 'The Hub And Zones', link: '#hub-5' }
{ title: 'How it performs', link: '#how-it-performs' },
{ title: 'Getting Started', link: '#getting-started' },
{ title: 'ZkLend', link: '#zk-lend' },
{ title: 'The Hub And Zones', link: '#powered-by-starknet' },
{ title: 'The Hub And Zones', link: '#hub-3' },
{ title: 'The Hub And Zones', link: '#hub-4' },
{ title: 'The Hub And Zones', link: '#hub-5' }
];

const sectionsData = [
Expand All @@ -41,7 +41,7 @@ const Documentation = () => {
{
type: 'text',
value:
'Welcome to [Product Name] Documentation\n[Product Name] is a decentralized platform designed to [describe purpose, e.g., "empower users to securely manage digital assets and access DeFi tools effortlessly"]. This documentation provides a comprehensive guide on using [Product Name] and making the most of its features.',
'Welcome to spotnet Documentation\nspotnet is a decentralized platform designed to [describe purpose, e.g., "empower users to securely manage digital assets and access DeFi tools effortlessly"]. This documentation provides a comprehensive guide on using SpotNet and making the most of its features.',
},
],
},
Expand All @@ -68,6 +68,93 @@ const Documentation = () => {
},
],
},
{
id: 'how-it-performs',
title: 'How it performs',
content: [
{
type: 'text',
value: 'Spot Leverage Strategy with ZkLend',
},
{
type: 'list',
items: [
'You put some ETH collateral into deposit as ZkLend.',
'Then, we swap your ETH into USDC and use it as collateral for a loan in the ZkLend position.',
'This process can be repeated 2 to 5 times, depending on the leverage multiplier you choose, to increase your collateral and borrowing capacity.',
],
},
{
type: 'text',
value: 'Once your position is opened, you can view it on the Dashboard page. There, you’ll see:',
},
{
type: 'list',
items: [
'Health Factor: A measure of how safe your position is (the higher, the better).',
'Collateral: The value of your assets in the position.',
'Borrowed Amount: The total amount you have borrowed.'
],
},
{
type: 'text',
value: 'About position',
},
{
type: 'list',
items:
[
'If you wish to close your position, simply click on `Reedem` in the Dashboard page. This will allow you to withdraw your collateral and repay the loan.',
'Currently, Spotnet only allows you to open a single position.',
'If your health ratio level will be zero, you will be liquidated by ZkLend.',
'You also have the option to enable notifications on Telegram, so you will be alerted if your health ratio reaches a dangerous level.'
],
},

],
},
{
id: 'zk-lend',
title: 'Zklend Overview - Powering Your DeFi Journey with Security and Simplicity',
content: [
{
type: 'text',
value: 'Introducing zkLend',
},
{
type: 'text',
value: "Money markets have been a crucial component of financial systems since the Middle Ages, providing short-term funding and liquidity to banks, governments, and corporations. Today, money markets facilitate an estimated $3.2 trillion in daily transactions in the global financial system, making them critical for short-term funding needs. In the context of DeFi, money markets play an essential role in activities such as lending, borrowing, and liquidity provision. At zkLend, our goal is to create a simple, secure, and efficient platform for your liquidity needs. We've built a permissionless lending market where anyone can deposit and borrow digital assets directly from their wallets, at any time. When you deposit assets, you earn interest from borrowers using your funds. You can also use your deposited assets as collateral to borrow other digital assets.",
},

{
type: 'text',
value: "Our Alpha version is now available on the mainnet. Rest assured, we've fully audited the platform with reputable firms like ABDK and Nethermind, and the contracts have been formally specified since April 2023."
},

{
type: 'text',
value: "With a focus on safety, ease of use, and cutting-edge blockchain technology, we’re confident that zkLend is on its way to becoming a leading platform in the DeFi space. Join us and experience the future of decentralized finance!"
},


],
},

{
id: 'powered-by-starknet',
title: 'Powered by Starknet',
content: [
{
type: 'text',
value: "At zkLend, we believe zk-rollups are the key to unlocking Ethereum's full potential. By using Starknet's Layer 2 (L2) solution, we’re able to bring the speed and efficiency of zk-rollups together with the security and decentralization that Ethereum is known for. Starknet is one of the first zk-rollup platforms designed for general use. It offers fast transactions, low fees, and cutting-edge blockchain features that far exceed the capabilities of traditional networks. Key innovations like account abstraction, trustless bridging, parallel processing, and advanced proof techniques make Starknet stand out.",
},

{
type: 'text',
value: "With the strong track record of StarkWare and the team behind successful projects like ZCash and StarkEx, Starknet is the perfect platform to power zkLend and ensure we stay ahead of the curve. We're excited to be part of this groundbreaking technology!.",
},
],
},
{
id: 'getting-started',
title: 'Getting Started',
Expand All @@ -93,8 +180,8 @@ const Documentation = () => {
<Sidebar title={'Table of Contents'} items={tableOfContents} className='sidebar-docs-sticky' />

<div className="main-content">
<h1 className="main-title">zkLend Documentation</h1>
<Sections sections={sectionsData} />
<h1 className="main-title">Spotnet Documentation</h1>
<Sections sections={sectionsData} />
</div>

<ScrollButton />
Expand Down
118 changes: 118 additions & 0 deletions frontend/src/pages/spotnet/defi-spring/Defi-spring.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import React, { useEffect } from 'react';
import './defi-spring.css';
import TableOfContents from '../../../components/TableOfContent/TableOfContents';
import ScrollButton from '../../../components/scrollButton/ScrollButton';
import Sections from 'components/Sections';

const Documentation = () => {

useEffect(() => {
window.scrollTo(0, 0);
}, []);


const tableOfContents = [
{ title: 'Introduction', link: '#introduction' },
{
title: 'Program overview',
link: '#overview',
},
{ title: 'Claiming rewards', link: '#claiming-rewards' },
{ title: 'Important notes', link: '#important-notes' },
{ title: 'Maximize your profit', link: '#maximize-your-profit' },
{ title: 'The Hub And Zones', link: '#hub-2' },
{ title: 'The Hub And Zones', link: '#hub-3' },
{ title: 'The Hub And Zones', link: '#hub-4' },
{ title: 'The Hub And Zones', link: '#hub-5' }
];

const sectionsData = [
{
id: 'Introduction',
title: 'introduction',
content: [
{
type: 'text',
value:
'Welcome to the DeFi Spring Program!\nwhere you can earn rewards through the zkLend protocol. As part of this initiative, participants will have the opportunity to receive STRK token rewards for engaging with the platform. Here’s everything you need to know to get started and make the most of your participation.',
},
],
},
{
id: 'overview',
title: 'Program Overview',
content: [
{
type: 'list',
items: [
'Start Date: March 14, 2024, at 00:00 UTC.',
'Duration: 6-8 months.',
'Eligibility: Open to everyone!.',
'Reward APR: The approximate $STRK rewards APR will be displayed next to eligible supply and borrow pools, in addition to the base interest rate.',
]
},
],
},
{
id: 'claiming-rewards',
title: 'Claiming rewards',
content: [
{
type: 'list',
items: [
'Reward Phases: Rewards are earned in phases, each lasting from Thursday to Wednesday. After each phase ends, it will take about 1 day for the rewards to be claimable.',
'Reward Claims: Rewards can be claimed via zkLend Rewards.',
'Accrued Rewards: The total rewards earned will be visible at the end of the program. You can claim your rewards all at once at that time.',
'Final Claim Deadline: Be sure to claim your rewards before the DeFi Spring program ends. Any unclaimed rewards will be returned to the Starknet Foundation.'
],
},
],
},

{
id: 'important-notes',
title: 'Important notes',
content: [
{
type: 'list',
items: [
'Dynamic APRs: The APRs (Annual Percentage Rates) are updated daily based on market conditions, pool sizes, and allocations from the Starknet Foundation. These rates may change throughout the program.',
'Incentive Strategy: Different actions, such as depositing or borrowing, may receive varying rewards depending on market dynamics',
'Recursive Borrow Adjustment: Rewards are based on your net deposit after accounting for borrowed funds. For example, if you deposit 100 ETH and borrow 50 ETH, your net deposit is considered 50 ETH. Recursive borrowers will see a higher APR than what they ultimately claim.',
'Stablecoin Considerations: From Phase 3 onward, stablecoins (USDC, USDT, DAI) will be treated as the same asset for reward calculations. Your eligible net deposit for these will be calculated as the value of stablecoins deposited minus the value of stablecoins borrowed.'
],
},

],
},

{
id: 'maximize-your-profit',
title: 'Maximize your profit',
content: [
{
type: 'text',
value: 'By participating in the DeFi Spring program, you can leverage your assets and earn additional rewards, contributing to a more liquid and dynamic DeFi ecosystem. Keep an eye on your rewards as you participate, and make the most out of the program!'
},

],
},

];

return (
<div className="documentation-page">
<TableOfContents tabelTitle={"Table Of Content"} defaultActiveId={"introduction"} headerHeight={80} items={tableOfContents} />

<div className="main-content">
<h1 className="main-title">Defi Spring Documentation</h1>
<Sections sections={sectionsData} />
</div>

<ScrollButton />
</div>

);
};

export default Documentation;
70 changes: 70 additions & 0 deletions frontend/src/pages/spotnet/defi-spring/defi-spring.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.documentation-container {
display: flex;
min-height: 100vh;
color: var(--primary);
position: relative;
padding-top: 70px;
}

.documentation-container::before {
content: '';
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
background-image: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
radial-gradient(circle at 15% 85%, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
background-size: 100px 100px;
pointer-events: none;
z-index: 0;
}

.main-content {
margin-left: 370px;
flex: 1;
background: url('../../../../public/background.png') no-repeat;
background-size: cover;
background-position: center 39%;
position: relative;
min-height: 100vh;
}

.sections-container {
margin-left: 20px;
}

.main-title {
font-size: 2.5rem;
font-weight: 700;
margin-top: 94px;
margin-bottom: 3rem;
margin-left: 40px;
color: white !important;
background: white;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

html {
scroll-behavior: smooth;
scroll-padding-top: 80px;
}

@media (max-width: 1440px) {
.main-content {
margin-left: 280px;
}
}

@media (max-width: 768px) {
.main-content {
margin-left: 0;
padding: 1rem;
}

.main-title {
font-size: 2rem;
}
}

0 comments on commit fc9d486

Please sign in to comment.