Skip to content

Commit

Permalink
Add wsuperoethb-eth market on base (#4040)
Browse files Browse the repository at this point in the history
  • Loading branch information
piekczyk authored Oct 4, 2024
1 parent 05969b2 commit fac374f
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 16 deletions.
12 changes: 12 additions & 0 deletions blockchain/token-metadata-list/token-configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ import {
wld_circle_color,
woeth_circle_color,
wsteth_circle_color,
wsuperoethb,
xeth,
yfi_circle_color,
yieldbtc_circle_color,
Expand Down Expand Up @@ -936,6 +937,17 @@ export const tokenConfigs: TokenConfig[] = [
rootToken: 'ETH',
tags: [],
},
{
symbol: 'WSUPEROETHB',
precision: 18,
digits: 5,
name: 'Wrapped Super OETH',
icon: wsuperoethb,
iconCircle: wsuperoethb,
coinGeckoTicker: 'wrapped-super-oeth',
rootToken: 'ETH',
tags: [],
},
{
symbol: 'AJNA',
precision: 18,
Expand Down
1 change: 1 addition & 0 deletions blockchain/tokens/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ export const tokensBase = {
PRIME: contractDesc(erc20, base.common.PRIME),
EZETH: contractDesc(erc20, base.common.EZETH),
BSDETH: contractDesc(erc20, base.common.BSDETH),
WSUPEROETHB: contractDesc(erc20, base.common.WSUPEROETHB),
} as Record<string, ContractDesc>
11 changes: 6 additions & 5 deletions features/omni-kit/helpers/isYieldLoopPair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface IsYieldLoopPairParams {
}

export const yieldLoopDefinition = {
// its a eth yield loop if both the collateral and debt token are on this list
// it's a eth yield loop if both the collateral and debt token are on this list
ethYieldTokens: [
'CBETH',
'RETH',
Expand All @@ -26,9 +26,10 @@ export const yieldLoopDefinition = {
'BSDETH',
'RSETH',
'RSWETH',
'WSUPEROETHB',
],
btcYieldTokens: ['WBTC', 'SWBTC', 'TBTC', 'LBTC'],
// its a stable coin yield loop if both the collateral and debt token are on this list
// it's a stable coin yield loop if both the collateral and debt token are on this list
stableCoinYieldTokens: [
'SUSDE',
'SDAI',
Expand Down Expand Up @@ -62,13 +63,13 @@ export const isYieldLoopPair = (pair: IsYieldLoopPairParams) => {
const { ethYieldTokens, stableCoinYieldTokens, btcYieldTokens } = yieldLoopDefinition

return (
// its an eth yield loop
// it's an eth yield loop
(ethYieldTokens.includes(collateralToken.toLocaleUpperCase()) &&
ethYieldTokens.includes(debtToken.toLocaleUpperCase())) ||
// its an btc yield loop
// it's an btc yield loop
(btcYieldTokens.includes(collateralToken.toLocaleUpperCase()) &&
btcYieldTokens.includes(debtToken.toLocaleUpperCase())) ||
// its a stable coin yield loop
// it's a stable coin yield loop
(stableCoinYieldTokens.includes(collateralToken.toLocaleUpperCase()) &&
stableCoinYieldTokens.includes(debtToken.toLocaleUpperCase()))
)
Expand Down
13 changes: 12 additions & 1 deletion features/omni-kit/protocols/morpho-blue/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const morphoMarkets: NetworkIdsWithValues<{ [key: string]: string[] }> =
'EZETH-USDC': ['0xf24417ee06adc0b0836cf0dbec3ba56c1059f62f53a55990a38356d42fa75fa2'],
'EZETH-ETH': ['0xdf13c46bf7bd41597f27e32ae9c306eb63859c134073cb81c796ff20b520c7cf'],
'BSDETH-ETH': ['0xdf6aa0df4eb647966018f324db97aea09d2a7dde0d3c0a72115e8b20d58ea81f'],
'WSUPEROETHB-ETH': ['0x144bf18d6bf4c59602548a825034f73bf1d20177fc5f975fc69d5a5eba929b45'],
},
}

Expand Down Expand Up @@ -100,7 +101,17 @@ export const settings: OmniProtocolSettings = {
'SWBTC',
'RSWETH',
],
[NetworkIds.BASEMAINNET]: ['DAI', 'ETH', 'USDC', 'WBTC', 'WEETH', 'WSTETH', 'CBETH', 'BSDETH'],
[NetworkIds.BASEMAINNET]: [
'DAI',
'ETH',
'USDC',
'WBTC',
'WEETH',
'WSTETH',
'CBETH',
'BSDETH',
'WSUPEROETHB',
],
},
steps: {
borrow: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"@lifi/wallet-management": "^2.6.1",
"@lifi/widget": "^2.10.2",
"@metamask/eth-sig-util": "^5.0.2",
"@oasisdex/addresses": "0.1.79",
"@oasisdex/addresses": "0.1.80",
"@oasisdex/automation": "1.6.5-morpho.6",
"@oasisdex/dma-library": "0.6.65",
"@oasisdex/dma-library": "0.6.66",
"@oasisdex/multiply": "^0.2.11",
"@oasisdex/transactions": "0.1.4-alpha.0",
"@oasisdex/utils": "^0.0.8",
Expand Down
1 change: 1 addition & 0 deletions theme/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,4 @@ export { youtube } from './youtube'
export { zerox } from './zerox'
export { zerox_circle_color } from './zeroX_circle_color'
export { zerox_color } from './zerox_color'
export { wsuperoethb } from 'theme/icons/wsuperoethb'
54 changes: 54 additions & 0 deletions theme/icons/wsuperoethb.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from 'react'
export const wsuperoethb = {
path: (
<>
<circle
cx="13"
cy="13"
r="13"
transform="matrix(0.258819 0.965926 0.965926 -0.258819 0.905762 6.7334)"
fill="url(#paint0_linear_15322_4821)"
/>
<path
opacity="0.2"
d="M25.0647 23.9668C29.4993 19.5323 29.4993 12.3425 25.0647 7.90795C25.0647 7.90795 21.4698 11.5028 17.0353 15.9374C12.6008 20.3719 9.00588 23.9668 9.00588 23.9668C9.00588 23.9668 16.7241 31.685 25.0647 23.9668Z"
fill="#D9D9D9"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M16.7149 23.2954C12.7112 23.2251 9.4873 19.9576 9.4873 15.9371C9.4873 12.1857 12.294 9.08994 15.922 8.63509L17.3654 10.8868C17.1949 10.8695 17.0219 10.8606 16.8468 10.8606C14.0432 10.8606 11.7704 13.1334 11.7704 15.9371C11.7704 18.1043 13.1285 19.9543 15.04 20.6825L16.7149 23.2954ZM16.3459 20.9891C16.5107 21.0052 16.6778 21.0135 16.8468 21.0135C19.6504 21.0135 21.9232 18.7407 21.9232 15.9371C21.9232 13.7782 20.5756 11.934 18.6756 11.2L16.9955 8.57902C20.9914 8.6582 24.2063 11.9222 24.2063 15.9371C24.2063 19.6831 21.4075 22.7754 17.787 23.2371L16.3459 20.9891Z"
fill="white"
/>
<path
d="M16.7661 21.6328L13.1155 15.9344L16.7661 13.6664L20.6836 15.9344L16.7661 21.6328Z"
fill="#EDEFFD"
/>
<path
d="M20.3964 15.1249L16.7661 13.0256L13.2173 15.1249L16.7661 9.97118L20.3964 15.1249Z"
fill="#EDEFFD"
/>
<path d="M16.7248 9.92003L16.772 13.0259L13.2419 15.1113L16.7248 9.92003Z" fill="white" />
<path d="M16.7659 16.9785L13.1255 15.9537L16.7659 13.6659L16.7659 16.9785Z" fill="#DDDFFB" />
<path d="M16.7665 16.9785L20.6782 15.9337L16.7665 13.6719L16.7665 16.9785Z" fill="#EDEFFD" />
<path d="M16.7637 16.9771L16.7638 21.6745L20.6818 15.9351L16.7637 16.9771Z" fill="white" />
<defs>
<linearGradient
id="paint0_linear_15322_4821"
x1="13"
y1="0"
x2="13"
y2="28.9743"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#3985F7" />
<stop offset="0.397116" stopColor="#6B47F9" />
<stop offset="0.52715" stopColor="#8E3FAC" />
<stop offset="0.771456" stopColor="#C75043" />
<stop offset="1" stopColor="#C74F42" />
</linearGradient>
</defs>
</>
),
viewBox: '0 0 32 32',
}
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2502,10 +2502,10 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@oasisdex/addresses@0.1.79":
version "0.1.79"
resolved "https://registry.yarnpkg.com/@oasisdex/addresses/-/addresses-0.1.79.tgz#aa8734171b0550290a998a63a4a9234a8bf83722"
integrity sha512-8CjfUjM8rqmKaiRm0/vHoakV5jia/bCD6khJeP9JijzeHw84h0NrwrQCYv5ALse/gwUzcg5Mr+THJwL/aerDyg==
"@oasisdex/addresses@0.1.80":
version "0.1.80"
resolved "https://registry.yarnpkg.com/@oasisdex/addresses/-/addresses-0.1.80.tgz#235ad8f8d743f10bef0381e424d64d6689b304b3"
integrity sha512-0zd9QaBamrJ2ssC2OBvAvuQMf1DKhRwZ9GE8dvuwXxN3Ec9T9kJE15porBIjeyF5+W+Bt0nacp0ek2pZtYb+3w==

"@oasisdex/automation@1.6.5-morpho.6":
version "1.6.5-morpho.6"
Expand All @@ -2514,10 +2514,10 @@
dependencies:
ethers "^5.6.2"

"@oasisdex/dma-library@0.6.65":
version "0.6.65"
resolved "https://registry.yarnpkg.com/@oasisdex/dma-library/-/dma-library-0.6.65.tgz#5970feb6d9a5d372c65bec9caa9ab194523b0a83"
integrity sha512-tx8xp6gopVnJl9I8AiV734STHAiRfmRakRYuL2M/UM02kuZRKGj2cBHl2bUIPoZ4vRf0mD8Prl4sBvPkVYC/VA==
"@oasisdex/dma-library@0.6.66":
version "0.6.66"
resolved "https://registry.yarnpkg.com/@oasisdex/dma-library/-/dma-library-0.6.66.tgz#711b79bbf90d8f512e3ed718ea5529ecde1e5512"
integrity sha512-x5fOVklFa19j971WcImZkheIVzqCRflhDpthXFIaJqJDDCWdxRlobq3G4s8iuziuL0ch1lmSXyqrU8To2VRCAA==
dependencies:
bignumber.js "9.0.1"
ethers "^5.7.2"
Expand Down

0 comments on commit fac374f

Please sign in to comment.