@merkl/api 0.10.263 → 0.10.265
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/database/api/.generated/edge.js +6 -4
- package/dist/database/api/.generated/index-browser.js +3 -1
- package/dist/database/api/.generated/index.d.ts +3 -1
- package/dist/database/api/.generated/index.js +6 -4
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +2 -0
- package/dist/database/api/.generated/wasm.js +3 -1
- package/dist/database/api/seeder/resources/protocol.d.ts +7 -0
- package/dist/database/api/seeder/resources/protocol.js +1 -0
- package/dist/src/backgroundJobs/jobs/campaignsCacheUpdater.js +0 -4
- package/dist/src/eden/index.d.ts +15 -15
- package/dist/src/entities/opportunity.js +35 -0
- package/dist/src/index.d.ts +5 -5
- package/dist/src/libs/campaigns/campaignTypes/SILODynamicData.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/SILODynamicData.js +6 -4
- package/dist/src/libs/campaigns/campaignTypes/VestDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/VestDynamicData.js +61 -0
- package/dist/src/libs/campaigns/campaignsDynamicData.js +4 -0
- package/dist/src/libs/positions/prepareFetch.js +26 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +2 -2
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +3 -0
- package/dist/src/modules/v4/campaign/campaign.model.js +1 -0
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +3 -3
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +2 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +5 -5
- package/dist/src/modules/v4/opportunity/opportunity.service.js +16 -6
- package/dist/src/modules/v4/opportunity/subservices/getIonMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getIonMetadata.service.js +13 -0
- package/dist/src/modules/v4/opportunity/subservices/getVestMetaData.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getVestMetaData.js +10 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/router.d.ts +5 -5
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/eden/index.d.ts
CHANGED
@@ -125,7 +125,7 @@ declare const eden: {
|
|
125
125
|
} & {
|
126
126
|
price?: number | null | undefined;
|
127
127
|
})[];
|
128
|
-
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | undefined;
|
128
|
+
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
129
129
|
depositUrl: any;
|
130
130
|
tags: string[];
|
131
131
|
};
|
@@ -415,7 +415,7 @@ declare const eden: {
|
|
415
415
|
depositUrl?: string | undefined;
|
416
416
|
protocols?: string[] | undefined;
|
417
417
|
mainProtocol?: string | undefined;
|
418
|
-
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER";
|
418
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST";
|
419
419
|
tokens: {
|
420
420
|
chainId: number;
|
421
421
|
address: string;
|
@@ -468,6 +468,7 @@ declare const eden: {
|
|
468
468
|
fetch?: RequestInit | undefined;
|
469
469
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
470
470
|
200: {
|
471
|
+
apr: number;
|
471
472
|
aprRecord: {
|
472
473
|
cumulated: number;
|
473
474
|
timestamp: bigint;
|
@@ -552,7 +553,6 @@ declare const eden: {
|
|
552
553
|
chainId: number;
|
553
554
|
action: import("../../database/api/.generated").$Enums.OpportunityAction;
|
554
555
|
tvl: number;
|
555
|
-
apr: number;
|
556
556
|
dailyRewards: number;
|
557
557
|
}[];
|
558
558
|
}>>;
|
@@ -655,7 +655,7 @@ declare const eden: {
|
|
655
655
|
get: (options: {
|
656
656
|
headers?: Record<string, unknown> | undefined;
|
657
657
|
query: {
|
658
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
658
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
659
659
|
items?: number | undefined;
|
660
660
|
subType?: number | undefined;
|
661
661
|
page?: number | undefined;
|
@@ -724,7 +724,7 @@ declare const eden: {
|
|
724
724
|
get: (options: {
|
725
725
|
headers?: Record<string, unknown> | undefined;
|
726
726
|
query: {
|
727
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
727
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
728
728
|
items?: number | undefined;
|
729
729
|
subType?: number | undefined;
|
730
730
|
page?: number | undefined;
|
@@ -2954,7 +2954,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
2954
2954
|
depositUrl?: string | undefined;
|
2955
2955
|
protocols?: string[] | undefined;
|
2956
2956
|
mainProtocol?: string | undefined;
|
2957
|
-
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER";
|
2957
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST";
|
2958
2958
|
tokens: {
|
2959
2959
|
chainId: number;
|
2960
2960
|
address: string;
|
@@ -3023,7 +3023,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
3023
3023
|
} & {
|
3024
3024
|
price?: number | null | undefined;
|
3025
3025
|
})[];
|
3026
|
-
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | undefined;
|
3026
|
+
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
3027
3027
|
depositUrl: any;
|
3028
3028
|
tags: string[];
|
3029
3029
|
};
|
@@ -3056,6 +3056,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
3056
3056
|
headers: unknown;
|
3057
3057
|
response: {
|
3058
3058
|
200: {
|
3059
|
+
apr: number;
|
3059
3060
|
aprRecord: {
|
3060
3061
|
cumulated: number;
|
3061
3062
|
timestamp: bigint;
|
@@ -3140,7 +3141,6 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
3140
3141
|
chainId: number;
|
3141
3142
|
action: import("../../database/api/.generated").$Enums.OpportunityAction;
|
3142
3143
|
tvl: number;
|
3143
|
-
apr: number;
|
3144
3144
|
dailyRewards: number;
|
3145
3145
|
}[];
|
3146
3146
|
};
|
@@ -3567,7 +3567,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
3567
3567
|
body: unknown;
|
3568
3568
|
params: {};
|
3569
3569
|
query: {
|
3570
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
3570
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
3571
3571
|
items?: number | undefined;
|
3572
3572
|
subType?: number | undefined;
|
3573
3573
|
page?: number | undefined;
|
@@ -3639,7 +3639,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
3639
3639
|
body: unknown;
|
3640
3640
|
params: {};
|
3641
3641
|
query: {
|
3642
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
3642
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
3643
3643
|
items?: number | undefined;
|
3644
3644
|
subType?: number | undefined;
|
3645
3645
|
page?: number | undefined;
|
@@ -6444,7 +6444,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6444
6444
|
} & {
|
6445
6445
|
price?: number | null | undefined;
|
6446
6446
|
})[];
|
6447
|
-
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | undefined;
|
6447
|
+
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
6448
6448
|
depositUrl: any;
|
6449
6449
|
tags: string[];
|
6450
6450
|
};
|
@@ -6734,7 +6734,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6734
6734
|
depositUrl?: string | undefined;
|
6735
6735
|
protocols?: string[] | undefined;
|
6736
6736
|
mainProtocol?: string | undefined;
|
6737
|
-
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER";
|
6737
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST";
|
6738
6738
|
tokens: {
|
6739
6739
|
chainId: number;
|
6740
6740
|
address: string;
|
@@ -6787,6 +6787,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6787
6787
|
fetch?: RequestInit | undefined;
|
6788
6788
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
6789
6789
|
200: {
|
6790
|
+
apr: number;
|
6790
6791
|
aprRecord: {
|
6791
6792
|
cumulated: number;
|
6792
6793
|
timestamp: bigint;
|
@@ -6871,7 +6872,6 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6871
6872
|
chainId: number;
|
6872
6873
|
action: import("../../database/api/.generated").$Enums.OpportunityAction;
|
6873
6874
|
tvl: number;
|
6874
|
-
apr: number;
|
6875
6875
|
dailyRewards: number;
|
6876
6876
|
}[];
|
6877
6877
|
}>>;
|
@@ -6974,7 +6974,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6974
6974
|
get: (options: {
|
6975
6975
|
headers?: Record<string, unknown> | undefined;
|
6976
6976
|
query: {
|
6977
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
6977
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
6978
6978
|
items?: number | undefined;
|
6979
6979
|
subType?: number | undefined;
|
6980
6980
|
page?: number | undefined;
|
@@ -7043,7 +7043,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
7043
7043
|
get: (options: {
|
7044
7044
|
headers?: Record<string, unknown> | undefined;
|
7045
7045
|
query: {
|
7046
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
7046
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
7047
7047
|
items?: number | undefined;
|
7048
7048
|
subType?: number | undefined;
|
7049
7049
|
page?: number | undefined;
|
@@ -430,6 +430,41 @@ export const extractOpportunities = {
|
|
430
430
|
};
|
431
431
|
return opportunity;
|
432
432
|
},
|
433
|
+
[Campaign.VEST]: (campaign, campaigns, prices) => {
|
434
|
+
const { chainId, tvl, campaignParameters: params, computeChainId } = campaign;
|
435
|
+
const { active, all } = campaigns;
|
436
|
+
const aprBreakdown = active.reduce((res, campaign) => {
|
437
|
+
res[`Campaign ${campaign.campaignId.slice(0, 8)}`] = {
|
438
|
+
value: campaign.apr ?? 0,
|
439
|
+
address: campaign.campaignId,
|
440
|
+
type: EAprBreakdownType.DETAILS,
|
441
|
+
};
|
442
|
+
return res;
|
443
|
+
}, {});
|
444
|
+
// @Hugo WIP todo for aprBreakdown2
|
445
|
+
const aprBreakdown2 = getCampaignsApr(active);
|
446
|
+
const opportunity = {
|
447
|
+
id: `${Campaign.VEST}_${campaign.mainParameter}`,
|
448
|
+
platform: "Vest supply",
|
449
|
+
name: ["Vest supply treasury"].join(" "),
|
450
|
+
chainId: !computeChainId ? chainId : computeChainId,
|
451
|
+
distributionChainId: chainId,
|
452
|
+
tvl,
|
453
|
+
action: "lend",
|
454
|
+
subtype: 0,
|
455
|
+
status: getStatus(all),
|
456
|
+
tags: getTags(campaigns.all),
|
457
|
+
dailyrewards: getDailyRewards(active, prices),
|
458
|
+
tokenIcons: ["0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4"],
|
459
|
+
campaigns: { ...campaigns, type: Campaign.VEST, ids: campaigns.all.map(c => c.campaignId) },
|
460
|
+
rewardTokenIcons: getRewardTokenIcons(campaigns.active),
|
461
|
+
dailyRewardTokens: getRewardTokens(campaigns.active),
|
462
|
+
apr: getApr(active),
|
463
|
+
aprBreakdown,
|
464
|
+
aprBreakdown2,
|
465
|
+
};
|
466
|
+
return opportunity;
|
467
|
+
},
|
433
468
|
[Campaign.AJNA]: (campaign, campaigns, prices) => {
|
434
469
|
const { chainId, tvl, campaignSubType, campaignParameters: params, computeChainId } = campaign;
|
435
470
|
const { active, all } = campaigns;
|
package/dist/src/index.d.ts
CHANGED
@@ -152,7 +152,7 @@ declare const app: Elysia<"", false, {
|
|
152
152
|
depositUrl?: string | undefined;
|
153
153
|
protocols?: string[] | undefined;
|
154
154
|
mainProtocol?: string | undefined;
|
155
|
-
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER";
|
155
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST";
|
156
156
|
tokens: {
|
157
157
|
chainId: number;
|
158
158
|
address: string;
|
@@ -221,7 +221,7 @@ declare const app: Elysia<"", false, {
|
|
221
221
|
} & {
|
222
222
|
price?: number | null | undefined;
|
223
223
|
})[];
|
224
|
-
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | undefined;
|
224
|
+
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
225
225
|
depositUrl: any;
|
226
226
|
tags: string[];
|
227
227
|
};
|
@@ -254,6 +254,7 @@ declare const app: Elysia<"", false, {
|
|
254
254
|
headers: unknown;
|
255
255
|
response: {
|
256
256
|
200: {
|
257
|
+
apr: number;
|
257
258
|
aprRecord: {
|
258
259
|
cumulated: number;
|
259
260
|
timestamp: bigint;
|
@@ -338,7 +339,6 @@ declare const app: Elysia<"", false, {
|
|
338
339
|
chainId: number;
|
339
340
|
action: import("../database/api/.generated").$Enums.OpportunityAction;
|
340
341
|
tvl: number;
|
341
|
-
apr: number;
|
342
342
|
dailyRewards: number;
|
343
343
|
}[];
|
344
344
|
};
|
@@ -765,7 +765,7 @@ declare const app: Elysia<"", false, {
|
|
765
765
|
body: unknown;
|
766
766
|
params: {};
|
767
767
|
query: {
|
768
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
768
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
769
769
|
items?: number | undefined;
|
770
770
|
subType?: number | undefined;
|
771
771
|
page?: number | undefined;
|
@@ -837,7 +837,7 @@ declare const app: Elysia<"", false, {
|
|
837
837
|
body: unknown;
|
838
838
|
params: {};
|
839
839
|
query: {
|
840
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
840
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
841
841
|
items?: number | undefined;
|
842
842
|
subType?: number | undefined;
|
843
843
|
page?: number | undefined;
|
@@ -2,6 +2,6 @@ import { type Campaign, type CampaignDynamicData, type CampaignParameters, type
|
|
2
2
|
import { utils } from "ethers";
|
3
3
|
import type { UncachedResult } from "../../../utils/execute";
|
4
4
|
export declare const SILO_INTERFACE: utils.Interface;
|
5
|
-
type ReturnType = Partial<CampaignDynamicData<Campaign.SILO
|
5
|
+
type ReturnType = Partial<CampaignDynamicData<Campaign.SILO>>[];
|
6
6
|
export declare function SILODynamicData(chainId: MerklChainId, campaigns: CampaignParameters<Campaign.SILO>[]): Promise<UncachedResult<ReturnType>>;
|
7
7
|
export {};
|
@@ -69,7 +69,9 @@ export async function SILODynamicData(chainId, campaigns) {
|
|
69
69
|
symbol: campaign.campaignParameters.symbolTargetToken,
|
70
70
|
})) ?? 0;
|
71
71
|
let totalSupplyTargetToken = 0;
|
72
|
-
|
72
|
+
const forwarders = campaign.campaignParameters.forwarders ??
|
73
|
+
[];
|
74
|
+
for (const _forwarder of forwarders) {
|
73
75
|
if (_forwarder.forwarderType === Forwarder.ERC20) {
|
74
76
|
try {
|
75
77
|
totalSupplyTargetToken += BN2Number(SILO_INTERFACE.decodeFunctionResult("assetStorage", result[i])[3 + campaign.campaignSubType], campaign.campaignParameters.decimalsTargetToken);
|
@@ -83,8 +85,8 @@ export async function SILODynamicData(chainId, campaigns) {
|
|
83
85
|
const siloAsset = SILO_INTERFACE.decodeFunctionResult("siloAsset", siloAssetsCallsResults[j].returnData)[0];
|
84
86
|
const siloAssetSymbol = ERC20Interface.decodeFunctionResult("symbol", result[i++])[0];
|
85
87
|
// @BaptistG not sure to get this
|
86
|
-
|
87
|
-
|
88
|
+
forwarders[0].siloAsset = siloAsset;
|
89
|
+
forwarders[0].siloAssetSymbol = siloAssetSymbol;
|
88
90
|
}
|
89
91
|
}
|
90
92
|
}
|
@@ -92,7 +94,7 @@ export async function SILODynamicData(chainId, campaigns) {
|
|
92
94
|
j++;
|
93
95
|
}
|
94
96
|
// Remove all silo forwarders
|
95
|
-
campaign.campaignParameters.forwarders =
|
97
|
+
campaign.campaignParameters.forwarders = forwarders.filter(forwarder => forwarder.forwarderType !== Forwarder.SILO);
|
96
98
|
dynamicData.push({
|
97
99
|
...campaign,
|
98
100
|
apr: (priceRewardToken *
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { type Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../../utils/execute";
|
3
|
+
export declare const VEST_TREASURY = "0x7ccF5BbeC69c790D27dA3b5398B9e0d6D6EeC9F3";
|
4
|
+
export declare const VEST_TOKEN = "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4";
|
5
|
+
export declare function VestDynamicData(_chainId: MerklChainId, campaigns: CampaignParameters<Campaign.VEST>[]): Promise<UncachedResult<Partial<CampaignDynamicData<Campaign.VEST>[]>>>;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { BN2Number, ERC20Interface, YEAR, } from "@sdk";
|
2
|
+
import { log } from "../../../utils/logger";
|
3
|
+
import { Pricer } from "../../../utils/pricer";
|
4
|
+
export const VEST_TREASURY = "0x7ccF5BbeC69c790D27dA3b5398B9e0d6D6EeC9F3";
|
5
|
+
export const VEST_TOKEN = "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4";
|
6
|
+
export async function VestDynamicData(_chainId, campaigns) {
|
7
|
+
const pricer = await Pricer.load();
|
8
|
+
const calls = [];
|
9
|
+
for (const campaign of campaigns) {
|
10
|
+
calls.push({
|
11
|
+
allowFailure: true,
|
12
|
+
callData: ERC20Interface.encodeFunctionData("balanceOf", [VEST_TREASURY]),
|
13
|
+
target: VEST_TOKEN,
|
14
|
+
});
|
15
|
+
}
|
16
|
+
return {
|
17
|
+
cached: false,
|
18
|
+
call: {
|
19
|
+
callData: calls,
|
20
|
+
handler: () => { },
|
21
|
+
reducer: async (result) => {
|
22
|
+
let i = 0;
|
23
|
+
const dynamicData = [];
|
24
|
+
for (const campaign of campaigns) {
|
25
|
+
let totalSupply;
|
26
|
+
try {
|
27
|
+
totalSupply = ERC20Interface.decodeFunctionResult("balanceOf", result[i++])[0];
|
28
|
+
}
|
29
|
+
catch {
|
30
|
+
log.warn(`Error getting totalSupply for campaign ${campaign.campaignId}`);
|
31
|
+
totalSupply = 0.0000001;
|
32
|
+
}
|
33
|
+
const priceRewardToken = (await pricer.get({
|
34
|
+
address: campaign.rewardToken,
|
35
|
+
chainId: campaign.chainId,
|
36
|
+
symbol: campaign.campaignParameters.symbolRewardToken,
|
37
|
+
})) ?? 0;
|
38
|
+
const priceTargetToken = (await pricer.get({
|
39
|
+
address: VEST_TOKEN,
|
40
|
+
chainId: campaign.computeChainId,
|
41
|
+
symbol: VEST_TOKEN,
|
42
|
+
})) ?? 0;
|
43
|
+
const tvl = totalSupply * priceTargetToken;
|
44
|
+
dynamicData.push({
|
45
|
+
...campaign,
|
46
|
+
apr: (priceRewardToken *
|
47
|
+
BN2Number(campaign.amount, campaign.campaignParameters.decimalsRewardToken) *
|
48
|
+
YEAR *
|
49
|
+
100) /
|
50
|
+
campaign.campaignParameters.duration /
|
51
|
+
(totalSupply * priceTargetToken),
|
52
|
+
totalSupplyTargetToken: totalSupply,
|
53
|
+
tvl,
|
54
|
+
priceRewardToken: priceRewardToken,
|
55
|
+
});
|
56
|
+
}
|
57
|
+
return dynamicData;
|
58
|
+
},
|
59
|
+
},
|
60
|
+
};
|
61
|
+
}
|
@@ -14,6 +14,7 @@ import { JSON_AIRDROPDynamicData } from "./campaignTypes/JSON_AIRDROPDynamicData
|
|
14
14
|
import { MORPHODynamicData } from "./campaignTypes/MORPHODynamicData";
|
15
15
|
import { RadiantDynamicData } from "./campaignTypes/RadiantDynamicData";
|
16
16
|
import { SILODynamicData } from "./campaignTypes/SILODynamicData";
|
17
|
+
import { VestDynamicData } from "./campaignTypes/VestDynamicData";
|
17
18
|
export async function campaignsDynamicData(chainId, campaigns, type) {
|
18
19
|
try {
|
19
20
|
const tags = (await engineDbClient.campaignCreators.findMany()).reduce((acc, curr) => {
|
@@ -65,6 +66,9 @@ export async function campaignsDynamicData(chainId, campaigns, type) {
|
|
65
66
|
case Campaign.EIGENLAYER: {
|
66
67
|
return EigenLayerDynamicData(chainId, campaigns);
|
67
68
|
}
|
69
|
+
case Campaign.VEST: {
|
70
|
+
return VestDynamicData(chainId, campaigns);
|
71
|
+
}
|
68
72
|
}
|
69
73
|
return {
|
70
74
|
cached: false,
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Campaign, Forwarder, MorphoSubCampaignType, } from "@sdk";
|
2
2
|
import { utils } from "ethers";
|
3
|
+
import { VEST_TOKEN } from "../campaigns/campaignTypes/VestDynamicData";
|
3
4
|
function prepareClammFetch(previous, campaign) {
|
4
5
|
if (campaign.campaignType !== Campaign.CLAMM) {
|
5
6
|
return previous;
|
@@ -337,6 +338,29 @@ function prepareEigenLayerFetch(previous, campaign) {
|
|
337
338
|
};
|
338
339
|
return previous;
|
339
340
|
}
|
341
|
+
function prepareVestFetch(previous, campaign) {
|
342
|
+
if (campaign.campaignType !== Campaign.VEST) {
|
343
|
+
return previous;
|
344
|
+
}
|
345
|
+
const forwarders = {};
|
346
|
+
if (campaign.campaignParameters.forwarders && campaign.campaignParameters.forwarders.length > 0) {
|
347
|
+
for (const forwarder of campaign.campaignParameters.forwarders) {
|
348
|
+
forwarders[utils.getAddress(forwarder.sender)] = forwarder;
|
349
|
+
}
|
350
|
+
}
|
351
|
+
previous[campaign.mainParameter] = {
|
352
|
+
rewardToken: campaign.rewardToken,
|
353
|
+
symbolRewardToken: campaign.campaignParameters.symbolRewardToken,
|
354
|
+
tvl: campaign.tvl,
|
355
|
+
forwarders: forwarders,
|
356
|
+
targetToken: VEST_TOKEN,
|
357
|
+
decimalsTargetToken: 6,
|
358
|
+
totalSupplyTargetToken: campaign.totalSupplyTargetToken,
|
359
|
+
decimals: 6,
|
360
|
+
amount: Number.parseFloat((BigInt(campaign.amount) / BigInt(10 ** campaign.campaignParameters.decimalsRewardToken)).toString()),
|
361
|
+
};
|
362
|
+
return previous;
|
363
|
+
}
|
340
364
|
export function prepareFetch(type, previous, // FIXME
|
341
365
|
campaign //FIXME
|
342
366
|
) {
|
@@ -361,6 +385,8 @@ campaign //FIXME
|
|
361
385
|
return prepareCompoundFetch(previous, campaign);
|
362
386
|
case Campaign.EIGENLAYER:
|
363
387
|
return prepareEigenLayerFetch(previous, campaign);
|
388
|
+
case Campaign.VEST:
|
389
|
+
return prepareEigenLayerFetch(previous, campaign);
|
364
390
|
default:
|
365
391
|
return previous;
|
366
392
|
}
|
@@ -61,7 +61,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
|
|
61
61
|
body: unknown;
|
62
62
|
params: {};
|
63
63
|
query: {
|
64
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
64
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
65
65
|
items?: number | undefined;
|
66
66
|
subType?: number | undefined;
|
67
67
|
page?: number | undefined;
|
@@ -133,7 +133,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
|
|
133
133
|
body: unknown;
|
134
134
|
params: {};
|
135
135
|
query: {
|
136
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
136
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST" | undefined;
|
137
137
|
items?: number | undefined;
|
138
138
|
subType?: number | undefined;
|
139
139
|
page?: number | undefined;
|
@@ -34,6 +34,7 @@ export declare const campaignTypeToEnumMap: {
|
|
34
34
|
readonly JSON_AIRDROP: any;
|
35
35
|
readonly UNISWAP_V4: any;
|
36
36
|
readonly EIGENLAYER: any;
|
37
|
+
readonly VEST: any;
|
37
38
|
readonly ION: any;
|
38
39
|
};
|
39
40
|
export type ConvertedCampaignType<C extends CampaignType> = (typeof campaignTypeToEnumMap)[C];
|
@@ -122,6 +123,8 @@ export declare const GetCampaignQueryDto: import("@sinclair/typebox").TObject<{
|
|
122
123
|
UNISWAP_V4: "UNISWAP_V4";
|
123
124
|
ION: "ION";
|
124
125
|
EIGENLAYER: "EIGENLAYER";
|
126
|
+
ERC20TRANSFERS: "ERC20TRANSFERS";
|
127
|
+
VEST: "VEST";
|
125
128
|
}>>;
|
126
129
|
subType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
127
130
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -21,6 +21,7 @@ export const campaignTypeToEnumMap = {
|
|
21
21
|
JSON_AIRDROP: CampaignTypeEnum.JSON_AIRDROP,
|
22
22
|
UNISWAP_V4: CampaignTypeEnum.UNISWAP_V4,
|
23
23
|
EIGENLAYER: CampaignTypeEnum.EIGENLAYER,
|
24
|
+
VEST: CampaignTypeEnum.VEST,
|
24
25
|
ION: CampaignTypeEnum.ION,
|
25
26
|
};
|
26
27
|
// ─── DTOs ────────────────────────────────────────────────────────────────────
|
@@ -21,7 +21,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
21
21
|
depositUrl?: string | undefined;
|
22
22
|
protocols?: string[] | undefined;
|
23
23
|
mainProtocol?: string | undefined;
|
24
|
-
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER";
|
24
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "VEST";
|
25
25
|
tokens: {
|
26
26
|
chainId: number;
|
27
27
|
address: string;
|
@@ -90,7 +90,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
90
90
|
} & {
|
91
91
|
price?: number | null | undefined;
|
92
92
|
})[];
|
93
|
-
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | undefined;
|
93
|
+
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
94
94
|
depositUrl: any;
|
95
95
|
tags: string[];
|
96
96
|
};
|
@@ -123,6 +123,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
123
123
|
headers: unknown;
|
124
124
|
response: {
|
125
125
|
200: {
|
126
|
+
apr: number;
|
126
127
|
aprRecord: {
|
127
128
|
cumulated: number;
|
128
129
|
timestamp: bigint;
|
@@ -207,7 +208,6 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
207
208
|
chainId: number;
|
208
209
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
209
210
|
tvl: number;
|
210
|
-
apr: number;
|
211
211
|
dailyRewards: number;
|
212
212
|
}[];
|
213
213
|
};
|
@@ -313,6 +313,8 @@ export declare const CreateOpportunityDto: import("@sinclair/typebox").TObject<{
|
|
313
313
|
UNISWAP_V4: "UNISWAP_V4";
|
314
314
|
ION: "ION";
|
315
315
|
EIGENLAYER: "EIGENLAYER";
|
316
|
+
ERC20TRANSFERS: "ERC20TRANSFERS";
|
317
|
+
VEST: "VEST";
|
316
318
|
}>;
|
317
319
|
identifier: import("@sinclair/typebox").TString;
|
318
320
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -47,7 +47,7 @@ export declare abstract class OpportunityService {
|
|
47
47
|
} & {
|
48
48
|
price?: number | null | undefined;
|
49
49
|
})[];
|
50
|
-
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | undefined;
|
50
|
+
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
51
51
|
depositUrl: any;
|
52
52
|
tags: string[];
|
53
53
|
}>;
|
@@ -75,7 +75,7 @@ export declare abstract class OpportunityService {
|
|
75
75
|
} & {
|
76
76
|
price?: number | null | undefined;
|
77
77
|
})[];
|
78
|
-
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | undefined;
|
78
|
+
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
79
79
|
depositUrl: any;
|
80
80
|
tags: string[];
|
81
81
|
}>;
|
@@ -88,6 +88,7 @@ export declare abstract class OpportunityService {
|
|
88
88
|
* @returns A list of opportunities
|
89
89
|
*/
|
90
90
|
static getMany(query: GetOpportunitiesQueryModel): Promise<{
|
91
|
+
apr: number;
|
91
92
|
aprRecord: {
|
92
93
|
cumulated: number;
|
93
94
|
timestamp: bigint;
|
@@ -172,10 +173,10 @@ export declare abstract class OpportunityService {
|
|
172
173
|
chainId: number;
|
173
174
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
174
175
|
tvl: number;
|
175
|
-
apr: number;
|
176
176
|
dailyRewards: number;
|
177
177
|
}[]>;
|
178
178
|
static findLiveWithFirstCampaign(chainId: MerklChainId): Promise<({
|
179
|
+
apr: number;
|
179
180
|
aprRecord: {
|
180
181
|
cumulated: number;
|
181
182
|
timestamp: bigint;
|
@@ -260,7 +261,6 @@ export declare abstract class OpportunityService {
|
|
260
261
|
chainId: number;
|
261
262
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
262
263
|
tvl: number;
|
263
|
-
apr: number;
|
264
264
|
dailyRewards: number;
|
265
265
|
} & {
|
266
266
|
campaigns: {
|
@@ -321,6 +321,7 @@ export declare abstract class OpportunityService {
|
|
321
321
|
*/
|
322
322
|
static countMany(query: GetOpportunitiesQueryModel): Promise<number>;
|
323
323
|
static formatResponse(opportunity: Awaited<ReturnType<typeof OpportunityRepository.findUniqueOrThrow>>): {
|
324
|
+
apr: number;
|
324
325
|
aprRecord: {
|
325
326
|
cumulated: number;
|
326
327
|
timestamp: bigint;
|
@@ -405,7 +406,6 @@ export declare abstract class OpportunityService {
|
|
405
406
|
chainId: number;
|
406
407
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
407
408
|
tvl: number;
|
408
|
-
apr: number;
|
409
409
|
dailyRewards: number;
|
410
410
|
};
|
411
411
|
static formatResponseBase(opportunity: LightOpportunityFromDB): {
|