Skip to content

Commit

Permalink
update total dripped approx
Browse files Browse the repository at this point in the history
  • Loading branch information
efstajas committed Jun 3, 2024
1 parent 30ea43b commit f417931
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/lib/utils/total-dripped-approx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ const STREAMS = [
started: new Date('September 4, 2023, 12:50 AM').getTime(),
amtPerSec: '11832001522070015220700152',
},
// Octant WETH
// https://drips.network/app/174487241669176381847575438324427367088538936996/tokens/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/streams/3580043985
// ENS USDC
{
token: {
address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
},
started: new Date('January 20, 2024, 5:26 PM').getTime(),
amtPerSec: '4375000000000000000000',
started: new Date('May 20, 2024, 10:04 PM').getTime(),
amtPerSec: '3215277777777',
},
];

Expand All @@ -38,11 +37,18 @@ const GIVES = [
tokenAddress: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
amount: BigInt('9380000000000000000'),
},
// Octant https://drips.network/app/drip-lists/30178668158349445547603108732480118476541651095408979232800331391215
// Total of the stream which is now stopped
{
tokenAddress: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
amount: BigInt('34529995660000000000'),
},
];

export default function totalDrippedApproximation() {
const streamedAmounts = STREAMS.map((stream) => {
const duration = (Date.now() - stream.started) / 1000;

return {
tokenAddress: stream.token.address.toLowerCase(),
amount: BigInt(Math.floor(Number(BigInt(stream.amtPerSec) / BigInt(1e9)) * duration)),
Expand Down

0 comments on commit f417931

Please sign in to comment.