Skip to content

Commit aaeec74

Browse files
committed
Add CBBTC markets on Spark, Aave (ethereum + base) and Morpho Blue (ethereum + base)
1 parent 37be626 commit aaeec74

File tree

16 files changed

+303
-4
lines changed

16 files changed

+303
-4
lines changed

actions/aave-like/get-addresses.ts

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export function getAddresses(
5050
'WBTC',
5151
'WSTETH',
5252
'CBETH',
53+
'CBBTC',
5354
'RETH',
5455
'STETH',
5556
'WEETH',
@@ -71,6 +72,7 @@ export function getAddresses(
7172
WBTC: contracts.tokens['WBTC'].address,
7273
WSTETH: contracts.tokens['WSTETH'].address,
7374
CBETH: contracts.tokens['CBETH'].address,
75+
CBBTC: contracts.tokens['CBBTC'].address,
7476
RETH: contracts.tokens['RETH'].address,
7577
STETH: contracts.tokens['STETH'].address,
7678
GHO: contracts.tokens['GHO'].address,

blockchain/token-metadata-list/token-configs.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
bat,
1212
bat_circle_color,
1313
bsdeth_circle_color,
14+
cbbtc_circle_color,
1415
cbeth_circle_color,
1516
chainlink,
1617
chainlink_circle_color,
@@ -396,12 +397,28 @@ export const tokenConfigs: TokenConfig[] = [
396397
//TODO: replace with values provided by design team - so far content is duplicated from ETH
397398
color: '#667FE3',
398399
background: 'linear-gradient(160.47deg, #F0F3FD 0.35%, #FCF0FD 99.18%), #FFFFFF',
399-
coinbaseTicker: 'cbeth-usd',
400400
coinGeckoTicker: 'coinbase-wrapped-staked-eth',
401401
coinpaprikaTicker: 'cbeth-coinbase-wrapped-staked-eth',
402402
rootToken: 'ETH',
403403
tags: [],
404404
},
405+
{
406+
symbol: 'CBBTC',
407+
precision: 8,
408+
digits: 5,
409+
digitsInstant: 2,
410+
name: 'Coinbase Wrapped BTC',
411+
icon: cbbtc_circle_color,
412+
iconCircle: cbbtc_circle_color,
413+
//TODO: replace with values provided by design team - so far content is duplicated from ETH
414+
color: '#667FE3',
415+
background: 'linear-gradient(160.47deg, #F0F3FD 0.35%, #FCF0FD 99.18%), #FFFFFF',
416+
coinbaseTicker: 'cbeth-usd',
417+
coinGeckoTicker: 'coinbase-wrapped-btc',
418+
coinpaprikaTicker: 'cbbtc-coinbase-wrapped-btc',
419+
rootToken: 'ETH',
420+
tags: [],
421+
},
405422
{
406423
symbol: 'BSDETH',
407424
precision: 18,

blockchain/tokens/arbitrum.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ADDRESSES } from '@oasisdex/addresses'
1+
import { ADDRESS_ZERO, ADDRESSES } from '@oasisdex/addresses'
22
import * as erc20 from 'blockchain/abi/erc20.json'
33
import { contractDesc } from 'blockchain/networks'
44
import type { ContractDesc } from 'features/web3Context'
@@ -12,6 +12,7 @@ export const tokensArbitrum = {
1212
ETH_ACTUAL: contractDesc(erc20, arbitrum.common.ETH),
1313
ARB: contractDesc(erc20, arbitrum.common.ARB),
1414
CBETH: contractDesc(erc20, arbitrum.common.CBETH),
15+
CBBTC: contractDesc(erc20, ADDRESS_ZERO),
1516
DAI: contractDesc(erc20, arbitrum.common.DAI),
1617
FRAX: contractDesc(erc20, arbitrum.common.FRAX),
1718
GHO: contractDesc(erc20, arbitrum.common.GHO),

blockchain/tokens/base.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const tokensBase = {
99
ETH: contractDesc(erc20, base.common.WETH),
1010
ETH_ACTUAL: contractDesc(erc20, base.common.ETH),
1111
CBETH: contractDesc(erc20, base.common.CBETH),
12+
CBBTC: contractDesc(erc20, '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf'),
1213
DAI: contractDesc(erc20, base.common.DAI),
1314
FRAX: contractDesc(erc20, base.common.FRAX),
1415
GHO: contractDesc(erc20, base.common.GHO),

blockchain/tokens/goerli.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ADDRESSES } from '@oasisdex/addresses'
1+
import { ADDRESS_ZERO, ADDRESSES } from '@oasisdex/addresses'
22
import * as erc20 from 'blockchain/abi/erc20.json'
33
import * as guniToken from 'blockchain/abi/guni-token.json'
44
import { getCollateralTokens } from 'blockchain/addresses/addressesUtils'
@@ -16,6 +16,7 @@ const { goerli } = ADDRESSES
1616
export const tokensGoerli = {
1717
...getCollateralTokens({ ...goerli.maker.pips, ...goerli.common }, supportedIlks),
1818
CBETH: contractDesc(erc20, goerli.common.CBETH),
19+
CBBTC: contractDesc(erc20, ADDRESS_ZERO),
1920
DAI: contractDesc(erc20, goerli.common.DAI),
2021
GHO: contractDesc(erc20, goerli.common.GHO),
2122
GUNIV3DAIUSDC1: contractDesc(guniToken, goerli.common.GUNIV3DAIUSDC1),

blockchain/tokens/mainnet.ts

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export const tokensMainnet = {
5959
...getCollateralTokens({ ...mainnet.maker.pips, ...mainnet.common }, supportedIlks),
6060
AJNA: contractDesc(erc20, mainnet.common.AJNA),
6161
CBETH: contractDesc(erc20, mainnet.common.CBETH),
62+
CBBTC: contractDesc(erc20, '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf'),
6263
DAI: contractDesc(erc20, mainnet.common.DAI),
6364
ETH: contractDesc(erc20, mainnet.common.WETH),
6465
// See @oasisdex/addresses package for info

blockchain/tokens/optimism.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ADDRESSES } from '@oasisdex/addresses'
1+
import { ADDRESS_ZERO, ADDRESSES } from '@oasisdex/addresses'
22
import * as erc20 from 'blockchain/abi/erc20.json'
33
import { contractDesc } from 'blockchain/networks'
44
import type { ContractDesc } from 'features/web3Context'
@@ -11,6 +11,7 @@ const { optimism } = ADDRESSES
1111

1212
export const tokensOptimism = {
1313
CBETH: contractDesc(erc20, optimism.common.CBETH),
14+
CBBTC: contractDesc(erc20, ADDRESS_ZERO),
1415
ETH_ACTUAL: contractDesc(erc20, optimism.common.ETH),
1516
OP: contractDesc(erc20, optimism.common.OP),
1617
DAI: contractDesc(erc20, optimism.common.DAI),

features/aave/strategies/base-aave-v3-strategies.ts

+25
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@ import type { TokenPairConfig } from './common'
2323
import { hasBorrowProductType, hasEarnProductType, hasMultiplyProductType } from './common'
2424

2525
const availableTokenPairs: TokenPairConfig[] = [
26+
{
27+
collateral: 'CBBTC',
28+
debt: 'USDC',
29+
strategyType: StrategyType.Long,
30+
productTypes: {
31+
[ProductType.Multiply]: {
32+
featureToggle: undefined,
33+
additionalManageActions: [
34+
{
35+
action: 'switch-to-borrow',
36+
featureToggle: undefined,
37+
},
38+
],
39+
},
40+
[ProductType.Borrow]: {
41+
featureToggle: undefined,
42+
additionalManageActions: [
43+
{
44+
action: 'switch-to-multiply',
45+
featureToggle: undefined,
46+
},
47+
],
48+
},
49+
},
50+
},
2651
{
2752
collateral: 'CBETH',
2853
debt: 'USDBC',

features/aave/strategies/ethereum-aave-v3-strategies.ts

+75
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,81 @@ const availableTokenPairs: TokenPairConfig[] = [
404404
},
405405
},
406406
},
407+
{
408+
collateral: 'CBBTC',
409+
debt: 'DAI',
410+
strategyType: StrategyType.Long,
411+
productTypes: {
412+
[ProductType.Multiply]: {
413+
featureToggle: undefined,
414+
additionalManageActions: [
415+
{
416+
action: 'switch-to-borrow',
417+
featureToggle: undefined,
418+
},
419+
],
420+
},
421+
[ProductType.Borrow]: {
422+
featureToggle: undefined,
423+
additionalManageActions: [
424+
{
425+
action: 'switch-to-multiply',
426+
featureToggle: undefined,
427+
},
428+
],
429+
},
430+
},
431+
},
432+
{
433+
collateral: 'CBBTC',
434+
debt: 'USDC',
435+
strategyType: StrategyType.Long,
436+
productTypes: {
437+
[ProductType.Multiply]: {
438+
featureToggle: undefined,
439+
additionalManageActions: [
440+
{
441+
action: 'switch-to-borrow',
442+
featureToggle: undefined,
443+
},
444+
],
445+
},
446+
[ProductType.Borrow]: {
447+
featureToggle: undefined,
448+
additionalManageActions: [
449+
{
450+
action: 'switch-to-multiply',
451+
featureToggle: undefined,
452+
},
453+
],
454+
},
455+
},
456+
},
457+
{
458+
collateral: 'CBBTC',
459+
debt: 'USDT',
460+
strategyType: StrategyType.Long,
461+
productTypes: {
462+
[ProductType.Multiply]: {
463+
featureToggle: undefined,
464+
additionalManageActions: [
465+
{
466+
action: 'switch-to-borrow',
467+
featureToggle: undefined,
468+
},
469+
],
470+
},
471+
[ProductType.Borrow]: {
472+
featureToggle: undefined,
473+
additionalManageActions: [
474+
{
475+
action: 'switch-to-multiply',
476+
featureToggle: undefined,
477+
},
478+
],
479+
},
480+
},
481+
},
407482
{
408483
collateral: 'SDAI',
409484
debt: 'USDT',

features/aave/strategies/ethereum-spark-v3-strategies.ts

+75
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,81 @@ const availableTokenPairs: TokenPairConfig[] = [
5151
},
5252
},
5353
},
54+
{
55+
collateral: 'CBBTC',
56+
debt: 'DAI',
57+
strategyType: StrategyType.Long,
58+
productTypes: {
59+
[ProductType.Multiply]: {
60+
featureToggle: undefined,
61+
additionalManageActions: [
62+
{
63+
action: 'switch-to-borrow',
64+
featureToggle: undefined,
65+
},
66+
],
67+
},
68+
[ProductType.Borrow]: {
69+
featureToggle: undefined,
70+
additionalManageActions: [
71+
{
72+
action: 'switch-to-multiply',
73+
featureToggle: undefined,
74+
},
75+
],
76+
},
77+
},
78+
},
79+
{
80+
collateral: 'CBBTC',
81+
debt: 'USDC',
82+
strategyType: StrategyType.Long,
83+
productTypes: {
84+
[ProductType.Multiply]: {
85+
featureToggle: undefined,
86+
additionalManageActions: [
87+
{
88+
action: 'switch-to-borrow',
89+
featureToggle: undefined,
90+
},
91+
],
92+
},
93+
[ProductType.Borrow]: {
94+
featureToggle: undefined,
95+
additionalManageActions: [
96+
{
97+
action: 'switch-to-multiply',
98+
featureToggle: undefined,
99+
},
100+
],
101+
},
102+
},
103+
},
104+
{
105+
collateral: 'CBBTC',
106+
debt: 'USDT',
107+
strategyType: StrategyType.Long,
108+
productTypes: {
109+
[ProductType.Multiply]: {
110+
featureToggle: undefined,
111+
additionalManageActions: [
112+
{
113+
action: 'switch-to-borrow',
114+
featureToggle: undefined,
115+
},
116+
],
117+
},
118+
[ProductType.Borrow]: {
119+
featureToggle: undefined,
120+
additionalManageActions: [
121+
{
122+
action: 'switch-to-multiply',
123+
featureToggle: undefined,
124+
},
125+
],
126+
},
127+
},
128+
},
54129
{
55130
collateral: 'RETH',
56131
debt: 'DAI',

features/omni-kit/protocols/morpho-blue/settings.ts

+6
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export const morphoMarkets: NetworkIdsWithValues<{ [key: string]: string[] }> =
5151
'SWBTC-WBTC': ['0x514efda728a646dcafe4fdc9afe4ea214709e110ac1b2b78185ae00c1782cc82'],
5252
'RSWETH-ETH': ['0xcacd4c39af872ddecd48b650557ff5bcc7d3338194c0f5b2038e0d4dec5dc022'],
5353
'LBTC-WBTC': ['0xf6a056627a51e511ec7f48332421432ea6971fc148d8f3c451e14ea108026549'],
54+
'CBBTC-USDC': ['0x64d65c9a2d91c36d56fbc42d69e979335320169b3df63bf92789e2c8883fcc64'],
55+
'CBBTC-ETH': ['0x2cbfb38723a8d9a2ad1607015591a78cfe3a5949561b39bde42c242b22874ec0'],
5456
},
5557
[NetworkIds.BASEMAINNET]: {
5658
'ETH-USDC': ['0x8793cf302b8ffd655ab97bd1c695dbd967807e8367a65cb2f4edaf1380ba1bda'],
@@ -68,6 +70,8 @@ export const morphoMarkets: NetworkIdsWithValues<{ [key: string]: string[] }> =
6870
'EZETH-ETH': ['0xdf13c46bf7bd41597f27e32ae9c306eb63859c134073cb81c796ff20b520c7cf'],
6971
'BSDETH-ETH': ['0xdf6aa0df4eb647966018f324db97aea09d2a7dde0d3c0a72115e8b20d58ea81f'],
7072
'WSUPEROETHB-ETH': ['0x144bf18d6bf4c59602548a825034f73bf1d20177fc5f975fc69d5a5eba929b45'],
73+
'CBBTC-USDC': ['0x9103c3b4e834476c9a62ea009ba2c884ee42e94e6e314a26f04d312434191836'],
74+
'CBBTC-ETH': ['0x5dffffc7d75dc5abfa8dbe6fad9cbdadf6680cbe1428bafe661497520c84a94c'],
7175
},
7276
}
7377

@@ -85,6 +89,7 @@ export const settings: OmniProtocolSettings = {
8589
'ETH',
8690
'EZETH',
8791
'OSETH',
92+
'CBBTC',
8893
'RETH',
8994
'SDAI',
9095
'SUSDE',
@@ -105,6 +110,7 @@ export const settings: OmniProtocolSettings = {
105110
'DAI',
106111
'ETH',
107112
'USDC',
113+
'CBBTC',
108114
'WBTC',
109115
'WEETH',
110116
'WSTETH',

handlers/product-hub/update-handlers/aaveV3/aave-v3-products/base-mainnet.ts

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ const aaveSeed: AaveProductHubItemSeed[] = [
6161
strategyType: 'long',
6262
types: ['earn'],
6363
},
64+
{
65+
collateral: 'CBBTC',
66+
debt: 'USDC',
67+
strategyType: 'long',
68+
types: ['borrow', 'multiply'],
69+
},
6470
]
6571

6672
const borrowProducts = aaveSeed

handlers/product-hub/update-handlers/aaveV3/aave-v3-products/ethereum-mainnet.ts

+36
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,42 @@ export const aaveV3EthereumMainnetProductHubProducts: ProductHubItemWithoutAddre
8383
network: NetworkNames.ethereumMainnet,
8484
protocol: LendingProtocol.AaveV3,
8585
},
86+
{
87+
product: [OmniProductType.Multiply, OmniProductType.Borrow],
88+
primaryToken: 'CBBTC',
89+
primaryTokenGroup: 'BTC',
90+
secondaryToken: 'USDC',
91+
depositToken: 'CBBTC',
92+
network: NetworkNames.ethereumMainnet,
93+
protocol: LendingProtocol.AaveV3,
94+
label: 'CBBTC/USDC',
95+
multiplyStrategyType: 'long',
96+
multiplyStrategy: 'Long CBBTC',
97+
},
98+
{
99+
product: [OmniProductType.Multiply, OmniProductType.Borrow],
100+
primaryToken: 'CBBTC',
101+
primaryTokenGroup: 'BTC',
102+
secondaryToken: 'DAI',
103+
depositToken: 'CBBTC',
104+
network: NetworkNames.ethereumMainnet,
105+
protocol: LendingProtocol.AaveV3,
106+
label: 'CBBTC/DAI',
107+
multiplyStrategyType: 'long',
108+
multiplyStrategy: 'Long CBBTC',
109+
},
110+
{
111+
product: [OmniProductType.Multiply, OmniProductType.Borrow],
112+
primaryToken: 'CBBTC',
113+
primaryTokenGroup: 'BTC',
114+
secondaryToken: 'USDT',
115+
depositToken: 'CBBTC',
116+
network: NetworkNames.ethereumMainnet,
117+
protocol: LendingProtocol.AaveV3,
118+
label: 'CBBTC/USDT',
119+
multiplyStrategyType: 'long',
120+
multiplyStrategy: 'Long CBBTC',
121+
},
86122
{
87123
product: [OmniProductType.Multiply],
88124
primaryToken: 'CBETH',

0 commit comments

Comments
 (0)