From 8bb8f5cd518b1134fe962180cde098003d9455fe Mon Sep 17 00:00:00 2001 From: user Date: Thu, 23 Nov 2023 01:10:22 +1030 Subject: [PATCH] Remove more - Remove degen score - Add back Ethereum tokens to the list - Pull more ethereum --- .../app/queries/useUserTransactions.ts | 105 ++--------- .../app/routes/$network.tsx | 16 -- .../app/routes/$network/dashboard/home.tsx | 2 +- .../$network/dashboard/rewards/index.tsx | 2 +- .../app/styles/dashboard.css | 30 +--- .../app/styles/dashboard/airdrop.css | 79 ++------- .../app/styles/transfer.css | 15 +- .../app/util/api/graphql.ts | 9 +- .../chainUtils/ethereum/DegenScoreBeacon.json | 31 ---- .../util/chainUtils/ethereum/transaction.ts | 32 ---- web/app.fluidity.money/config.toml | 167 ++++++++++++++++++ .../contexts/EthereumProvider.tsx | 25 --- .../contexts/FluidityFacade.tsx | 2 - 13 files changed, 205 insertions(+), 310 deletions(-) delete mode 100644 web/app.fluidity.money/app/util/chainUtils/ethereum/DegenScoreBeacon.json diff --git a/web/app.fluidity.money/app/queries/useUserTransactions.ts b/web/app.fluidity.money/app/queries/useUserTransactions.ts index ad39322fa..2d6b51483 100644 --- a/web/app.fluidity.money/app/queries/useUserTransactions.ts +++ b/web/app.fluidity.money/app/queries/useUserTransactions.ts @@ -323,26 +323,6 @@ export type UserTransaction = { application: string; }; -type BitqueryUserTransaction = { - sender: { - address: string; - }; - receiver: { address: string }; - block: { timestamp: { unixtime: number } }; - transaction: { hash: string }; - amount: number; - currency: { symbol: string }; -}; - -type BitqueryUserTransactionRes = { - data?: { - [network: string]: { - transfers: BitqueryUserTransaction[]; - }; - }; - errors?: unknown; -}; - type HasuraUserTransaction = { sender_address: string; recipient_address: string; @@ -397,20 +377,12 @@ const useUserTransactionsByAddress = async ( }; const result = - networkGqlBackend(network) === "hasura" - ? parseHasuraUserTransactions( - await jsonPost< - UserTransactionsByAddressBody, - HasuraUserTransactionRes - >(url, body, headers) - ) - : parseBitqueryUserTransactions( - await jsonPost< - UserTransactionsByAddressBody, - BitqueryUserTransactionRes - >(url, body, headers), - network - ); + parseHasuraUserTransactions( + await jsonPost< + UserTransactionsByAddressBody, + HasuraUserTransactionRes + >(url, body, headers) + ) return result; }; @@ -442,20 +414,12 @@ const useUserTransactionsByTxHash = async ( }; const result = - networkGqlBackend(network) === "hasura" - ? parseHasuraUserTransactions( - await jsonPost< - UserTransactionsByTxHashBody, - HasuraUserTransactionRes - >(url, body, headers) - ) - : parseBitqueryUserTransactions( - await jsonPost< - UserTransactionsByTxHashBody, - BitqueryUserTransactionRes - >(url, body, headers), - network - ); + parseHasuraUserTransactions( + await jsonPost< + UserTransactionsByTxHashBody, + HasuraUserTransactionRes + >(url, body, headers) + ); return result; }; @@ -494,22 +458,13 @@ const useUserTransactionsAll = async ( }; const result = - networkGqlBackend(network) === "hasura" - ? parseHasuraUserTransactions( - await jsonPost( - url, - body, - headers - ) - ) - : parseBitqueryUserTransactions( - await jsonPost( - url, - body, - headers - ), - network - ); + parseHasuraUserTransactions( + await jsonPost( + url, + body, + headers + ) + ) return result; }; @@ -566,28 +521,6 @@ const parseHasuraUserTransactions = ( }; }; -const parseBitqueryUserTransactions = ( - result: BitqueryUserTransactionRes, - network: string -): UserTransactionsRes => { - if (!result.data || result.errors) - return { - errors: result.errors, - }; - - const transfers: BitqueryUserTransaction[] = - result.data[network]?.transfers ?? []; - - return { - data: { - transfers: transfers.map((transfer) => ({ - ...transfer, - application: "none", - })), - }, - }; -}; - export { useUserTransactionsAll, useUserTransactionsByAddress, diff --git a/web/app.fluidity.money/app/routes/$network.tsx b/web/app.fluidity.money/app/routes/$network.tsx index 542a64377..e49a9ceef 100644 --- a/web/app.fluidity.money/app/routes/$network.tsx +++ b/web/app.fluidity.money/app/routes/$network.tsx @@ -84,24 +84,8 @@ const Provider = ({ }; const ProviderOutlet = () => { - const { connected, address, getDegenScore } = useContext( - FluidityFacadeContext - ); - const { client } = useContext(SplitContext); - useEffect(() => { - if (!(address && connected)) return; - - (async () => { - if (!getDegenScore) return; - - const degenScore = await getDegenScore(address); - - client?.track("connected-user-degen-score", address, degenScore); - })(); - }, [address, client]); - return ( <> diff --git a/web/app.fluidity.money/app/routes/$network/dashboard/home.tsx b/web/app.fluidity.money/app/routes/$network/dashboard/home.tsx index 62377b9c2..f4add9655 100644 --- a/web/app.fluidity.money/app/routes/$network/dashboard/home.tsx +++ b/web/app.fluidity.money/app/routes/$network/dashboard/home.tsx @@ -76,7 +76,7 @@ function ErrorBoundary(error: Error) { } const SAFE_DEFAULT_HOME: HomeLoaderData = { - network: "ethereum", + network: "arbitrum", loaded: false, graph: { day: [], diff --git a/web/app.fluidity.money/app/routes/$network/dashboard/rewards/index.tsx b/web/app.fluidity.money/app/routes/$network/dashboard/rewards/index.tsx index c871298ee..7648e1f5d 100644 --- a/web/app.fluidity.money/app/routes/$network/dashboard/rewards/index.tsx +++ b/web/app.fluidity.money/app/routes/$network/dashboard/rewards/index.tsx @@ -108,7 +108,7 @@ type CacheData = { const SAFE_DEFAULT_REWARDS: RewardsLoaderData = { // Only used in Rewards - network: "ethereum", + network: "arbitrum", fluidTokenMap: {}, totalPrizePool: 0, loaded: false, diff --git a/web/app.fluidity.money/app/styles/dashboard.css b/web/app.fluidity.money/app/styles/dashboard.css index f5c50dbf0..ede067258 100644 --- a/web/app.fluidity.money/app/styles/dashboard.css +++ b/web/app.fluidity.money/app/styles/dashboard.css @@ -149,20 +149,7 @@ body { background-repeat: no-repeat; background-size: 100%; background-position: 0 0, 100% 0, 100% 100%, 0 100%; - background-image: linear-gradient( - 45deg, - #f3b8d8, - #b793e9, - #9fd4f3, - #ffd2c4, - #fbf3f3, - #d9abdf, - #af9ce3, - #aae4e1, - #c6ead0, - #ffffff, - #fdb5e4 - ); + background-image: linear-gradient(45deg, #f3b8d8, #b793e9, #9fd4f3, #ffd2c4, #fbf3f3, #d9abdf, #af9ce3, #aae4e1, #c6ead0, #ffffff, #fdb5e4); animation: rotate 4s linear infinite; } @@ -630,20 +617,7 @@ ul.sidebar-nav li div.active { } .holo { - background: conic-gradient( - from 209.59deg at 50% 50%, - #f3b8d8 0deg, - #b793e9 50.06deg, - #9fd4f3 85.94deg, - #ffd2c4 134.97deg, - #fbf3f3 172.05deg, - #d9abdf 200.75deg, - #af9ce3 224.67deg, - #aae4e1 259.36deg, - #c6ead0 298.82deg, - #ffffff 328.72deg, - #fdb5e4 360deg - ); + background: conic-gradient(from 209.59deg at 50% 50%, #f3b8d8 0deg, #b793e9 50.06deg, #9fd4f3 85.94deg, #ffd2c4 134.97deg, #fbf3f3 172.05deg, #d9abdf 200.75deg, #af9ce3 224.67deg, #aae4e1 259.36deg, #c6ead0 298.82deg, #ffffff 328.72deg, #fdb5e4 360deg); height: 40px; width: 40px; border-radius: 50%; diff --git a/web/app.fluidity.money/app/styles/dashboard/airdrop.css b/web/app.fluidity.money/app/styles/dashboard/airdrop.css index a75578573..fc49a1553 100644 --- a/web/app.fluidity.money/app/styles/dashboard/airdrop.css +++ b/web/app.fluidity.money/app/styles/dashboard/airdrop.css @@ -273,19 +273,7 @@ } .transaction-table > thead > tr.highlighted-row, .transaction-table > tbody > tr.airdrop-row.highlighted-row { - background: linear-gradient( - 90deg, - #f3b8d8 0%, - #b793e9 15.1%, - #9fd4f3 26.04%, - #ffd2c4 36.46%, - #fbf3f3 46.88%, - #d9abdf 57.29%, - #af9ce3 72.4%, - #aae4e1 85.42%, - #c6ead0 93.23%, - #fdb5e4 100% - ); + background: linear-gradient(90deg, #f3b8d8 0%, #b793e9 15.1%, #9fd4f3 26.04%, #ffd2c4 36.46%, #fbf3f3 46.88%, #d9abdf 57.29%, #af9ce3 72.4%, #aae4e1 85.42%, #c6ead0 93.23%, #fdb5e4 100%); } .transaction-table > thead > tr.highlighted-row td, .transaction-table > tbody > tr.airdrop-row.highlighted-row td { @@ -314,30 +302,14 @@ } .airdrop-leaderboard-mobile .transaction-table > thead > tr td:first-child, .airdrop-leaderboard-mobile .transaction-table > thead > tr th:first-child, -.airdrop-leaderboard-mobile - .transaction-table - > tbody - > tr.airdrop-row - td:first-child, -.airdrop-leaderboard-mobile - .transaction-table - > tbody - > tr.airdrop-row - th:first-child { +.airdrop-leaderboard-mobile .transaction-table > tbody > tr.airdrop-row td:first-child, +.airdrop-leaderboard-mobile .transaction-table > tbody > tr.airdrop-row th:first-child { padding-left: 1em; } .airdrop-leaderboard-mobile .transaction-table > thead > tr td:last-child, .airdrop-leaderboard-mobile .transaction-table > thead > tr th:last-child, -.airdrop-leaderboard-mobile - .transaction-table - > tbody - > tr.airdrop-row - td:last-child, -.airdrop-leaderboard-mobile - .transaction-table - > tbody - > tr.airdrop-row - th:last-child { +.airdrop-leaderboard-mobile .transaction-table > tbody > tr.airdrop-row td:last-child, +.airdrop-leaderboard-mobile .transaction-table > tbody > tr.airdrop-row th:last-child { padding-right: 1em; } .airdrop-leaderboard-mobile .transaction-table > thead > tr td, @@ -714,10 +686,7 @@ align-items: flex-start; gap: 0.5em; } -.staking-stats-container - .staking-stats-stakes-container - .stake - .stake-multiplier { +.staking-stats-container .staking-stats-stakes-container .stake .stake-multiplier { width: 100%; display: flex; flex-wrap: wrap; @@ -790,31 +759,18 @@ width: 150px; height: 150px; } -.recap-container - .recap-hero - .recap-hero-text - .recap-circle-scroll - .recap-circle-scroll-arrow { +.recap-container .recap-hero .recap-hero-text .recap-circle-scroll .recap-circle-scroll-arrow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } -.recap-container - .recap-hero - .recap-hero-text - .recap-circle-scroll - .recap-circle-scroll-arrow - svg { +.recap-container .recap-hero .recap-hero-text .recap-circle-scroll .recap-circle-scroll-arrow svg { fill: none; stroke: white; transform: scale(3); } -.recap-container - .recap-hero - .recap-hero-text - .recap-circle-scroll - .recap-circle-scroll-text { +.recap-container .recap-hero .recap-hero-text .recap-circle-scroll .recap-circle-scroll-text { font-size: 10px; fill: grey; letter-spacing: 0.4em; @@ -906,28 +862,19 @@ /* Track */ /* Handle */ } -.recap-container - .recap-stats - .recap-bottle-distribution-container::-webkit-scrollbar { +.recap-container .recap-stats .recap-bottle-distribution-container::-webkit-scrollbar { height: 10px; } -.recap-container - .recap-stats - .recap-bottle-distribution-container::-webkit-scrollbar-track { +.recap-container .recap-stats .recap-bottle-distribution-container::-webkit-scrollbar-track { background: transparent; border: 1px solid white; border-radius: 5px; } -.recap-container - .recap-stats - .recap-bottle-distribution-container::-webkit-scrollbar-thumb { +.recap-container .recap-stats .recap-bottle-distribution-container::-webkit-scrollbar-thumb { background: white; border-radius: 5px; } -.recap-container - .recap-stats - .recap-bottle-distribution-container - .bottle-container { +.recap-container .recap-stats .recap-bottle-distribution-container .bottle-container { gap: 1em; display: flex; flex-direction: column; diff --git a/web/app.fluidity.money/app/styles/transfer.css b/web/app.fluidity.money/app/styles/transfer.css index 0d4055653..337cd2928 100644 --- a/web/app.fluidity.money/app/styles/transfer.css +++ b/web/app.fluidity.money/app/styles/transfer.css @@ -276,20 +276,7 @@ body { right: 0; bottom: 0; z-index: 1; - background: conic-gradient( - from 209.59deg at 50% 50%, - #f3b8d8 0deg, - #b793e9 50.06deg, - #9fd4f3 85.94deg, - #ffd2c4 134.97deg, - #fbf3f3 172.05deg, - #d9abdf 200.75deg, - #af9ce3 224.67deg, - #aae4e1 259.36deg, - #c6ead0 298.82deg, - #ffffff 328.72deg, - #fdb5e4 360deg - ); + background: conic-gradient(from 209.59deg at 50% 50%, #f3b8d8 0deg, #b793e9 50.06deg, #9fd4f3 85.94deg, #ffd2c4 134.97deg, #fbf3f3 172.05deg, #d9abdf 200.75deg, #af9ce3 224.67deg, #aae4e1 259.36deg, #c6ead0 298.82deg, #ffffff 328.72deg, #fdb5e4 360deg); filter: blur(10px); scale: 1.1; } diff --git a/web/app.fluidity.money/app/util/api/graphql.ts b/web/app.fluidity.money/app/util/api/graphql.ts index b5e71197b..59a11e4ea 100644 --- a/web/app.fluidity.money/app/util/api/graphql.ts +++ b/web/app.fluidity.money/app/util/api/graphql.ts @@ -9,12 +9,10 @@ type GqlEndpoint = { headers: { [key: string]: string }; }; -type GqlBackend = "hasura" | "bitquery"; +type GqlBackend = "hasura"; export const networkGqlBackend = (network: string): GqlBackend | null => { switch (network) { - case "ethereum": - return "bitquery"; case "solana": case "arbitrum": case "polygon_zk": @@ -26,11 +24,6 @@ export const networkGqlBackend = (network: string): GqlBackend | null => { export const fetchGqlEndpoint = (network: string): GqlEndpoint | null => { switch (networkGqlBackend(network)) { - case "bitquery": - return { - url: "https://graphql.bitquery.io", - headers: { "X-API-KEY": process.env.FLU_BITQUERY_TOKEN ?? "" }, - }; case "hasura": return { url: "https://fluidity.hasura.app/v1/graphql", diff --git a/web/app.fluidity.money/app/util/chainUtils/ethereum/DegenScoreBeacon.json b/web/app.fluidity.money/app/util/chainUtils/ethereum/DegenScoreBeacon.json deleted file mode 100644 index 880a02173..000000000 --- a/web/app.fluidity.money/app/util/chainUtils/ethereum/DegenScoreBeacon.json +++ /dev/null @@ -1,31 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "traitId", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "maxAge", - "type": "uint64" - } - ], - "name": "getTrait", - "outputs": [ - { - "internalType": "uint192", - "name": "", - "type": "uint192" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/web/app.fluidity.money/app/util/chainUtils/ethereum/transaction.ts b/web/app.fluidity.money/app/util/chainUtils/ethereum/transaction.ts index 2ce476e93..545721d1d 100644 --- a/web/app.fluidity.money/app/util/chainUtils/ethereum/transaction.ts +++ b/web/app.fluidity.money/app/util/chainUtils/ethereum/transaction.ts @@ -351,38 +351,6 @@ export const getTotalRewardPool = async ( } }; -// Returns User DegenScore -export const getUserDegenScore = async ( - provider: JsonRpcProvider, - userAddr: string, - degenScoreAddr: string, - degenScoreAbi: ContractInterface -): Promise => { - try { - const degenScoreContract = new Contract( - degenScoreAddr, - degenScoreAbi, - provider - ); - - if (!degenScoreContract) - throw new Error(`Could not instantiate DegenScore at ${degenScoreAddr}`); - - const degenScoreTraitId = "121371448299756538184036965"; - - const score = await degenScoreContract.callStatic.getTrait( - userAddr, - degenScoreTraitId, - 0 - ); - - return score.toNumber(); - } catch (error) { - await handleContractErrors(error as ErrorType, provider); - return 0; - } -}; - export type StakingRatioRes = { fusdcUsdcRatio: BigNumber; fusdcWethRatio: BigNumber; diff --git a/web/app.fluidity.money/config.toml b/web/app.fluidity.money/config.toml index 5533080ed..b0ba9261d 100644 --- a/web/app.fluidity.money/config.toml +++ b/web/app.fluidity.money/config.toml @@ -1,4 +1,10 @@ # Setup Webapp Network Drivers +[[drivers.ethereum]] +label = "Ethereum" +testnet = false +rpc = { http = "FLU_ETH_RPC_HTTP", ws = "FLU_ETH_RPC_WS" } +server = "https://api.ethereum.fluidity.money" + [[drivers.solana]] label = "Solana" testnet = false @@ -21,6 +27,112 @@ testnet = false rpc = { http = "FLU_HASURA_RPC_HTTP", ws = "FLU_HASURA_RPC_WS" } secret = "FLU_HASURA_SECRET" +# Chain Configurations +[config.ethereum] +explorer = "https://etherscan.io" +fluidAssets = [ + "0xADc234a4e90E2045f353F5d4fCdE66144d23b458", + "0x0B319dB00d07C8fAdfaAEf13C910141a5dA0aa8F", + "0x2bE1e42BF263AaB47D27Ba92E72c14823e101D7C", + "0x9d1089802eE608BA84C5c98211afE5f37F96B36C", + "0x244517Dc59943E8CdFbD424Bdb3262c5f04a1387", +] + +[[config.ethereum.tokens]] +symbol = "USDC" +name = "USDC Native" +logo = "/assets/tokens/usdc.svg" +address = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" +colour = "#2775ca" +decimals = 6 +enabled = true + +[[config.ethereum.tokens]] +symbol = "fUSDC" +name = "Fluid USDC Native" +logo = "/assets/tokens/fUSDC.svg" +address = "0x9d1089802eE608BA84C5c98211afE5f37F96B36C" +colour = "#2775ca" +isFluidOf = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" +decimals = 6 +enabled = true + +[[config.ethereum.tokens]] +symbol = "USDT" +name = "Tether USD" +logo = "/assets/tokens/usdt.svg" +address = "0xdAC17F958D2ee523a2206206994597C13D831ec7" +colour = "#12946c" +decimals = 6 +enabled = false + +[[config.ethereum.tokens]] +symbol = "fUSDT" +name = "Fluid USDT" +logo = "/assets/tokens/fUSDT.svg" +address = "0xADc234a4e90E2045f353F5d4fCdE66144d23b458" +colour = "#12946c" +isFluidOf = "0xdAC17F958D2ee523a2206206994597C13D831ec7" +decimals = 6 +enabled = true + +[[config.ethereum.tokens]] +symbol = "TUSD" +name = "TrueUSD" +logo = "/assets/tokens/tusd.svg" +address = "0x0000000000085d4780B73119b644AE5ecd22b376" +colour = "#1da1f2" +decimals = 18 +enabled = false + +[[config.ethereum.tokens]] +symbol = "fTUSD" +name = "Fluid TUSD" +logo = "/assets/tokens/fTUSD.svg" +address = "0x0B319dB00d07C8fAdfaAEf13C910141a5dA0aa8F" +colour = "#1da1f2" +isFluidOf = "0x0000000000085d4780B73119b644AE5ecd22b376" +decimals = 18 +enabled = true + +[[config.ethereum.tokens]] +symbol = "FRAX" +name = "Frax" +logo = "/assets/tokens/frax.svg" +address = "0x853d955aCEf822Db058eb8505911ED77F175b99e" +colour = "#e84142" +decimals = 18 +enabled = false + +[[config.ethereum.tokens]] +symbol = "fFRAX" +name = "Fluid FRAX" +logo = "/assets/tokens/fFRAX.svg" +address = "0x2bE1e42BF263AaB47D27Ba92E72c14823e101D7C" +colour = "#e84142" +isFluidOf = "0x853d955aCEf822Db058eb8505911ED77F175b99e" +decimals = 18 +enabled = true + +[[config.ethereum.tokens]] +symbol = "DAI" +name = "Dai Stablecoin" +logo = "/assets/tokens/dai.svg" +address = "0x6B175474E89094C44Da98b954EedeAC495271d0F" +colour = "#825902" +decimals = 18 +enabled = false + +[[config.ethereum.tokens]] +symbol = "fDAI" +name = "Fluid DAI" +logo = "/assets/tokens/fDAI.svg" +address = "0x244517Dc59943E8CdFbD424Bdb3262c5f04a1387" +colour = "#825902" +isFluidOf = "0x6B175474E89094C44Da98b954EedeAC495271d0F" +decimals = 18 +enabled = true + [config.solana] explorer = "https://explorer.solana.com" fluidAssets = [ @@ -147,6 +259,61 @@ isFluidOf = "0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035" decimals = 6 enabled = true + +# liquidity_providers Configurations +# eth providers +[liquidity_providers.ethereum] + +[[liquidity_providers.ethereum.providers]] +name= "uniswap" + +[liquidity_providers.ethereum.providers.link] +fUSDC = "https://app.uniswap.org/#/add/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/0x9d1089802eE608BA84C5c98211afE5f37F96B36C/" +fUSDT = "https://app.uniswap.org/#/add/0xdAC17F958D2ee523a2206206994597C13D831ec7/0xADc234a4e90E2045f353F5d4fCdE66144d23b458/" +fTUSD = "https://app.uniswap.org/#/add/0x0000000000085d4780B73119b644AE5ecd22b376/0x0B319dB00d07C8fAdfaAEf13C910141a5dA0aa8F" +fFRAX = "https://app.uniswap.org/#/add/0x853d955aCEf822Db058eb8505911ED77F175b99e/0x2bE1e42BF263AaB47D27Ba92E72c14823e101D7C" +fDAI = "https://app.uniswap.org/#/add/0x6B175474E89094C44Da98b954EedeAC495271d0F/0x244517Dc59943E8CdFbD424Bdb3262c5f04a1387/" + +[[liquidity_providers.ethereum.providers]] +name= "sushiswap" + +[liquidity_providers.ethereum.providers.link] +fUSDC = "https://www.sushi.com/earn/eth:0xc35466daaa5e61977ec4219d682eeb7beb431726/add" +fUSDT = "https://www.sushi.com/earn/eth:0x0d33d674f6eef1991e9aab561189b26ebed7c576/add" +fTUSD = "https://www.sushi.com/earn" +fFRAX = "https://www.sushi.com/earn" +fDAI = "https://www.sushi.com/earn" + +[[liquidity_providers.ethereum.providers]] +name= "dodo" + +[liquidity_providers.ethereum.providers.link] +fUSDC = "https://app.dodoex.io/earn/add-liquidity?network=mainnet&poolAddress=0x6abd7403878f3a010170a383b4f20285668fd979" +fUSDT = "https://app.dodoex.io/earn?network=mainnet" +fTUSD = "https://app.dodoex.io/earn?network=mainnet" +fFRAX = "https://app.dodoex.io/earn?network=mainnet" +fDAI = "https://app.dodoex.io/earn?network=mainnet" + +[[liquidity_providers.ethereum.providers]] +name= "balancer" + +[liquidity_providers.ethereum.providers.link] +fUSDC = "https://app.balancer.fi/#/ethereum/pool/0xfee6da6ce300197b7d613de22cb00e86a8537f06000200000000000000000393/invest" +fUSDT = "https://app.balancer.fi/#/ethereum/pool/create" +fTUSD = "https://app.balancer.fi/#/ethereum/pool/create" +fFRAX = "https://app.balancer.fi/#/ethereum/pool/create" +fDAI = "https://app.balancer.fi/#/ethereum/pool/create" + +[[liquidity_providers.ethereum.providers]] +name= "1inch" + +[liquidity_providers.ethereum.providers.link] +fUSDC = "https://app.1inch.io/#/1/earn/pools?filter=fUSDC&token0=0x9d1089802ee608ba84c5c98211afe5f37f96b36c&token1=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" +fUSDT = "https://app.1inch.io/#/1/earn/pools" +fTUSD = "https://app.1inch.io/#/1/earn/pools" +fFRAX = "https://app.1inch.io/#/1/earn/pools" +fDAI = "https://app.1inch.io/#/1/earn/pools" + # sol providers [liquidity_providers.solana] diff --git a/web/app.fluidity.money/contexts/EthereumProvider.tsx b/web/app.fluidity.money/contexts/EthereumProvider.tsx index e3db1429f..ad35b934a 100644 --- a/web/app.fluidity.money/contexts/EthereumProvider.tsx +++ b/web/app.fluidity.money/contexts/EthereumProvider.tsx @@ -23,7 +23,6 @@ import { EIP1193 } from "@web3-react/eip1193"; import { SplitContext } from "contexts/SplitProvider"; import FluidityFacadeContext from "contexts/FluidityFacade"; import { - getUserDegenScore, getUserStakingDeposits, getTokenStakingRatio, makeStakingDeposit, @@ -42,7 +41,6 @@ import { getNetworkFromChainId, } from "~/util/chainUtils/chains"; -import DegenScoreAbi from "~/util/chainUtils/ethereum/DegenScoreBeacon.json"; import StakingAbi from "~/util/chainUtils/ethereum/Staking.json"; import LootboxOwnershipAbi from "~/util/chainUtils/ethereum/LootboxConfirmAddressOwnership.json"; import { useToolTip } from "~/components"; @@ -333,28 +331,6 @@ const EthereumFacade = ({ .map(([addr]) => addr); }; - /** - * getDegenScore returns the "DegenScore" of a user. - * - * Source: https://degenscore.com. - */ - const getDegenScore = async (address: string): Promise => { - const signer = provider?.getSigner(); - - if (!signer) { - return 0; - } - - const degenScoreAddr = "0x0521FA0bf785AE9759C7cB3CBE7512EbF20Fbdaa"; - - return getUserDegenScore( - signer.provider, - address, - degenScoreAddr, - DegenScoreAbi - ); - }; - /** * getStakingDeposits returns total tokens staked by a user. */ @@ -615,7 +591,6 @@ const EthereumFacade = ({ rawAddress: account ?? "", address: account?.toLowerCase() ?? "", manualReward, - getDegenScore, addToken, connected: isActive, connecting: isActivating, diff --git a/web/app.fluidity.money/contexts/FluidityFacade.tsx b/web/app.fluidity.money/contexts/FluidityFacade.tsx index 90f273d8f..09c188439 100644 --- a/web/app.fluidity.money/contexts/FluidityFacade.tsx +++ b/web/app.fluidity.money/contexts/FluidityFacade.tsx @@ -40,8 +40,6 @@ export interface IFluidityFacade { | undefined >; - getDegenScore?: (address: string) => Promise; - addToken?: (symbol: string) => Promise; getStakingRatios?: () => Promise;