Skip to content

Commit 79b6d65

Browse files
committed
correct ethereum
1 parent ebde70a commit 79b6d65

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

protocols/ethereum.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ interface BurnDataPoint {
1818
timestamp: number;
1919
}
2020

21-
const burnData = async (type: 'pos' | 'pow'): Promise<LinearAdapterResult[]> => {
22-
const result: LinearAdapterResult[] = [];
21+
const burnData = async (type: 'pos' | 'pow'): Promise<CliffAdapterResult[]> => {
22+
const result: CliffAdapterResult[] = [];
2323
const burnData = await queryDune("5041563")
2424

2525
// Filter data based on type
@@ -34,9 +34,8 @@ const burnData = async (type: 'pos' | 'pow'): Promise<LinearAdapterResult[]> =>
3434

3535
for (let i = 0; i < filteredData.length - 1; i++) {
3636
result.push({
37-
type: "linear",
38-
start: filteredData[i + 1].timestamp,
39-
end: filteredData[i].timestamp,
37+
type: "cliff",
38+
start: filteredData[i].timestamp,
4039
amount: -filteredData[i].eth_burn
4140
});
4241
}
@@ -58,17 +57,16 @@ const foundationOutflow = async (): Promise<CliffAdapterResult[]> => {
5857
return result;
5958
}
6059

61-
const stakingRewards = async (): Promise<LinearAdapterResult[]> => {
62-
const result: LinearAdapterResult[] = [];
60+
const stakingRewards = async (): Promise<CliffAdapterResult[]> => {
61+
const result: CliffAdapterResult[] = [];
6362
const issuanceData = await queryDune("5041721")
6463

65-
for (let i = 0; i < issuanceData.length - 1; i++) {
64+
for (let i = 0; i < issuanceData.length; i++) {
6665
result.push({
67-
type: "linear",
68-
start: issuanceData[i + 1].timestamp,
69-
end: issuanceData[i].timestamp,
66+
type: "cliff",
67+
start: issuanceData[i].timestamp,
7068
amount: issuanceData[i].eth_issued
71-
})
69+
});
7270
}
7371
return result;
7472
}

0 commit comments

Comments
 (0)