Skip to content

Commit

Permalink
chore: add SUSD,USDC,USDC.E pairs on optimism with 0.02% fee (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
halaprix authored Apr 3, 2024
1 parent 8160b6c commit ce9f36a
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 5 deletions.
3 changes: 3 additions & 0 deletions actions/aave-like/get-addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ export function getAddresses(
if (networkId === NetworkIds.OPTIMISMMAINNET || networkId === NetworkIds.ARBITRUMMAINNET) {
sharedAddresses.tokens['USDC.E'] = contracts.tokens['USDC.E'].address
}
if (networkId === NetworkIds.OPTIMISMMAINNET) {
sharedAddresses.tokens.SUSD = contracts.tokens['SUSD'].address
}

switch (lendingProtocol) {
case LendingProtocol.AaveV2:
Expand Down
1 change: 1 addition & 0 deletions blockchain/tokens/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const tokensMainnet = {
STETH: contractDesc(erc20, mainnet.common.STETH),
STYETH: contractDesc(erc20, mainnet.common.STYETH),
SUSDE: contractDesc(erc20, mainnet.common.SUSDE),
SUSD: contractDesc(erc20, mainnet.common.SUSD),
USDE: contractDesc(erc20, mainnet.common.USDE),
TBTC: contractDesc(erc20, mainnet.common.TBTC),
USDC: contractDesc(erc20, mainnet.common.USDC),
Expand Down
1 change: 1 addition & 0 deletions blockchain/tokens/optimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const tokensOptimism = {
RETH: contractDesc(erc20, optimism.common.RETH),
RENBTC: contractDesc(erc20, optimism.common.RENBTC),
SDAI: contractDesc(erc20, optimism.common.SDAI),
SUSD: contractDesc(erc20, optimism.common.SUSD),
STETH: contractDesc(erc20, optimism.common.STETH),
STYETH: contractDesc(erc20, optimism.common.STYETH),
TBTC: contractDesc(erc20, optimism.common.TBTC),
Expand Down
50 changes: 50 additions & 0 deletions features/aave/strategies/optimism-aave-v3-strategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,56 @@ const availableTokenPairs: TokenPairConfig[] = [
},
},
},
{
collateral: 'USDC',
debt: 'SUSD',
strategyType: StrategyType.Long,
productTypes: {
[ProductType.Borrow]: {
featureToggle: FeaturesEnum.AaveV3OptimismBorrow,
additionalManageActions: [
{
action: 'switch-to-multiply',
featureToggle: undefined,
},
],
},
[ProductType.Multiply]: {
featureToggle: undefined,
additionalManageActions: [
{
action: 'switch-to-borrow',
featureToggle: FeaturesEnum.AaveV3OptimismBorrow,
},
],
},
},
},
{
collateral: 'USDC.E',
debt: 'SUSD',
strategyType: StrategyType.Long,
productTypes: {
[ProductType.Borrow]: {
featureToggle: FeaturesEnum.AaveV3OptimismBorrow,
additionalManageActions: [
{
action: 'switch-to-multiply',
featureToggle: undefined,
},
],
},
[ProductType.Multiply]: {
featureToggle: undefined,
additionalManageActions: [
{
action: 'switch-to-borrow',
featureToggle: FeaturesEnum.AaveV3OptimismBorrow,
},
],
},
},
},
{
collateral: 'WSTETH',
debt: 'USDC',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ const aaveSeed: AaveProductHubItemSeed[] = [
strategyType: 'short',
types: ['borrow', 'multiply'],
},
{
collateral: 'USDC',
debt: 'SUSD',
strategyType: 'long',
types: ['borrow', 'multiply', 'earn'],
},
{
collateral: 'USDC.E',
debt: 'SUSD',
strategyType: 'long',
types: ['borrow', 'multiply', 'earn'],
},
]

const borrowProducts = aaveSeed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@metamask/eth-sig-util": "^5.0.2",
"@oasisdex/addresses": "0.1.54",
"@oasisdex/automation": "1.6.5",
"@oasisdex/dma-library": "0.6.49",
"@oasisdex/dma-library": "0.6.50",
"@oasisdex/multiply": "^0.2.11",
"@oasisdex/transactions": "0.1.4-alpha.0",
"@oasisdex/utils": "^0.0.8",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2425,10 +2425,10 @@
dependencies:
ethers "^5.6.2"

"@oasisdex/[email protected].49":
version "0.6.49"
resolved "https://registry.yarnpkg.com/@oasisdex/dma-library/-/dma-library-0.6.49.tgz#d3870e638774bf3a8b259afb26535c63c223f369"
integrity sha512-Alyx09r+KgXnej7RZrWD8w1tk3B3YgwMCrjdLRtRiRTYcQ9IRlMJ5PR3TspAu6tmvbdWM/4pZFf3AbvXcRDQtA==
"@oasisdex/[email protected].50":
version "0.6.50"
resolved "https://registry.yarnpkg.com/@oasisdex/dma-library/-/dma-library-0.6.50.tgz#c0e6fe0fe154430d6b95b5b3f9321d627b4770d2"
integrity sha512-KyL69i0wz1sS689NNQCryJ2gHBP7BonUQ3/SmIJj4H06IXh8QbS/z7ciNSu5Rf9fZ99TL3ly3ZAP5lKLaOQX0A==
dependencies:
bignumber.js "9.0.1"
ethers "^5.7.2"
Expand Down

0 comments on commit ce9f36a

Please sign in to comment.