Skip to content

Commit 1315ff5

Browse files
authored
Merge pull request #73 from stabilitydao/dev-leaf
upd: stablejack market
2 parents 3069c9c + 62ed2d8 commit 1315ff5

File tree

8 files changed

+58
-15
lines changed

8 files changed

+58
-15
lines changed

components/new/markets/BaseActionForm.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const BaseActionForm = ({
106106
</div>
107107
</div>
108108
</div>
109-
{token.symbol !== "sbUSD" && (
109+
{!["sbUSD", "YT-scUSD"].includes(token.symbol) && (
110110
<div className="flex items-center justify-between">
111111
<div className="flex flex-col">
112112
<div className="font-semibold">Borrowed</div>
@@ -129,7 +129,7 @@ export const BaseActionForm = ({
129129
)}
130130
<div className="flex items-center justify-between transform translate-y-1">
131131
<span className="font-semibold">
132-
{token.symbol !== "sbUSD"
132+
{!["sbUSD", "YT-scUSD"].includes(token.symbol)
133133
? "Supply/Borrow rewards"
134134
: "Supply rewards"}
135135
</span>

components/new/markets/MarketModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export const InnerMarketModal = ({
406406
<DialogTitle className="flex">
407407
<ActiveTabSelector
408408
options={
409-
token.symbol === "sbUSD"
409+
["sbUSD", "YT-scUSD"].includes(token.symbol)
410410
? ["supply", "withdraw"]
411411
: ["supply", "withdraw", "borrow", "repay"]
412412
}

components/new/markets/MarketTable.tsx

+12-8
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,12 @@ const MarketLine = ({
273273
</div>
274274
) : (
275275
// Single line for non-paired tokens in green
276-
<div
277-
className={`flex flex-row gap-1 items-center ${
278-
token.symbol === "sbUSD" ? "" : "text-green-500"
279-
} `}
280-
>
281-
{token.symbol === "sbUSD" ? <span>0%</span> : <span>{baseAPR}%</span>}
276+
<div className="flex flex-row gap-1 items-center text-green-500">
277+
{["sbUSD", "YT-scUSD"].includes(token.symbol) ? (
278+
<span>{token.symbol === "sbUSD" ? "164" : "9.14"}%</span>
279+
) : (
280+
<span>{baseAPR}%</span>
281+
)}
282282
<ApyBreakdown
283283
breakdown={market.breakdown.supply}
284284
note={hasMerkl && <MerklNote />}
@@ -365,10 +365,14 @@ const MarketLine = ({
365365
<TableCell>{supplyInfo}</TableCell>
366366
<TableCell>{supplyAPR}</TableCell>
367367
<TableCell>
368-
{token.pair || token.symbol === "sbUSD" ? null : borrowInfo}
368+
{token.pair || ["sbUSD", "YT-scUSD"].includes(token.symbol)
369+
? null
370+
: borrowInfo}
369371
</TableCell>
370372
<TableCell>
371-
{token.pair || token.symbol === "sbUSD" ? null : borrowAPR}
373+
{token.pair || ["sbUSD", "YT-scUSD"].includes(token.symbol)
374+
? null
375+
: borrowAPR}
372376
</TableCell>
373377
{/* {withVault && (
374378
<TableCell>

constants/markets.ts

+31-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { HealthBarDefinition, MarketDefinition } from "@/types";
22
import { sonic } from "viem/chains";
3-
import { USDCe, wETH, USDT, wOS, stS, scUSD, S, sbUSD } from "@/constants";
3+
import {
4+
USDCe,
5+
wETH,
6+
USDT,
7+
wOS,
8+
stS,
9+
scUSD,
10+
S,
11+
sbUSD,
12+
YTscUSD,
13+
} from "@/constants";
414

515
const subMarketHealthBar = new HealthBarDefinition(
616
[1.03, 1.07, 1.12, 2],
@@ -18,6 +28,9 @@ export const LEGACY_MARKET_DEFINITIONS: {
1828
brunch: {
1929
name: "Brunch Market",
2030
},
31+
stablejack: {
32+
name: "Stablejack Market",
33+
},
2134
};
2235

2336
export const MARKET_DEFINITIONS: {
@@ -55,6 +68,23 @@ export const MARKET_DEFINITIONS: {
5568
chainId: sonic.id,
5669
healthBar: subMarketHealthBar,
5770
},
71+
stablejack: {
72+
id: 2,
73+
name: "Stablejack Market",
74+
description: "",
75+
tokens: [YTscUSD, USDCe, scUSD],
76+
POOL_ADDRESS_PROVIDER: "0x3E3aAB589Ba86fB8f40CEB69332bb44E9B1411D4",
77+
AAVE_POOL: "0x4895151C8eB560c0DE6Bd29A3916610DdfCEB094",
78+
NATIVE_TOKEN_GATEWAY: "0x1528CF6A8Cf43399114F92802de0ef0D13577418",
79+
LOOPING: {
80+
LOOPING_CONTRACT: "0x0",
81+
UNLOOPING_CONTRACT: "0x0",
82+
VAULTS: [],
83+
IO: [],
84+
},
85+
chainId: sonic.id,
86+
healthBar: subMarketHealthBar,
87+
},
5888
// stables: {
5989
// id: 2,
6090
// name: "Stable Market",

constants/tokens.ts

+9
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ export const scUSD = new Token({
139139
points: { sonic: "12", rings: "1.5" },
140140
});
141141

142+
export const YTscUSD = new Token({
143+
name: "StableJack scUSD YieldToken",
144+
symbol: "YT-scUSD",
145+
address: "0xd2901D474b351bC6eE7b119f9c920863B0F781b2",
146+
decimals: 18,
147+
icon: "/icons/coins/ytscusdc.png",
148+
chainId: sonic.id,
149+
});
150+
142151
export const sbUSD = new Token({
143152
name: "Staked bUSD",
144153
symbol: "sbUSD",

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lending-frontend",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",

public/icons/coins/ytscusdc.png

101 KB
Loading

0 commit comments

Comments
 (0)