diff --git a/src/assets/images/pools/pills-potions.png b/src/assets/images/pools/pills-potions.png
deleted file mode 100644
index 2c6e3faac..000000000
Binary files a/src/assets/images/pools/pills-potions.png and /dev/null differ
diff --git a/src/assets/images/pools/rewards/pills-icon.svg b/src/assets/images/pools/rewards/pills-icon.svg
deleted file mode 100644
index b2091a4c1..000000000
--- a/src/assets/images/pools/rewards/pills-icon.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/src/components/cauldrons/CauldronCardItem.vue b/src/components/cauldrons/CauldronCardItem.vue
index b7f7a4d31..b1ed219fa 100644
--- a/src/components/cauldrons/CauldronCardItem.vue
+++ b/src/components/cauldrons/CauldronCardItem.vue
@@ -82,7 +82,6 @@ export default {
data() {
return {
elixirPotions: [43, 44],
- pillsPoints: [45],
};
},
diff --git a/src/components/cauldrons/RewardInfo.vue b/src/components/cauldrons/RewardInfo.vue
index 900ede1e6..a2a659f1d 100644
--- a/src/components/cauldrons/RewardInfo.vue
+++ b/src/components/cauldrons/RewardInfo.vue
@@ -20,13 +20,6 @@
-
-
-
Pills Multiplier
-
1x - 6.3x
-
-
-
{{ loopApr }}
@@ -53,7 +46,6 @@ export default {
data() {
return {
elixirPotions: [43, 44],
- pillsPoints: [45],
};
},
@@ -65,13 +57,6 @@ export default {
);
},
- isPillsPoints() {
- return (
- this.cauldron.config.chainId === MAINNET_CHAIN_ID &&
- this.pillsPoints.includes(this.cauldron.config.id)
- );
- },
-
loopApr(): string {
if (!this.cauldron.apr.value) return "-";
diff --git a/src/components/market/DynamicPillsMultiplier.vue b/src/components/market/DynamicPillsMultiplier.vue
deleted file mode 100644
index 29e29faf7..000000000
--- a/src/components/market/DynamicPillsMultiplier.vue
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
- Pills Multiplier
-
-
-
{{ multiplier }}X
-
-
-
-
-
-
-
-
diff --git a/src/components/market/LeverageBlock.vue b/src/components/market/LeverageBlock.vue
index 9449e108d..dae3384ae 100644
--- a/src/components/market/LeverageBlock.vue
+++ b/src/components/market/LeverageBlock.vue
@@ -27,8 +27,6 @@
v-if="hasElixirPotions"
/>
-
-
import("@/components/market/DynamicElixirPotionsMultiplier.vue")
),
- DynamicPillsMultiplier: defineAsyncComponent(
- () => import("@/components/market/DynamicPillsMultiplier.vue")
- ),
},
};
diff --git a/src/components/market/MarketHead.vue b/src/components/market/MarketHead.vue
index d22d44c72..4722c1c2f 100644
--- a/src/components/market/MarketHead.vue
+++ b/src/components/market/MarketHead.vue
@@ -134,7 +134,6 @@ export default {
potionText() {
if (this.cauldron.config.cauldronSettings.hasElixirPotions)
return "Earning Elixir Potions";
- if (this.cauldron.config.cauldronSettings.isUSD0) return "Earning Pills";
return "";
},
diff --git a/src/components/pools/PoolListCard.vue b/src/components/pools/PoolListCard.vue
index 4b6ff4047..189a81976 100644
--- a/src/components/pools/PoolListCard.vue
+++ b/src/components/pools/PoolListCard.vue
@@ -128,23 +128,6 @@
5x Multiplier
-
-
-
-
-
- Rewards
-
-
-
-
-
1x Multiplier
-
-
@@ -242,10 +225,6 @@ export default {
isElixir() {
return this.pool.config.id === 1 && this.pool.config.chainId === 1;
},
-
- isPillsPotions() {
- return this.pool.config.id === 2 && this.pool.config.chainId === 1;
- },
},
methods: {
diff --git a/src/components/pools/pool/PillsPotions.vue b/src/components/pools/pool/PillsPotions.vue
deleted file mode 100644
index 7df0bae15..000000000
--- a/src/components/pools/pool/PillsPotions.vue
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/components/pools/pool/TokenPair.vue b/src/components/pools/pool/TokenPair.vue
index d91efbbda..ccdd371f9 100644
--- a/src/components/pools/pool/TokenPair.vue
+++ b/src/components/pools/pool/TokenPair.vue
@@ -26,10 +26,6 @@
{{ pool.name }}
-
-
-
1x Multiplier
-
Deprecated
@@ -92,12 +88,6 @@ export default {
quoteTokenConfig() {
return this.pool.tokens.quoteToken.config;
},
-
- isPillsLabel() {
- return (
- this.pool.config.settings.rewardPointsType === "pills" && this.isLabal
- );
- },
},
methods: { getChainIcon },
@@ -164,31 +154,4 @@ export default {
text-align: start;
min-width: 110px;
}
-
-.pills-wrap {
- border-radius: 33px;
- border: 1px solid var(--Primary-Gradient, #2d4a96);
- background: linear-gradient(90deg, #1c2b53 0%, #303063 100%),
- linear-gradient(
- 90deg,
- rgba(45, 74, 150, 0.12) 0%,
- rgba(116, 92, 210, 0.12) 100%
- );
- display: flex;
- padding: 2px 5px;
- align-items: flex-start;
- gap: 4px;
-
- font-size: 14px;
- font-style: normal;
- font-weight: 500;
- line-height: normal;
- min-width: 120px;
-}
-
-@media screen and (max-width: 600px) {
- .pills-wrap {
- display: none;
- }
-}
diff --git a/src/components/pools/pool/position/Deposited.vue b/src/components/pools/pool/position/Deposited.vue
index 34ceef710..c6bd8e444 100644
--- a/src/components/pools/pool/position/Deposited.vue
+++ b/src/components/pools/pool/position/Deposited.vue
@@ -159,7 +159,6 @@ export default {
},
rewardTitle() {
- if (this.rewardPointsType === "pills") return "Earning Rewards";
return "Staking Rewards";
},
},
@@ -292,41 +291,4 @@ export default {
font-weight: 600;
text-shadow: 0px 0px 16px #ab5de8;
}
-
-.pills-rewards {
- gap: 8px;
- display: flex;
- flex-direction: column;
- color: #fff;
-}
-
-.pills-title {
- font-size: 18px;
- font-weight: 500;
- line-height: normal;
-}
-
-.pills-row {
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: linear-gradient(270deg, #915eff -3.8%, #d040c6 100%);
- background-clip: text;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- text-align: center;
- font-weight: 500;
- line-height: normal;
-}
-
-.pills-icon-wrap {
- gap: 4px;
- display: flex;
- align-items: center;
-}
-
-.pills-icon {
- width: 24px;
- height: 24px;
-}
diff --git a/src/components/pools/rewardPoints/RewardPointsTagWrap.vue b/src/components/pools/rewardPoints/RewardPointsTagWrap.vue
index d7e6b897b..1d61c9a04 100644
--- a/src/components/pools/rewardPoints/RewardPointsTagWrap.vue
+++ b/src/components/pools/rewardPoints/RewardPointsTagWrap.vue
@@ -7,13 +7,6 @@
:card="card"
v-if="rewardPointsType === RewardPointsTypes.Elixir"
/>
-
@@ -41,9 +34,6 @@ export default {
ElixirRewardTag: defineAsyncComponent(
() => import("@/components/pools/rewardPoints/elixir/ElixirRewardTag.vue")
),
- PillsRewardTag: defineAsyncComponent(
- () => import("@/components/pools/rewardPoints/pills/PillsRewardTag.vue")
- ),
},
};
diff --git a/src/components/pools/rewardPoints/pills/PillsBanner.vue b/src/components/pools/rewardPoints/pills/PillsBanner.vue
deleted file mode 100644
index eac1fc742..000000000
--- a/src/components/pools/rewardPoints/pills/PillsBanner.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
- Stake to Earn Pills Potions
- 1x Multiplier
-
-
-
-
-
-
diff --git a/src/components/pools/rewardPoints/pills/PillsRewardTag.vue b/src/components/pools/rewardPoints/pills/PillsRewardTag.vue
deleted file mode 100644
index 89efc464a..000000000
--- a/src/components/pools/rewardPoints/pills/PillsRewardTag.vue
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
- Pills
- 1x
-
-
Multiplier
-
1x Multiplier
-
-
-
-
-
-
diff --git a/src/configs/pools/ethereumPools.ts b/src/configs/pools/ethereumPools.ts
index 234345d75..fac4c3e6a 100644
--- a/src/configs/pools/ethereumPools.ts
+++ b/src/configs/pools/ethereumPools.ts
@@ -87,7 +87,6 @@ const ethereumPools: Array = [
isNew: false,
isDeprecated: false,
isMim: true,
- rewardPointsType: RewardPointsTypes.Pills,
},
initialParameters: {
I: 1000000000000000000n,
diff --git a/src/configs/pools/types.ts b/src/configs/pools/types.ts
index 281439c2d..31ee4cb5d 100644
--- a/src/configs/pools/types.ts
+++ b/src/configs/pools/types.ts
@@ -60,5 +60,4 @@ export type TokenConfig = {
export enum RewardPointsTypes {
Elixir = "elixir",
- Pills = "pills",
}
diff --git a/src/helpers/collateralsApy/getUsd0ppApy.ts b/src/helpers/collateralsApy/getUsd0ppApy.ts
new file mode 100644
index 000000000..afea91893
--- /dev/null
+++ b/src/helpers/collateralsApy/getUsd0ppApy.ts
@@ -0,0 +1,54 @@
+import axios from "axios";
+import { formatToFixed } from "@/helpers/filters";
+import { getCoinsPrices } from "@/helpers/prices/defiLlama";
+import { mainnet } from "viem/chains";
+import { type Address, formatEther, type PublicClient, parseAbi } from "viem";
+import { getPublicClient } from "@/helpers/chains/getChainsInfo";
+
+const usualAddress =
+ "0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E" as const satisfies Address;
+const usd0ppAddress = "0x35D8949372D46B7a3D5A56006AE77B215fc69bC0" as const satisfies Address;
+const magicUsd0ppHarvesterAddress = "0x80014629Ca75441599A1efd2283E3f71A8EC0AAB" as const satisfies Address;
+
+const feeCollectableAbi = parseAbi(["function feeBips() view returns (uint256)"]);
+
+const usualChainId = mainnet.id;
+const endpoint = "https://api.0xdreamy.dev/functions/v1/usd0pp-rewards"; // Wraps https://app.usual.money/api/rewards/rates
+
+
+export const getUsd0ppApy = async (): Promise => {
+ try {
+ const [prices, { data }, feeBips] = await Promise.all([
+ getCoinsPrices(usualChainId, [usualAddress, usd0ppAddress]),
+ await axios.get(endpoint),
+ (getPublicClient(usualChainId) as PublicClient).readContract({
+ abi: feeCollectableAbi,
+ address: magicUsd0ppHarvesterAddress,
+ functionName: "feeBips",
+ }),
+ ]);
+
+ const usualPrice = prices?.[0]?.price;
+ const usd0ppPrice = prices?.[1]?.price;
+
+ if (usualPrice === undefined || usd0ppPrice === undefined) {
+ return 0;
+ }
+
+ const usd0ppUsualRewards = Number(
+ formatEther(BigInt(data?.["USD0++"] ?? "0")),
+ );
+
+ const apr = usd0ppUsualRewards * usualPrice / usd0ppPrice;
+ const aprWithFee = apr * (1 - Number(feeBips) / 10_000);
+
+ return Number(
+ formatToFixed(
+ ((1 + aprWithFee) ** 365 - 1) * 100,
+ 2,
+ ),
+ );
+ } catch (error) {
+ return 0;
+ }
+};
diff --git a/src/helpers/collateralsApy/index.js b/src/helpers/collateralsApy/index.js
index 6ac460033..8df549fe6 100644
--- a/src/helpers/collateralsApy/index.js
+++ b/src/helpers/collateralsApy/index.js
@@ -12,13 +12,14 @@ import { getMagicGlpApy } from "@/helpers/collateralsApy/getMagicGlpApy";
import { getMagicApeApy } from "@/helpers/collateralsApy/getMagicApeApy";
import { getYearnVaultsApy } from "@/helpers/collateralsApy/getYearnVaultsApy";
import { getMaxLeverageMultiplierAlternative } from "@/helpers/cauldron/getMaxLeverageMultiplier.ts";
+import { getUsd0ppApy } from "./getUsd0ppApy";
export const isApyCalcExist = (chainId, poolId) => {
let cauldronsIds = [];
if (chainId === 1) {
cauldronsIds = [
- 6, 7, 15, 16, 24, 25, 29, 30, 31, 32, 33, 34, 37, 38, 39, 43, 44,
+ 6, 7, 15, 16, 24, 25, 29, 30, 31, 32, 33, 34, 37, 38, 39, 43, 44, 45
];
}
@@ -57,6 +58,8 @@ export const fetchTokenApy = async (pool, chainId, provider) => {
if (pool.config.id === 39) return await getMagicApeApy(chainId);
if (pool.config.id === 43 || pool.config.id === 44) return getElixirApy();
+
+ if (pool.config.id === 45) return getUsd0ppApy();
}
if (chainId === 10) {
diff --git a/src/helpers/getTokenLinkData.ts b/src/helpers/getTokenLinkData.ts
index e536aad26..a0112fc6a 100644
--- a/src/helpers/getTokenLinkData.ts
+++ b/src/helpers/getTokenLinkData.ts
@@ -125,7 +125,7 @@ const configs = [
chain: 1,
href: "https://app.usual.money/",
label: "Get USD0++ Token",
- icon: useImage(`assets/images/pools/rewards/pills-icon.svg`),
+ icon: useImage(`assets/images/tokens/USD0pp.png`),
},
];