Skip to content

Commit

Permalink
SOV-4537: Add incentives column to market making (#1044)
Browse files Browse the repository at this point in the history
* Add incentives column to market making

* Create ten-crews-begin.md

* Add display name to the list of pools

* Update the config

* Adjusting the data

* Fix responsive behavior

* Update Spice multipliers

* Update Spice multipliers
  • Loading branch information
tiltom authored Nov 12, 2024
1 parent 29852f4 commit 9579578
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ten-crews-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"frontend": patch
---

SOV-4537: Add incentives column to market making
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { AmbientPoolDeposit } from './components/AmbientPoolDeposit/AmbientPoolD
import { AmbientPoolFeeRate } from './components/AmbientPoolFeeRate/AmbientPoolFeeRate';
import { AmbientPoolLiquidity } from './components/AmbientPoolLiquidity/AmbientPoolLiquidity';
import { AmbientPoolTotalBalance } from './components/AmbientPoolTotalBalance/AmbientPoolTotalBalance';
import { Incentives } from './components/Incentives/Incentives';
import { LastPrice } from './components/LastPrice/LastPrice';

export const COLUMNS_CONFIG = [
Expand All @@ -35,6 +36,11 @@ export const COLUMNS_CONFIG = [
<AmbientPoolLiquidity pool={pool} />
),
},
{
id: 'incentives',
title: t(translations.ambientMarketMaking.poolsTable.incentives),
cellRenderer: (pool: AmbientLiquidityPool) => <Incentives pool={pool} />,
},
{
id: 'lpFeeRate',
title: (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React, { FC, useMemo } from 'react';

import { Tooltip, TooltipPlacement, TooltipTrigger } from '@sovryn/ui';

import spiceInfo from '../../../../data/spiceInfo.json';
import { AmbientLiquidityPool } from '../../../../utils/AmbientLiquidityPool';
import { Spice } from './components/Spice/Spice';

type IncentivesProps = {
pool: AmbientLiquidityPool;
};

type PoolSpiceInfo = {
lpTokenAddress: string;
label1: string;
label2: string;
content: string;
};

const poolsData = spiceInfo as PoolSpiceInfo[];

export const Incentives: FC<IncentivesProps> = ({ pool }) => {
const poolData = useMemo(
() =>
poolsData.find(
item =>
item.lpTokenAddress.toLowerCase() ===
pool.lpTokenAddress?.toLowerCase(),
),
[pool.lpTokenAddress],
);

return poolData?.content || poolData?.label1 ? (
<Tooltip
content={<div>{poolData?.content}</div>}
trigger={TooltipTrigger.hover}
placement={TooltipPlacement.right}
>
<div>
<div className="flex justify-end">
<div>{poolData?.label1}</div>
<Spice />
</div>

<div className="flex justify-end mt-0.5">
<div>{poolData?.label2}</div>
<Spice />
</div>
</div>
</Tooltip>
) : (
<></>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React, { FC } from 'react';

import bobLogo from '../../../../../../../../../../../assets/chains/bob-light.svg';

export const Spice: FC = () => (
<div className="flex items-center ml-2">
<img src={bobLogo} alt="BOB" className="w-3.5" />
<div className="ml-1.5">Spice</div>
</div>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
[
{
"lpTokenAddress": "0x4E686Dff59A51A948ea9Cc8C44FF0b32cba6e62a",
"displayName": "USDC/USDT",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x2E41CD9805592b3A536EeE6286CC8FCFb3DFd9F2",
"displayName": "USDT/DLLR",
"label1": "7x",
"label2": "10x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x0034a1EaCDa61619Bd9D1CEDA101189A0EF871F9",
"displayName": "DLLR/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xdC1f62679a25bB9d568463ce007a3b91D01448FD",
"displayName": "USDT/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xf59720432AA266D4B077efE659EEb36923f41Da2",
"displayName": "USDC/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xEb92Ae0ce520D099b0FB51Ef297f581c5AB57dbf",
"displayName": "DAI/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x594726E3B10bb5402279cBf745fC597041a6f1cF",
"displayName": "ETH/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xBd696d1a6E09D051dDce2d7DcDDD6B6Bf082f8AA",
"displayName": "WSTETH/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xE668D03C31f78713952953cE6f345b1D0137B754",
"displayName": "RETH/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x165b73022AE5601494c3a200f92114736BD3Cfca",
"displayName": "WBTC/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xB4e9fAaF39d95E396E588A0CdD70f3a9E79286be",
"displayName": "TBTC/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x02eB05fa5A5da14B54d6b7d5044e5343c01126EB",
"displayName": "TBTC/WBTC",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xbFB1bF6dCc02baCeB8C4c336457798c9b4ED1225",
"displayName": "POWA/SOV",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x9C82eF04eC7FEB9E07a9f2Be23cc180753CE4612",
"displayName": "WBTC/satUSD",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x8C6a57d16B1ddAD730Fee27822284d085C106DbB",
"displayName": "USDT/satUSD",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xEBE212e59c012Bd2f092489d98d11fCe17697cb2",
"displayName": "UniBTC/SolvBTC.BBN",
"label1": "20x",
"label2": "20x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x6D1529a7b34D452488f577495Dd7574954339dD9",
"displayName": "UniBTC/wBTC",
"label1": "20x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0x0F3dAef46d5631f4C335643e287314580135011E",
"displayName": "SolvBTC.BBN/wBTC",
"label1": "20x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xF11aB627c41044f40B5C2587e77540e7fC7Af42a",
"displayName": "wBTC/SolvBTC",
"label1": "7x",
"label2": "7x",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). Sovryn Spice multiplier boosts your points by a set value."
},
{
"lpTokenAddress": "0xe26a75Cd1892600cB4935EeA701f1D1DaE1e8ab0",
"displayName": "DOGGOTOTHEMOON/POWA",
"label1": "Capped",
"label2": "Capped",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). This Rune Liquidity Pool has 15M Spice Points allocated until November 13, 2024. Start providing liquidity early to maximize your share!"
},
{
"lpTokenAddress": "0xDCB0Fb1113923aed92f82DBf5a114E64Ea55522d",
"displayName": "DOGGOTOTHEMOON/wBTC",
"label1": "Capped",
"label2": "Capped",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). This Rune Liquidity Pool has 15M Spice Points allocated until November 13, 2024. Start providing liquidity early to maximize your share!"
},
{
"lpTokenAddress": "0x0DF5951E5f838faF95eC903cB4bE9CE516A6CCE2",
"displayName": "PUPSWORLDPEACE/POWA",
"label1": "Capped",
"label2": "Capped",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). This Rune Liquidity Pool has 15M Spice Points allocated until November 25, 2024. Start providing liquidity early to maximize your share!"
},
{
"lpTokenAddress": "0x3FF9f5c6b94C1C7C3e48edd92bCd19D95979a14B",
"displayName": "PUPSWORLDPEACE/wBTC",
"label1": "Capped",
"label2": "Capped",
"content": "Earn 1 Spice Point daily per $1 deposited on BOB (Build on Bitcoin). This Rune Liquidity Pool has 15M Spice Points allocated until November 25, 2024. Start providing liquidity early to maximize your share!"
}
]
10 changes: 10 additions & 0 deletions apps/frontend/src/assets/chains/bob-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion apps/frontend/src/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,7 @@
"poolsTable": {
"pair": "Pair",
"liquidity": "Liquidity",
"incentives": "Incentives",
"lpFeeRate": "LP fee rate",
"lpFeeRateInfo": "The fee rate that is charged per swap and given to AMM LPs",
"volume": "24H volume",
Expand Down Expand Up @@ -1963,7 +1964,7 @@
"availableRunes": "Available Runes",
"availableSoon": "Available soon",
"availableRunesInfo": "Interested in adding more Runes?",
"runesUseCases":{
"runesUseCases": {
"title": "Use your Runes in DeFi",
"convert": "Convert to any token",
"convertDescription": "Swap Runes to BTC, stablecoins or any other asset.",
Expand Down

0 comments on commit 9579578

Please sign in to comment.