From 96f906464af4e91a40a31d2ad12f9922b0a057be Mon Sep 17 00:00:00 2001 From: vrtnd Date: Mon, 15 Jan 2024 17:44:23 +0700 Subject: [PATCH] Add stepn --- protocols/gmt.ts | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ utils/time.ts | 4 +++ 2 files changed, 96 insertions(+) create mode 100644 protocols/gmt.ts diff --git a/protocols/gmt.ts b/protocols/gmt.ts new file mode 100644 index 0000000..d773420 --- /dev/null +++ b/protocols/gmt.ts @@ -0,0 +1,92 @@ +import { Protocol } from '../types/adapters'; +import { manualCliff, manualStep } from '../adapters/manual'; +import { periodToSeconds } from '../utils/time'; + +const totalQty = 6_000_000_000; +const start = 1646784000; +const aptos: Protocol = { + 'Move And Earn': [ + manualStep( + start + periodToSeconds.month * 6, + periodToSeconds.month, + 35, + totalQty * 0.3 * 0.0166 + ), + manualStep( + start + periodToSeconds.month * 41, + periodToSeconds.month, + 35, + (totalQty * 0.3 * 0.0166) / 2 + ), + manualStep( + start + periodToSeconds.month * 76, + periodToSeconds.month, + 25, + (totalQty * 0.3 * 0.0166) / 4 + ), + ], + 'Ecosystem / Treasury': [ + manualCliff(start, totalQty * 0.3 * 0.1), + manualStep( + start + periodToSeconds.month, + periodToSeconds.month, + 90, + totalQty * 0.3 * 0.01 + ), + ], + 'Private Sale': [ + manualStep( + start + periodToSeconds.months(12), + periodToSeconds.month, + 9, + totalQty * 0.163 * 0.0387 + ), + manualStep( + start + periodToSeconds.months(21), + periodToSeconds.month, + 9, + totalQty * 0.163 * 0.0331 + ), + manualStep( + start + periodToSeconds.months(29), + periodToSeconds.month, + 12, + totalQty * 0.163 * 0.0208 + ), + manualStep( + start + periodToSeconds.months(41), + periodToSeconds.month, + 6, + totalQty * 0.163 * 0.0174 + ), + ], + Team: [ + manualStep( + start + periodToSeconds.months(12), + periodToSeconds.month, + 48, + totalQty * 0.142 * 0.0208 + ), + ], + 'Binance Launchpad': [manualCliff(start, totalQty * 0.07)], + Advisors: [ + manualStep( + start + periodToSeconds.months(12), + periodToSeconds.month, + 24, + totalQty * 0.025 * 0.0417 + ), + ], + + meta: { + sources: ['https://www.binance.com/en/research/projects/stepn'], + token: 'coingecko:stepn', + protocolIds: ['4028'], + }, + categories: { + insiders: ['Team', 'Private Sale', 'Advisors'], + noncirculating: ['Ecosystem / Treasury'], + airdrop: ['Binance Launchpad'], + }, +}; +export default aptos; diff --git a/utils/time.ts b/utils/time.ts index 5c13c96..480db60 100644 --- a/utils/time.ts +++ b/utils/time.ts @@ -29,6 +29,10 @@ export const periodToSeconds = { day: 86400, hour: 3600, minute: 60, + months: (months: number) => periodToSeconds.month * months, + weeks: (weeks: number) => periodToSeconds.week * weeks, + years: (years: number) => periodToSeconds.year * years, + days: (days: number) => periodToSeconds.day * days, }; export function stringToTimestamp( inputDate: string,