From f6e5ea293f893a6435ece307e8d1a0c8c6aba751 Mon Sep 17 00:00:00 2001 From: Alien Deployer Date: Thu, 19 Sep 2024 00:46:54 +0300 Subject: [PATCH] 0.12.3: strategy baseStrategies, sourceCode, ammAdapter --- README.md | 68 +++++------------------------------------------ package.json | 2 +- src/strategies.ts | 59 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 20d0903..b45dcbb 100644 --- a/README.md +++ b/README.md @@ -38,21 +38,13 @@ Comprehensive information about platform strategies for managing DeFi assets. In #### Types -```typescript -type Strategy = { - id: string - shortId: StrategyShortId - state: StrategyState - contractGithubId: number - color: string - bgColor: string -} -``` +* `Strategy` #### Enums * `const enum StrategyShortId` * `enum StrategyState` +* `enum BaseStrategy` #### Constants @@ -76,21 +68,7 @@ console.log('Platform address on Polygon', deployments["137"].core.platform) #### Types -```typescript -type Deployment = { - core: { - platform: `0x${string}`, - factory: `0x${string}`, - priceReader: `0x${string}`, - swapper: `0x${string}`, - hardWorker: `0x${string}`, - vaultManager: `0x${string}`, - strategyLogic: `0x${string}`, - zap: `0x${string}`, - }, - subgraph: string, -} -``` +* `Deployment` #### Constants @@ -102,13 +80,7 @@ Blockchains known to the platform and their integration statuses. #### Types -```typescript -type Network = { - id: NetworkId, - chainId: number | string, - status: NetworkStatus, -} -``` +* `Network` #### Enums @@ -130,26 +102,8 @@ DeFi organizations, protocols, their integration statuses, usage and other infor #### Types -```typescript -export type DeFiOrganization = { - name: string - img: string - website: string - protocols: { [protocolId: string]: DeFiProtocol } - defiLlama: string - github?: string -} - -type DeFiProtocol = { - name: string - category: DefiCategory - networks: NetworkId[], - strategies?: StrategyShortId[] - intermediaryStrategies?: StrategyShortId[] - adapters?: string[] - coreContracts?: string[] -} -``` +* `DeFiOrganization` +* `DeFiProtocol` #### Enums @@ -178,15 +132,7 @@ Asset addresses, description, website, color. #### Types -```typescript -type Asset = { - addresses: {[chainId:string]: `0x${string}`|`0x${string}`[]}, - symbol: string, - description: string, - website: string, - color: string, -} -``` +* `Asset` #### Constants diff --git a/package.json b/package.json index addc5bb..b4fe6c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stabilitydao/stability", - "version": "0.12.2", + "version": "0.12.3", "description": "Stability Integration Library", "main": "out/index.js", "types": "out/index.d.ts", diff --git a/src/strategies.ts b/src/strategies.ts index 3a0722e..41ec40c 100644 --- a/src/strategies.ts +++ b/src/strategies.ts @@ -7,6 +7,9 @@ export type Strategy = { contractGithubId: number color: string bgColor: string + baseStrategies: BaseStrategy[] + sourceCode?: string + ammAdapter?: string } export const enum StrategyShortId { @@ -42,6 +45,14 @@ export enum StrategyState { LIVE = 'LIVE', } +export enum BaseStrategy { + FARMING = 'Farming', + LP = 'LP', + MERKL = 'Merkl', + ERC4626 = 'ERC4626', + LEVERAGED_LENDING = 'Leveraged Lending', +} + export const strategyStateDescription: {[state in StrategyState]: string} = { [StrategyState.PROPOSAL]: "The strategy described in free form is proposed for development", [StrategyState.POSSIBLE]: "Proposed strategy can be deployed at supported network", @@ -60,6 +71,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 101, color: "#558ac5", bgColor: "#000000", + sourceCode: 'QuickSwapStaticMerklFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: 'Algebra', }, [StrategyShortId.DQMF]: { id: 'DefiEdge QuickSwap Merkl Farm', @@ -68,6 +82,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 80, color: "#a5c2ff", bgColor: "#000000", + sourceCode: 'DefiEdgeQuickSwapMerklFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: 'Algebra', }, [StrategyShortId.IQMF]: { id: 'Ichi QuickSwap Merkl Farm', @@ -76,6 +93,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 81, color: "#965fff", bgColor: "#000000", + sourceCode: 'IchiQuickSwapMerklFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: 'Algebra', }, [StrategyShortId.GQMF]: { id: 'Gamma QuickSwap Merkl Farm', @@ -84,6 +104,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 90, color: "#de43ff", bgColor: "#140414", + sourceCode: 'GammaQuickSwapMerklFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: 'Algebra', }, [StrategyShortId.IRMF]: { id: 'Ichi Retro Merkl Farm', @@ -92,6 +115,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 95, color: "#28fffb", bgColor: "#000000", + sourceCode: 'IchiRetroMerklFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: "UniswapV3", }, [StrategyShortId.GRMF]: { id: 'Gamma Retro Merkl Farm', @@ -100,6 +126,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 99, color: "#ff0000", bgColor: "#000000", + sourceCode: 'GammaRetroMerklFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: "UniswapV3", }, [StrategyShortId.CF]: { id: 'Compound Farm', @@ -107,6 +136,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { state: StrategyState.LIVE, contractGithubId: 79, color: "#00d395", + sourceCode: 'CompoundFarmStrategy.sol', + baseStrategies: [BaseStrategy.FARMING,], bgColor: "#000000", }, [StrategyShortId.CCF]: { @@ -116,6 +147,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 110, color: "#dddddd", bgColor: "#000000", + sourceCode: 'CurveConvexFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.FARMING,], + ammAdapter: "Curve", }, [StrategyShortId.Y]: { id: 'Yearn', @@ -124,6 +158,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 114, color: "#dc568a", bgColor: "#000000", + sourceCode: 'YearnStrategy.sol', + baseStrategies: [BaseStrategy.ERC4626,], }, [StrategyShortId.SQMF]: { id: 'Steer QuickSwap Merkl Farm', @@ -132,6 +168,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 85, color: "#8587ff", bgColor: "#000000", + sourceCode: 'SteerQuickSwapMerklFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: 'Algebra', }, [StrategyShortId.GAF]: { id: 'Gyroscope Aura Farm', @@ -140,6 +179,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 121, color: "#f2fea6", bgColor: "#2e005f", + baseStrategies: [BaseStrategy.LP, BaseStrategy.FARMING,], + ammAdapter: 'Gyroscope', }, [StrategyShortId.RSBMF]: { id: 'Retro Static Boosted Merkl Farm', @@ -148,6 +189,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 122, color: "#ff0000", bgColor: "#420060", + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: "UniswapV3", }, [StrategyShortId.DRBMF]: { id: 'DefiEdge Retro Boosted Merkl Farm', @@ -156,6 +199,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 98, color: "#ff0000", bgColor: "#420060", + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: "UniswapV3", }, [StrategyShortId.IRBMF]: { id: 'Ichi Retro Boosted Merkl Farm', @@ -164,6 +209,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 91, color: "#e1d1ff", bgColor: "#420060", + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], + ammAdapter: "UniswapV3", }, [StrategyShortId.AS1BLS]: { id: 'Aave Stader 1inch Balancer', @@ -172,6 +219,7 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 127, color: "#07a658", bgColor: "#1a024d", + baseStrategies: [BaseStrategy.LEVERAGED_LENDING,], }, [StrategyShortId.GUMF]: { id: 'Gamma UniswapV3 Merkl Farm', @@ -180,6 +228,9 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 145, color: "#ff0000", bgColor: "#000000", + ammAdapter: "UniswapV3", + sourceCode: 'GammaUniswapV3MerklFarmStrategy.sol', + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], }, [StrategyShortId.CUMF]: { id: 'Charm UniswapV3 Merkl Farm', @@ -188,6 +239,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 144, color: "#ff2299", bgColor: "#000000", + ammAdapter: "UniswapV3", + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], }, [StrategyShortId.CBMF]: { id: 'Charm BaseSwap Merkl Farm', @@ -196,6 +249,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 148, color: "#2238ff", bgColor: "#000000", + ammAdapter: "UniswapV3", + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], }, [StrategyShortId.ABMF]: { id: 'A51 BaseSwap Merkl Farm', @@ -204,6 +259,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 147, color: "#e74c3c", bgColor: "#000000", + ammAdapter: "UniswapV3", + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], }, [StrategyShortId.BSMF]: { id: 'Beefy Sushi Merkl Farm', @@ -212,6 +269,8 @@ export const strategies: {[shortId in StrategyShortId]:Strategy} = { contractGithubId: 166, color: '#ffffff', bgColor: '#21243a', + ammAdapter: "UniswapV3", + baseStrategies: [BaseStrategy.LP, BaseStrategy.MERKL, BaseStrategy.FARMING,], }, };