Skip to content

Commit

Permalink
Merge branch 'main' into feat/beets-reliquary
Browse files Browse the repository at this point in the history
  • Loading branch information
groninge01 committed Jan 30, 2025
2 parents c8240b6 + a308064 commit a3a6da4
Show file tree
Hide file tree
Showing 91 changed files with 3,445 additions and 540 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { PROJECT_CONFIG } from '@repo/lib/config/getProjectConfig'
export function NavBarContainer() {
const {
links: { appLinks, ecosystemLinks, socialLinks },
options: { allowCreateWallet },
} = PROJECT_CONFIG
const { defaultAppLinks } = useNav()
const allAppLinks = [...defaultAppLinks, ...appLinks]
Expand Down Expand Up @@ -51,6 +52,7 @@ export function NavBarContainer() {
transition={{ duration: 0.5, ease: 'easeInOut' }}
>
<NavBar
allowCreateWallet={allowCreateWallet}
appLinks={allAppLinks}
customLinks={
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ function Card({
export function LandingBeetsSecuritySection() {
return (
<LandingSectionContainer
button={{
text: 'View audits',
href: 'https://docs.beets.fi/ecosystem/security#audits',
isExternal: true,
}}
subtitle="Built with security at its core, beets prioritizes trust at every level. From rigorous audits to open-source transparency and continuous monitoring, our ecosystem ensures your assets remain safe, reliable, and accessible."
title="Code you can trust"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { StakedSonicComposabilitySvg } from '../components/StakedSonicComposabil
import { StakedSonicDecentralizationSvg } from '../components/StakedSonicDecentralizationSvg'
import { StakedSonicStakingRewardsSvg } from '../components/StakedSonicStakingRewardsSvg'
import { SpearbitLogo } from '@repo/lib/shared/components/imgs/SpearbitLogo'
import { TrailOfBitsLogo } from '@repo/lib/shared/components/imgs/TrailOfBitsLogo'

export function LandingBeetsStakedSonic() {
return (
Expand Down Expand Up @@ -86,15 +87,22 @@ export function LandingBeetsStakedSonic() {
Protected by audited contracts and transparent governance, stS ensures your assets
remain secure and accessible.
</Text>
<Link
href="https://github.com/spearbit/portfolio/blob/master/pdfs/Beethoven-Sonic-Staking-Spearbit-Security-Review-December-2024.pdf"
target="_blank"
>
<HStack gap="md">
<Heading fontSize="2xl">Audited by: </Heading>

<HStack gap="md">
<Link
href="https://github.com/spearbit/portfolio/blob/master/pdfs/Beethoven-Sonic-Staking-Spearbit-Security-Review-December-2024.pdf"
mr="md"
target="_blank"
>
<SpearbitLogo color="#25f2d0" height="36px" width="176px" />
</HStack>
</Link>
</Link>
<Link
href="https://github.com/trailofbits/publications/blob/master/reviews/2025-01-beethovenx-sonicstaking-securityreview.pdf"
target="_blank"
>
<TrailOfBitsLogo color="#ffffff" height="67px" width="110px" />
</Link>
</HStack>
</Box>
</Flex>
</GridItem>
Expand Down
86 changes: 74 additions & 12 deletions apps/beets-frontend-v3/lib/modules/lst/components/LstFaq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,100 @@ import {
AccordionButton,
AccordionIcon,
AccordionPanel,
Text,
Link,
} from '@chakra-ui/react'

const FAQ_ITEMS = [
{
question: 'What is stS?',
answer:
'stS is a liquid-staked token that users receive when they stake $S on the Beets platform. The value of stS naturally appreciates in relation to $S thanks to native network staking rewards from validator delegation being automatically compounded within the token.',
answer: (
<Text color="font.primary" fontSize="lg" fontWeight="thin">
stS is a liquid-staked token that users receive when they stake $S on the Beets platform.
The value of stS naturally appreciates in relation to $S thanks to native network staking
rewards from validator delegation being automatically compounded within the token.
</Text>
),
},
{
question: 'What are the stS fees?',
answer:
'Due to the management of underlying nodes, validators earn 15% of the overall stS staking rewards. Beets also takes a 10% protocol fee on the rewards after the validator fees. The APY displayed on the UI is the APY the user receives (all fees have been subtracted automatically).',
answer: (
<Text color="font.primary" fontSize="lg" fontWeight="thin">
Due to the management of underlying nodes, validators earn 15% of the overall stS staking
rewards. Beets also takes a 10% protocol fee on the rewards after the validator fees. The
APY displayed on the UI is the APY the user receives (all fees have been subtracted
automatically).
</Text>
),
},
{
question: 'How do I get stS tokens?',
answer:
'To stake, users simply need to head to the stS page and select how much $S they wish to deposit. As an alternative to staking, users can swap into stS on DEXs by swapping their $S for stS on the Swap Page.',
answer: (
<Text color="font.primary" fontSize="lg" fontWeight="thin">
To stake, users simply need to head to the stS page and select how much $S they wish to
deposit. As an alternative to staking, users can swap into stS on DEXs by swapping their $S
for stS on the Swap Page.
</Text>
),
},
{
question: 'How do I unstake stS for $S?',
answer:
'Unstaking stS involves a 14-day unbonding period aligned with staking on Sonic. After initiating the unstake, users will need to return to the UI after 14 days to claim $S. For instant liquidity, users can swap stS for $S directly on DEXs via the Swap Page. However, note that swapping may offer a less favorable exchange rate than unstaking, depending on the pool’s liquidity.',
answer: (
<Text color="font.primary" fontSize="lg" fontWeight="thin">
Unstaking stS involves a 14-day unbonding period aligned with staking on Sonic. After
initiating the unstake, users will need to return to the UI after 14 days to claim $S. For
instant liquidity, users can swap stS for $S directly on DEXs via the Swap Page. However,
note that swapping may offer a less favorable exchange rate than unstaking, depending on the
pool’s liquidity.
</Text>
),
},
{
question: 'Where can I use stS tokens?',
answer:
'stS is fully liquid, meaning you can use stS seamlessly across DeFi and access lending markets, liquidity pools, and more without pausing your rewards.',
answer: (
<Text color="font.primary" fontSize="lg" fontWeight="thin">
stS is fully liquid, meaning you can use stS seamlessly across DeFi and access lending
markets, liquidity pools, and more without pausing your rewards.
</Text>
),
},
{
question: 'What is the stS exchange rate and how does it change?',
answer:
'The stS token accrues staking rewards via delegating the underlying $S to trustworthy validators on the network. Every time staking rewards are added to the pool, the stS exchange rate to $S increases.',
answer: (
<Text color="font.primary" fontSize="lg" fontWeight="thin">
The stS token accrues staking rewards via delegating the underlying $S to trustworthy
validators on the network. Every time staking rewards are added to the pool, the stS
exchange rate to $S increases.
</Text>
),
},
{
question:
'What steps have been taken to ensure the security and reliability of the stS smart contract code?',
answer: (
<Text color="font.primary" fontSize="lg" fontWeight="thin">
To mitigate smart contract risks, the stS code has been thoroughly audited by leading
security firms, including{' '}
<Link
href="https://github.com/spearbit/portfolio/blob/master/pdfs/Beethoven-Sonic-Staking-Spearbit-Security-Review-December-2024.pdf"
target="_blank"
>
<Box as="span" fontSize="lg" fontWeight="thin">
Spearbit
</Box>
</Link>{' '}
and{' '}
<Link
href="https://github.com/trailofbits/publications/blob/master/reviews/2025-01-beethovenx-sonicstaking-securityreview.pdf"
target="_blank"
>
<Box as="span" fontSize="lg" fontWeight="thin">
Trail of Bits
</Box>
</Link>
.
</Text>
),
},
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ export function LstWithdraw() {
noItemsFoundLabel="No requests found"
paginationProps={{ ...paginationProps, mt: 'auto' }}
renderTableHeader={() => <LstWithdrawTableHeader {...rowProps} />}
renderTableRow={(withdrawal: any, index) => (
renderTableRow={({ item, index }) => (
<LstWithdrawTableRow
keyValue={index}
withdrawal={withdrawal}
withdrawal={item}
{...rowProps}
onOpen={onOpen}
token={stakedAsset}
Expand Down
2 changes: 1 addition & 1 deletion apps/beets-frontend-v3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@apollo/client": "^3.11.8",
"@balancer/sdk": "1.4.0",
"@balancer/sdk": "1.4.1",
"@chakra-ui/hooks": "2.4.2",
"@chakra-ui/react": "2.10.4",
"@chakra-ui/theme-tools": "2.2.6",
Expand Down
3 changes: 3 additions & 0 deletions apps/frontend-v3/app/(app)/lbp/create/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function LBPCreatePage() {
return <div>Create LBP</div>
}
11 changes: 11 additions & 0 deletions apps/frontend-v3/app/(app)/lbp/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { PropsWithChildren } from 'react'

import { DefaultPageContainer } from '@repo/lib/shared/components/containers/DefaultPageContainer'
import { isProd } from '@repo/lib/config/app.config'
import { redirect } from 'next/navigation'

export default function LBPCreateLayout({ children }: PropsWithChildren) {
if (isProd) redirect('/')

return <DefaultPageContainer minH="100vh">{children}</DefaultPageContainer>
}
10 changes: 10 additions & 0 deletions apps/frontend-v3/app/(app)/lbp/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Button } from '@chakra-ui/react'
import NextLink from 'next/link'

export default function LBPPage() {
return (
<Button as={NextLink} href="/lbp/create">
Create LBP
</Button>
)
}
15 changes: 11 additions & 4 deletions apps/frontend-v3/app/(app)/vebal/vote/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { Skeleton } from '@chakra-ui/react'
import { Skeleton, VStack } from '@chakra-ui/react'
import FadeInOnView from '@repo/lib/shared/components/containers/FadeInOnView'
import { Suspense } from 'react'
import { VoteList } from '@repo/lib/modules/vebal/vote/VoteList/VoteList'
import { VotesContainer } from '@repo/lib/modules/vebal/vote/Votes/VotesContainer'

export default function VotePage() {
return (
<FadeInOnView animateOnce={false}>
<Suspense fallback={<Skeleton h="500px" w="full" />}>
<VoteList />
<Suspense
fallback={
<VStack spacing="md" w="full">
<Skeleton h="500px" w="full" />
<Skeleton h="500px" w="full" />
</VStack>
}
>
<VotesContainer />
</Suspense>
</FadeInOnView>
)
Expand Down
6 changes: 6 additions & 0 deletions apps/frontend-v3/lib/components/navs/NavBarContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { isDev, isStaging } from '@repo/lib/config/app.config'
export function NavBarContainer() {
const {
links: { ecosystemLinks, socialLinks },
options: { allowCreateWallet },
} = PROJECT_CONFIG
const { defaultAppLinks } = useNav()

Expand All @@ -25,6 +26,10 @@ export function NavBarContainer() {
label: 'veBAL (wip)',
href: '/vebal',
})
appLinks.push({
label: 'LBP',
href: '/lbp',
})
}

const allAppLinks = [...defaultAppLinks, ...appLinks]
Expand All @@ -37,6 +42,7 @@ export function NavBarContainer() {
transition={{ duration: 0.5, ease: 'easeInOut' }}
>
<NavBar
allowCreateWallet={allowCreateWallet}
appLinks={allAppLinks}
customLinks={
<Box as={motion.div} variants={fadeIn}>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"sharp": "0.33.5",
"stylelint": "^16.13.2",
"stylelint-config-standard": "^36.0.1",
"stylelint-prettier": "^5.0.2",
"stylelint-prettier": "^5.0.3",
"turbo": "2.3.3",
"typescript": "5.7.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ test('Balancer: can add liquidity to random pool', async ({ page }) => {
await expect(page.getByText('Flexible')).toBeVisible()
await page.getByPlaceholder('0.00').first().click()
await page.getByPlaceholder('0.00').first().fill('1')
await page.getByRole('button', { name: 'Connect wallet' }).nth(2).click()
await page.getByRole('button', { name: 'Connect' }).nth(2).click()
})
2 changes: 2 additions & 0 deletions packages/lib/config/config.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ type OptionsConfig = {
showPoolName: boolean
showVeBal: boolean
showMaBeets: boolean
allowCreateWallet: boolean
}

type Links = {
Expand All @@ -155,4 +156,5 @@ export interface ProjectConfig {
options: OptionsConfig
links: Links
footer: { linkSections: LinkSection[] }
cowSupportedNetworks: GqlChain[]
}
8 changes: 7 additions & 1 deletion packages/lib/config/projects/balancer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const ProjectConfigBalancer: ProjectConfig = {
showPoolName: false,
showVeBal: true,
showMaBeets: false,
allowCreateWallet: true,
},
links: {
appLinks: [],
Expand Down Expand Up @@ -111,7 +112,11 @@ export const ProjectConfigBalancer: ProjectConfig = {
{ label: 'Explore pools', href: '/pools' },
{ label: 'Swap tokens', href: '/swap' },
{ label: 'View portfolio', href: '/portfolio' },
{ label: 'Get veBAL', href: 'https://app.balancer.fi/#/vebal', isExternal: true },
{
label: 'Get veBAL',
href: 'https://app.balancer.fi/#/ethereum/vebal',
isExternal: true,
},
{
label: 'Create an LBP',
href: 'https://www.fjordfoundry.com/?utm_source=balancer&utm_medium=website',
Expand Down Expand Up @@ -145,4 +150,5 @@ export const ProjectConfigBalancer: ProjectConfig = {
},
],
},
cowSupportedNetworks: [GqlChain.Mainnet, GqlChain.Arbitrum, GqlChain.Base, GqlChain.Gnosis],
}
6 changes: 4 additions & 2 deletions packages/lib/config/projects/beets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ export const ProjectConfigBeets: ProjectConfig = {
},
options: {
poolDisplayType: PoolDisplayType.Name,
hidePoolTags: ['VE8020', 'BOOSTED'],
hidePoolTags: ['VE8020'],
hidePoolTypes: [GqlPoolType.LiquidityBootstrapping, GqlPoolType.CowAmm, GqlPoolType.Fx],
hideProtocolVersion: ['cow', 'v3'],
hideProtocolVersion: ['cow'],
showPoolName: true,
showVeBal: false,
showMaBeets: true,
allowCreateWallet: false,
},
links: {
appLinks: [
Expand Down Expand Up @@ -95,4 +96,5 @@ export const ProjectConfigBeets: ProjectConfig = {
},
],
},
cowSupportedNetworks: [],
}
3 changes: 3 additions & 0 deletions packages/lib/debug-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export const sdBalAddress = '0xf24d8651578a55b0c119b9910759a351a3458895' as cons
export const auraBalAddress = '0x616e8bfa43f920657b3497dbf40d6b1a02d4608d' as const
export const bal80Weth20Address = '0x5c6ee304399dbdb9c8ef030ab642b10820db8f56' as const

export const wstEthAddress = '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0' as const
export const rstEthAddress = '0x7a4effd87c2f3c55ca251080b1343b605f327e3a' as const

export const ethAddress = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' as const
export const polAddress = '0x0000000000000000000000000000000000001010' as const

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { getPaginationProps } from '@repo/lib/shared/components/pagination/getPa
import { Box, Skeleton } from '@chakra-ui/react'
import { useIsMounted } from '@repo/lib/shared/hooks/useIsMounted'
import { usePoolActivity } from '../PoolActivity/usePoolActivity'
import { PoolActivityEl } from '../PoolActivity/poolActivity.types'
import { Pagination } from '@repo/lib/shared/components/pagination/Pagination'

export function PoolActivityTable() {
Expand Down Expand Up @@ -43,7 +42,7 @@ export function PoolActivityTable() {
paginationProps={paginationProps}
position="relative"
renderTableHeader={() => <PoolActivityTableHeader {...rowProps} />}
renderTableRow={(item: PoolActivityEl, index) => {
renderTableRow={({ item, index }) => {
return <PoolActivityTableRow event={item} keyValue={index} {...rowProps} />
}}
showPagination={false}
Expand Down
Loading

0 comments on commit a3a6da4

Please sign in to comment.