Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.12.3: strategy baseStrategies, sourceCode, ammAdapter #19

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 7 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
59 changes: 59 additions & 0 deletions src/strategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export type Strategy = {
contractGithubId: number
color: string
bgColor: string
baseStrategies: BaseStrategy[]
sourceCode?: string
ammAdapter?: string
}

export const enum StrategyShortId {
Expand Down Expand Up @@ -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",
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -100,13 +126,18 @@ 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',
shortId: StrategyShortId.CF,
state: StrategyState.LIVE,
contractGithubId: 79,
color: "#00d395",
sourceCode: 'CompoundFarmStrategy.sol',
baseStrategies: [BaseStrategy.FARMING,],
bgColor: "#000000",
},
[StrategyShortId.CCF]: {
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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,],
},
};

Expand Down
Loading