add CUDOS calculations (#40)

* add CUDOS calculations

* content updates

* token order switch

* uniswap quote fix

* list & link community proposals

* migration tool scenario simplification

* rename Uniswap label

* ratio harmonization

* buy ratio fix

* copy updates

* copy updates

* default to 1000 CUDOS
This commit is contained in:
Matthias Kretschmann 2024-09-19 21:01:39 +01:00 committed by GitHub
parent 3b6274d9af
commit 436babf4ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 460 additions and 42 deletions

View File

@ -31,3 +31,15 @@
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
padding-left: 0.25rem; padding-left: 0.25rem;
} }
.content table {
width: 100%;
margin-bottom: 1.5rem;
}
.content th,
.content td {
border-bottom: 1px solid rgba(var(--foreground-rgb), 0.2);
padding: .5rem;
text-align: left;
}

View File

@ -1,7 +1,12 @@
import content from '@/content.md' import content from '@/content.md'
import Markdown from 'react-markdown' import Markdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import styles from './Content.module.css' import styles from './Content.module.css'
export function Content() { export function Content() {
return <Markdown className={styles.content}>{content}</Markdown> return (
<Markdown className={styles.content} remarkPlugins={[remarkGfm]}>
{content}
</Markdown>
)
} }

View File

@ -1,5 +1,6 @@
import agixImage from '@/images/agix.png' import agixImage from '@/images/agix.png'
import asiImage from '@/images/asi.png' import asiImage from '@/images/asi.png'
import cudosImage from '@/images/cudos.png'
import fetImage from '@/images/fet.png' import fetImage from '@/images/fet.png'
import oceanImage from '@/images/ocean.png' import oceanImage from '@/images/ocean.png'
import type { Token } from '@/types' import type { Token } from '@/types'
@ -19,6 +20,8 @@ export function TokenLogo({
? agixImage ? agixImage
: token?.symbol === 'ASI' : token?.symbol === 'ASI'
? asiImage ? asiImage
: token?.symbol === 'CUDOS'
? cudosImage
: fetImage : fetImage
return token ? ( return token ? (

View File

@ -3,18 +3,20 @@ import { Hanken_Grotesk } from 'next/font/google'
export const title = 'ASI Calculator' export const title = 'ASI Calculator'
export const description = export const description =
'See how much ASI you get for your OCEAN, AGIX, or FET.' 'See how much ASI you get for your OCEAN, AGIX, CUDOS, or FET.'
export const liveUrl = 'https://asi.kremalicious.com' export const liveUrl = 'https://asi.kremalicious.com'
export const repoUrl = 'https://github.com/kremalicious/asi-calculator' export const repoUrl = 'https://github.com/kremalicious/asi-calculator'
export const ratioOceanToAsi = 0.43322638231018 export const ratioOceanToAsi = 0.43322638231018
export const ratioAgixToAsi = 0.43335018345744 export const ratioAgixToAsi = 0.43335018345744
export const ratioCudosToAsi = 1 / 118.344 // 112.427 + 5% fee
export const ratioFetToAsi = 1 export const ratioFetToAsi = 1
export const tokens: Token[] = [ export const tokens: Token[] = [
{ symbol: 'OCEAN', address: '0x967da4048cd07ab37855c090aaf366e4ce1b9f48' }, { symbol: 'OCEAN', address: '0x967da4048cd07ab37855c090aaf366e4ce1b9f48' },
{ symbol: 'FET', address: '0xaea46a60368a7bd060eec7df8cba43b7ef41ad85' }, { symbol: 'FET', address: '0xaea46a60368a7bd060eec7df8cba43b7ef41ad85' },
{ symbol: 'AGIX', address: '0x5b7533812759b45c2b44c19e320ba2cd2681b542' } { symbol: 'AGIX', address: '0x5b7533812759b45c2b44c19e320ba2cd2681b542' },
{ symbol: 'CUDOS', address: '0x817bbdbc3e8a1204f3691d14bb44992841e3db35' }
] ]
export const font = Hanken_Grotesk({ export const font = Hanken_Grotesk({

View File

@ -1,14 +1,12 @@
## The Calculator ## The Calculator
The **ASI rows** show what you would get with the given token amount at the moment of the ASI swap, along with the converted USD value based on the current price of FET. The **ASI values** show what you would get with the given token amount and using the official [migration tool](https://singularitydao.ai/migrate-asi) with its fixed ratios, along with the converted USD value based on the current price of FET.
The _All Markets_ scenario uses current spot prices fetched from [Coingecko](https://coingecko.com), ignoring the actual liquidity situation but these values should be pretty close to what you would get on big centralized exchanges like Coinbase or Kraken, who continue to trade OCEAN/AGIX/FET. The **All Markets scenario** uses current spot prices fetched from [Coingecko](https://coingecko.com), ignoring the actual liquidity situation but these values should be pretty close to what you would get on big centralized exchanges like Coinbase or Kraken, who continue to trade OCEAN/AGIX/CUDOS/FET.
Since July 1st, the official migration tool can be used to guarantee fixed ratios independent of any market forces. The _Migration Tool_ scenario uses these ratios for showing the FET amount: The **Migration Tool scenario** shows the selected tokens in isolation for more clarity.
- [singularitydao.ai/migrate-asi](https://singularitydao.ai/migrate-asi) The swap estimations for **Uniswap scenario** are fetched directly from [Uniswap](https://uniswap.org) routes onchain, reflecting the actual liquidity situation for direct swaps between shown tokens.
The swap estimations for _Uniswap_ scenario are fetched directly from [Uniswap](https://uniswap.org) v3 routes onchain, reflecting the actual liquidity situation for direct swaps between shown tokens.
All displayed values should be seen as estimates. Except for the fixed ASI exchange rate, all other values are constantly changing based on market conditions. There is no guarantee the displayed values reflect the value of your investment once the actual ASI swap mechanism is released. Use at your own risk. All displayed values should be seen as estimates. Except for the fixed ASI exchange rate, all other values are constantly changing based on market conditions. There is no guarantee the displayed values reflect the value of your investment once the actual ASI swap mechanism is released. Use at your own risk.
@ -18,12 +16,27 @@ The ASI website and docs provide insights into most key points:
- [superintelligence.io](https://www.superintelligence.io) - [superintelligence.io](https://www.superintelligence.io)
- [ASI Vision Paper](https://docs.superintelligence.io/artificial-superintelligence-alliance/artificial-superintelligence-asi-alliance-vision-paper) - [ASI Vision Paper](https://docs.superintelligence.io/artificial-superintelligence-alliance/artificial-superintelligence-asi-alliance-vision-paper)
- [Official Migration Tool](https://singularitydao.ai/migrate-asi)
### Team Announcements
You can find more reasoning about the token merge in every team's announcement post: You can find more reasoning about the token merge in every team's announcement post:
- [Ocean Protocol: Ocean Protocol is joining the Superintelligence Alliance](https://blog.oceanprotocol.com/ocean-protocol-is-joining-the-superintelligence-alliance-767c82693f24) - [Ocean Protocol: Ocean Protocol is joining the Superintelligence Alliance](https://blog.oceanprotocol.com/ocean-protocol-is-joining-the-superintelligence-alliance-767c82693f24)
- [Fetch.ai: Superintelligence Alliance Token Merge $ASI](https://fetch.ai/blog/superintelligence-alliance-token-merge-asi) - [Fetch.ai: Superintelligence Alliance Token Merge $ASI](https://fetch.ai/blog/superintelligence-alliance-token-merge-asi)
- [SingularityNET: Introducing the Artificial Superintelligence Alliance](https://blog.singularitynet.io/introducing-the-artificial-superintelligence-alliance-40a4dea01e62) - [SingularityNET: Introducing the Artificial Superintelligence Alliance](https://blog.singularitynet.io/introducing-the-artificial-superintelligence-alliance-40a4dea01e62)
- [CUDOS: Artificial Superintelligence Alliance Proposes Addition of Cloud Compute Infrastructure Provider CUDOS](https://www.cudos.org/blog/artificial-superintelligence-alliance-proposes-addition-of-cloud-compute)
### Community Proposals
| Proposal | Status |
|----------|----------|
| [ASI-01: FET to ASI Migration](https://www.mintscan.io/fetchai/proposals/26) | ✅ Passed |
| [ASI-02: AGIX merge into ASI](https://www.mintscan.io/fetchai/proposals/27) | ✅ Passed |
| [ASI-03: OCEAN merge into ASI](https://www.mintscan.io/fetchai/proposals/28) | ✅ Passed |
| [Approve allASI as Migration Mechanic](https://www.mintscan.io/osmosis/proposals/810) | ✅ Passed |
| [Integration of CUDOS into the Artificial Superintelligence Alliance](https://www.mintscan.io/cudos/proposals/21) | 🕕 Voting... |
## Found an Issue? ## Found an Issue?

View File

@ -1,7 +1,12 @@
'use client' 'use client'
import { Badge } from '@/components' import { Badge } from '@/components'
import { ratioAgixToAsi, ratioFetToAsi, ratioOceanToAsi } from '@/constants' import {
ratioAgixToAsi,
ratioCudosToAsi,
ratioFetToAsi,
ratioOceanToAsi
} from '@/constants'
import { Price, usePrices } from '@/features/prices' import { Price, usePrices } from '@/features/prices'
import styles from './MarketData.module.css' import styles from './MarketData.module.css'
@ -10,13 +15,9 @@ export function MarketData() {
return ( return (
<ul className={styles.marketData}> <ul className={styles.marketData}>
<li>
<p>1 ASI</p>
<Price price={prices.asi} />
</li>
<li> <li>
<p> <p>
1 Fet = {ratioFetToAsi} ASI 1 FET = {ratioFetToAsi} ASI
<Badge>fixed</Badge> <Badge>fixed</Badge>
</p> </p>
<Price price={prices.fet} /> <Price price={prices.fet} />
@ -39,6 +40,15 @@ export function MarketData() {
</p> </p>
<Price price={prices.agix} /> <Price price={prices.agix} />
</li> </li>
<li>
<p>
1 CUDOS ={' '}
<span title={`${ratioCudosToAsi}`}>{ratioCudosToAsi.toFixed(5)}</span>{' '}
ASI
<Badge>fixed</Badge>
</p>
<Price price={prices.cudos} />
</li>
</ul> </ul>
) )
} }

View File

@ -15,6 +15,7 @@ export type Prices = {
ocean: PriceCoingecko ocean: PriceCoingecko
fet: PriceCoingecko fet: PriceCoingecko
agix: PriceCoingecko agix: PriceCoingecko
cudos: PriceCoingecko
asi: PriceCoingecko asi: PriceCoingecko
} }
@ -31,13 +32,15 @@ export function usePrices(): {
const oceanAddress = getTokenAddressBySymbol('OCEAN') const oceanAddress = getTokenAddressBySymbol('OCEAN')
const fetAddress = getTokenAddressBySymbol('FET') const fetAddress = getTokenAddressBySymbol('FET')
const agixAddress = getTokenAddressBySymbol('AGIX') const agixAddress = getTokenAddressBySymbol('AGIX')
const cudosAddress = getTokenAddressBySymbol('CUDOS')
if (!data || !oceanAddress || !fetAddress || !agixAddress) if (!data || !oceanAddress || !fetAddress || !agixAddress || !cudosAddress)
return { return {
prices: { prices: {
ocean: { usd: 0, usd_24h_change: 0 }, ocean: { usd: 0, usd_24h_change: 0 },
fet: { usd: 0, usd_24h_change: 0 }, fet: { usd: 0, usd_24h_change: 0 },
agix: { usd: 0, usd_24h_change: 0 }, agix: { usd: 0, usd_24h_change: 0 },
cudos: { usd: 0, usd_24h_change: 0 },
asi: { usd: 0, usd_24h_change: 0 } asi: { usd: 0, usd_24h_change: 0 }
}, },
isValidating, isValidating,
@ -47,7 +50,8 @@ export function usePrices(): {
const ocean = data[oceanAddress] const ocean = data[oceanAddress]
const fet = data[fetAddress] const fet = data[fetAddress]
const agix = data[agixAddress] const agix = data[agixAddress]
const cudos = data[cudosAddress]
const asi = fet const asi = fet
return { prices: { ocean, fet, agix, asi }, isValidating, isLoading } return { prices: { ocean, fet, agix, cudos, asi }, isValidating, isLoading }
} }

View File

@ -1,6 +1,11 @@
'use client' 'use client'
import { ratioAgixToAsi, ratioFetToAsi, ratioOceanToAsi } from '@/constants' import {
ratioAgixToAsi,
ratioCudosToAsi,
ratioFetToAsi,
ratioOceanToAsi
} from '@/constants'
import { usePrices } from '@/features/prices' import { usePrices } from '@/features/prices'
import { FormAmount, Result, usePersistentState } from '@/features/strategies' import { FormAmount, Result, usePersistentState } from '@/features/strategies'
import stylesShared from '@/features/strategies/styles/shared.module.css' import stylesShared from '@/features/strategies/styles/shared.module.css'
@ -41,6 +46,18 @@ export function Buy() {
isValidating={isValidating} isValidating={isValidating}
isLoading={isLoading} isLoading={isLoading}
/> />
<Result
token={getTokenBySymbol('CUDOS')}
amount={debouncedAmount / prices.cudos.usd}
amountAsi={(debouncedAmount / prices.cudos.usd) * ratioCudosToAsi}
amountFiat={
(debouncedAmount / prices.cudos.usd) *
ratioCudosToAsi *
prices.asi.usd
}
isValidating={isValidating}
isLoading={isLoading}
/>
<Result <Result
token={getTokenBySymbol('FET')} token={getTokenBySymbol('FET')}
amount={debouncedAmount / prices.fet.usd} amount={debouncedAmount / prices.fet.usd}

View File

@ -41,7 +41,8 @@ export function FormAmount({
: [ : [
{ value: 'OCEAN', label: 'OCEAN' }, { value: 'OCEAN', label: 'OCEAN' },
{ value: 'FET', label: 'FET' }, { value: 'FET', label: 'FET' },
{ value: 'AGIX', label: 'AGIX' } { value: 'AGIX', label: 'AGIX' },
{ value: 'CUDOS', label: 'CUDOS' }
] ]
return ( return (

View File

@ -5,7 +5,7 @@ import type { Dispatch, SetStateAction } from 'react'
const options = [ const options = [
{ value: 'market', label: 'All Markets' }, { value: 'market', label: 'All Markets' },
{ value: 'migration', label: 'Migration Tool' }, { value: 'migration', label: 'Migration Tool' },
{ value: 'uniswap-v3', label: 'Uniswap v3' } { value: 'uniswap', label: 'Uniswap' }
] ]
export function FormMarket({ export function FormMarket({

View File

@ -1,4 +1,9 @@
import { ratioAgixToAsi, ratioFetToAsi, ratioOceanToAsi } from '@/constants' import {
ratioAgixToAsi,
ratioCudosToAsi,
ratioFetToAsi,
ratioOceanToAsi
} from '@/constants'
import { type Prices, usePrices } from '@/features/prices' import { type Prices, usePrices } from '@/features/prices'
import { type Market, useQuote } from '@/features/strategies' import { type Market, useQuote } from '@/features/strategies'
import { getTokenBySymbol } from '@/lib' import { getTokenBySymbol } from '@/lib'
@ -14,7 +19,7 @@ export function SwapResults({
amount: number amount: number
market: Market market: Market
}) { }) {
const isUniswap = market === 'uniswap-v3' const isUniswap = market === 'uniswap'
const isMigration = market === 'migration' const isMigration = market === 'migration'
const { const {
@ -27,12 +32,15 @@ export function SwapResults({
amountToOcean: amountToOceanUniswap, amountToOcean: amountToOceanUniswap,
amountToAgix: amountToAgixUniswap, amountToAgix: amountToAgixUniswap,
amountToFet: amountToFetUniswap, amountToFet: amountToFetUniswap,
amountToCudos: amountToCudosUniswap,
isValidatingToAgix, isValidatingToAgix,
isLoadingToAgix, isLoadingToAgix,
isValidatingToFet, isValidatingToFet,
isLoadingToFet, isLoadingToFet,
isValidatingToOcean, isValidatingToOcean,
isLoadingToOcean isLoadingToOcean,
isValidatingToCudos,
isLoadingToCudos
} = useQuote(tokenSymbol, amount, isUniswap) } = useQuote(tokenSymbol, amount, isUniswap)
const tokenSelected = tokenSymbol.toLowerCase() as keyof Prices const tokenSelected = tokenSymbol.toLowerCase() as keyof Prices
@ -40,6 +48,7 @@ export function SwapResults({
const amountInUsd = amount * prices[tokenSelected].usd const amountInUsd = amount * prices[tokenSelected].usd
const amountToOcean = amountInUsd / prices.ocean.usd const amountToOcean = amountInUsd / prices.ocean.usd
const amountToAgix = amountInUsd / prices.agix.usd const amountToAgix = amountInUsd / prices.agix.usd
const amountToCudos = amountInUsd / prices.cudos.usd
// As of July 1st, use fixed ratios instead of FET market price // As of July 1st, use fixed ratios instead of FET market price
// for Migration Tool scenario // for Migration Tool scenario
@ -48,11 +57,15 @@ export function SwapResults({
? amount * ratioOceanToAsi ? amount * ratioOceanToAsi
: tokenSelected === 'agix' : tokenSelected === 'agix'
? amount * ratioAgixToAsi ? amount * ratioAgixToAsi
: tokenSelected === 'cudos'
? amount * ratioCudosToAsi
: amount : amount
: amountInUsd / prices.fet.usd : amountInUsd / prices.fet.usd
const showOcean = !isMigration || (isMigration && tokenSelected === 'ocean') const showOcean = !isMigration || (isMigration && tokenSelected === 'ocean')
const showAgix = !isMigration || (isMigration && tokenSelected === 'agix') const showAgix = !isMigration || (isMigration && tokenSelected === 'agix')
const showFet = !isMigration || (isMigration && tokenSelected === 'fet')
const showCudos = !isMigration || (isMigration && tokenSelected === 'cudos')
return ( return (
<> <>
@ -92,6 +105,25 @@ export function SwapResults({
/> />
) : null} ) : null}
{showCudos ? (
<Result
token={getTokenBySymbol('CUDOS')}
amount={amountToCudosUniswap || amountToCudos}
amountAsi={(amountToCudosUniswap || amountToCudos) * ratioCudosToAsi}
amountFiat={
(amountToCudosUniswap || amountToCudos) *
ratioCudosToAsi *
prices.asi.usd
}
amountOriginalFiat={
(amountToCudosUniswap || amountToCudos) * prices.cudos.usd
}
isValidating={isValidatingToCudos || isValidatingPrices}
isLoading={isLoadingToCudos || isLoadingPrices}
/>
) : null}
{showFet ? (
<Result <Result
token={getTokenBySymbol('FET')} token={getTokenBySymbol('FET')}
amount={amountToFetUniswap || amountToFet} amount={amountToFetUniswap || amountToFet}
@ -103,6 +135,7 @@ export function SwapResults({
isValidating={isValidatingToFet || isValidatingPrices} isValidating={isValidatingToFet || isValidatingPrices}
isLoading={isLoadingToFet || isLoadingPrices} isLoading={isLoadingToFet || isLoadingPrices}
/> />
) : null}
</> </>
) )
} }

View File

@ -12,11 +12,11 @@ import { useDebounce } from 'use-debounce'
import { SwapResults } from './Results' import { SwapResults } from './Results'
export function Swap() { export function Swap() {
const [amount, setAmount] = usePersistentState('swapAmount', 100) const [amount, setAmount] = usePersistentState('swapAmount', 1000)
const [debouncedAmount] = useDebounce(amount, 500) const [debouncedAmount] = useDebounce(amount, 500)
const [tokenSymbol, setTokenSymbol] = usePersistentState<TokenSymbol>( const [tokenSymbol, setTokenSymbol] = usePersistentState<TokenSymbol>(
'swapTokenSymbol', 'swapTokenSymbol',
'OCEAN' 'CUDOS'
) )
const [market, setMarket] = usePersistentState<Market>('swapMarket', 'all') const [market, setMarket] = usePersistentState<Market>('swapMarket', 'all')

View File

@ -58,10 +58,27 @@ export function useQuote(
options options
) )
// -> CUDOS
const {
data: dataSwapToCudos,
isValidating: isValidatingToCudos,
isLoading: isLoadingToCudos
} = useSWR(
shouldFetch
? `/api/quote/?tokenIn=${getTokenAddressBySymbol(
tokenSymbol
)}&tokenOut=${getTokenAddressBySymbol('CUDOS')}&amountIn=${amount}`
: null,
fetcher,
options
)
const amountToOcean = const amountToOcean =
dataSwapToOcean?.amountOut / Number(`1e${dataSwapToOcean?.decimals}`) dataSwapToOcean?.amountOut / Number(`1e${dataSwapToOcean?.decimals}`)
const amountToAgix = const amountToAgix =
dataSwapToAgix?.amountOut / Number(`1e${dataSwapToAgix?.decimals}`) dataSwapToAgix?.amountOut / Number(`1e${dataSwapToAgix?.decimals}`)
const amountToCudos =
dataSwapToCudos?.amountOut / Number(`1e${dataSwapToCudos?.decimals}`)
const amountToFet = const amountToFet =
dataSwapToFet?.amountOut / Number(`1e${dataSwapToFet?.decimals}`) dataSwapToFet?.amountOut / Number(`1e${dataSwapToFet?.decimals}`)
@ -70,22 +87,28 @@ export function useQuote(
amountToOcean, amountToOcean,
amountToAgix, amountToAgix,
amountToFet, amountToFet,
amountToCudos,
isValidatingToAgix, isValidatingToAgix,
isLoadingToAgix, isLoadingToAgix,
isValidatingToFet, isValidatingToFet,
isLoadingToFet, isLoadingToFet,
isValidatingToOcean, isValidatingToOcean,
isLoadingToOcean isLoadingToOcean,
isValidatingToCudos,
isLoadingToCudos
} }
: { : {
amountToOcean: undefined, amountToOcean: undefined,
amountToAgix: undefined, amountToAgix: undefined,
amountToCudos: undefined,
amountToFet: undefined, amountToFet: undefined,
isValidatingToAgix: false, isValidatingToAgix: false,
isLoadingToAgix: false, isLoadingToAgix: false,
isValidatingToFet: false, isValidatingToFet: false,
isLoadingToFet: false, isLoadingToFet: false,
isValidatingToOcean: false, isValidatingToOcean: false,
isLoadingToOcean: false isLoadingToOcean: false,
isValidatingToCudos: false,
isLoadingToCudos: false
} }
} }

View File

@ -1 +1 @@
export type Market = 'all' | 'migration' | 'uniswap-v3' export type Market = 'all' | 'migration' | 'uniswap'

BIN
images/cudos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

294
package-lock.json generated
View File

@ -24,6 +24,7 @@
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"remark-gfm": "^4.0.0",
"sharp": "^0.33.4", "sharp": "^0.33.4",
"swr": "^2.2.5", "swr": "^2.2.5",
"use-debounce": "^10.0.2" "use-debounce": "^10.0.2"
@ -1099,6 +1100,18 @@
"url": "https://github.com/sponsors/wooorm" "url": "https://github.com/sponsors/wooorm"
} }
}, },
"node_modules/escape-string-regexp": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/estree-util-is-identifier-name": { "node_modules/estree-util-is-identifier-name": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz",
@ -1266,6 +1279,32 @@
"loose-envify": "cli.js" "loose-envify": "cli.js"
} }
}, },
"node_modules/markdown-table": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz",
"integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==",
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/mdast-util-find-and-replace": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.1.tgz",
"integrity": "sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^4.0.0",
"escape-string-regexp": "^5.0.0",
"unist-util-is": "^6.0.0",
"unist-util-visit-parents": "^6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-from-markdown": { "node_modules/mdast-util-from-markdown": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.0.tgz", "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.0.tgz",
@ -1289,6 +1328,107 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/mdast-util-gfm": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.0.0.tgz",
"integrity": "sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==",
"license": "MIT",
"dependencies": {
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-gfm-autolink-literal": "^2.0.0",
"mdast-util-gfm-footnote": "^2.0.0",
"mdast-util-gfm-strikethrough": "^2.0.0",
"mdast-util-gfm-table": "^2.0.0",
"mdast-util-gfm-task-list-item": "^2.0.0",
"mdast-util-to-markdown": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-autolink-literal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz",
"integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^4.0.0",
"ccount": "^2.0.0",
"devlop": "^1.0.0",
"mdast-util-find-and-replace": "^3.0.0",
"micromark-util-character": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-footnote": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.0.0.tgz",
"integrity": "sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^4.0.0",
"devlop": "^1.1.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-to-markdown": "^2.0.0",
"micromark-util-normalize-identifier": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-strikethrough": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz",
"integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^4.0.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-to-markdown": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-table": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz",
"integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^4.0.0",
"devlop": "^1.0.0",
"markdown-table": "^3.0.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-to-markdown": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-task-list-item": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz",
"integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^4.0.0",
"devlop": "^1.0.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-to-markdown": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-mdx-expression": { "node_modules/mdast-util-mdx-expression": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.0.tgz", "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.0.tgz",
@ -1478,6 +1618,127 @@
"micromark-util-types": "^2.0.0" "micromark-util-types": "^2.0.0"
} }
}, },
"node_modules/micromark-extension-gfm": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz",
"integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==",
"license": "MIT",
"dependencies": {
"micromark-extension-gfm-autolink-literal": "^2.0.0",
"micromark-extension-gfm-footnote": "^2.0.0",
"micromark-extension-gfm-strikethrough": "^2.0.0",
"micromark-extension-gfm-table": "^2.0.0",
"micromark-extension-gfm-tagfilter": "^2.0.0",
"micromark-extension-gfm-task-list-item": "^2.0.0",
"micromark-util-combine-extensions": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-autolink-literal": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz",
"integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==",
"license": "MIT",
"dependencies": {
"micromark-util-character": "^2.0.0",
"micromark-util-sanitize-uri": "^2.0.0",
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-footnote": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz",
"integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==",
"license": "MIT",
"dependencies": {
"devlop": "^1.0.0",
"micromark-core-commonmark": "^2.0.0",
"micromark-factory-space": "^2.0.0",
"micromark-util-character": "^2.0.0",
"micromark-util-normalize-identifier": "^2.0.0",
"micromark-util-sanitize-uri": "^2.0.0",
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-strikethrough": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz",
"integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==",
"license": "MIT",
"dependencies": {
"devlop": "^1.0.0",
"micromark-util-chunked": "^2.0.0",
"micromark-util-classify-character": "^2.0.0",
"micromark-util-resolve-all": "^2.0.0",
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-table": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.0.tgz",
"integrity": "sha512-Ub2ncQv+fwD70/l4ou27b4YzfNaCJOvyX4HxXU15m7mpYY+rjuWzsLIPZHJL253Z643RpbcP1oeIJlQ/SKW67g==",
"license": "MIT",
"dependencies": {
"devlop": "^1.0.0",
"micromark-factory-space": "^2.0.0",
"micromark-util-character": "^2.0.0",
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-tagfilter": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz",
"integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==",
"license": "MIT",
"dependencies": {
"micromark-util-types": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-task-list-item": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz",
"integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==",
"license": "MIT",
"dependencies": {
"devlop": "^1.0.0",
"micromark-factory-space": "^2.0.0",
"micromark-util-character": "^2.0.0",
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-factory-destination": { "node_modules/micromark-factory-destination": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.0.tgz", "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.0.tgz",
@ -2016,6 +2277,24 @@
"react": ">=18" "react": ">=18"
} }
}, },
"node_modules/remark-gfm": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.0.tgz",
"integrity": "sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^4.0.0",
"mdast-util-gfm": "^3.0.0",
"micromark-extension-gfm": "^3.0.0",
"remark-parse": "^11.0.0",
"remark-stringify": "^11.0.0",
"unified": "^11.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/remark-parse": { "node_modules/remark-parse": {
"version": "11.0.0", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz",
@ -2047,6 +2326,21 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/remark-stringify": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz",
"integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^4.0.0",
"mdast-util-to-markdown": "^2.0.0",
"unified": "^11.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/scheduler": { "node_modules/scheduler": {
"version": "0.23.2", "version": "0.23.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",

View File

@ -17,6 +17,7 @@
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"remark-gfm": "^4.0.0",
"sharp": "^0.33.4", "sharp": "^0.33.4",
"swr": "^2.2.5", "swr": "^2.2.5",
"use-debounce": "^10.0.2" "use-debounce": "^10.0.2"

View File

@ -1,4 +1,4 @@
export type TokenSymbol = 'OCEAN' | 'FET' | 'AGIX' | 'ASI' export type TokenSymbol = 'OCEAN' | 'FET' | 'AGIX' | 'CUDOS' | 'ASI'
export type TokenAddress = `0x${string}` export type TokenAddress = `0x${string}`
export type Token = { export type Token = {