//@version=6 // Tradersland — Crypto Hack Map // Marks the biggest exchange/protocol hacks and systemic events on any chart. // Works on any symbol/timeframe. Red = hack, orange = systemic event. // More at https://tradersland.xyz/hacks indicator("Tradersland — Crypto Hack Map", shorttitle="TL Hack Map", overlay=true, max_labels_count=100, max_lines_count=100) showHacks = input.bool(true, "Show hacks") showEvents = input.bool(true, "Show systemic events (COVID, Terra, FTX)") showLines = input.bool(true, "Vertical lines") minUsdM = input.int(100, "Min hack size (USD millions)", minval=0) labelPos = input.string("Top", "Label position", options=["Top", "Bottom"]) type Ev int t string name string size float usdM bool isHack string note var ev = array.new() if barstate.isfirst array.push(ev, Ev.new(timestamp("UTC", 2014, 2, 24), "Mt. Gox", "$460M", 460, true, "Bear. Bottom Jan 2015 (−11 mo)")) array.push(ev, Ev.new(timestamp("UTC", 2016, 8, 2), "Bitfinex", "$72M", 72, true, "Bull. −20%, recovered in ~1 mo")) array.push(ev, Ev.new(timestamp("UTC", 2018, 1, 26), "Coincheck", "$530M", 530, true, "Early bear. Bottom Dec 2018")) array.push(ev, Ev.new(timestamp("UTC", 2019, 5, 7), "Binance", "$41M", 41, true, "Bull. −4%, recovered in 1 day")) array.push(ev, Ev.new(timestamp("UTC", 2020, 3, 12), "COVID crash", "−50% in 2d", 0, false, "Macro. Bottom same day, ATH 9 mo later")) array.push(ev, Ev.new(timestamp("UTC", 2020, 9, 26), "KuCoin", "$280M", 280, true, "Bull. No impact")) array.push(ev, Ev.new(timestamp("UTC", 2021, 8, 10), "Poly Network", "$611M", 611, true, "Bull. No impact, funds returned")) array.push(ev, Ev.new(timestamp("UTC", 2022, 2, 2), "Wormhole", "$320M", 320, true, "Early bear")) array.push(ev, Ev.new(timestamp("UTC", 2022, 3, 23), "Ronin", "$620M", 620, true, "Early bear")) array.push(ev, Ev.new(timestamp("UTC", 2022, 5, 9), "Terra/LUNA", "$40B gone", 0, false, "Systemic. BTC −35% in a week")) array.push(ev, Ev.new(timestamp("UTC", 2022, 8, 1), "Nomad", "$190M", 190, true, "Bear")) array.push(ev, Ev.new(timestamp("UTC", 2022, 10, 6), "BNB Bridge", "$570M", 570, true, "Bear")) array.push(ev, Ev.new(timestamp("UTC", 2022, 11, 8), "FTX", "~$8B hole", 0, false, "Late bear. Capitulation = bottom 2 wks later")) array.push(ev, Ev.new(timestamp("UTC", 2023, 3, 13), "Euler", "$197M", 197, true, "Early bull. No impact")) array.push(ev, Ev.new(timestamp("UTC", 2023, 9, 23), "Mixin", "$200M", 200, true, "Bull. No impact")) array.push(ev, Ev.new(timestamp("UTC", 2023, 11, 10),"Poloniex", "$126M", 126, true, "Bull. No impact")) array.push(ev, Ev.new(timestamp("UTC", 2024, 5, 31), "DMM Bitcoin", "$305M", 305, true, "Bull. No impact")) array.push(ev, Ev.new(timestamp("UTC", 2024, 7, 18), "WazirX", "$235M", 235, true, "Bull. No impact")) array.push(ev, Ev.new(timestamp("UTC", 2025, 2, 21), "Bybit", "$1.5B", 1500, true, "Bull. Bottom +7 wks, new ATH +3 mo")) array.push(ev, Ev.new(timestamp("UTC", 2025, 5, 22), "Cetus", "$223M", 223, true, "Bull. No impact")) array.push(ev, Ev.new(timestamp("UTC", 2025, 11, 3), "Balancer", "~$128M", 128, true, "Early bear")) array.push(ev, Ev.new(timestamp("UTC", 2026, 10, 29),"Binance", "$2.8–6.3B", 2800, true, "Late bear. Largest hack ever")) // skip events older than the chart's first bar var int nextIdx = 0 if barstate.isfirst while nextIdx < array.size(ev) and array.get(ev, nextIdx).t < time nextIdx += 1 // draw once: on the bar whose interval [time, time_close) contains the event if nextIdx < array.size(ev) e = array.get(ev, nextIdx) if time_close > e.t ok = e.isHack ? (showHacks and e.usdM >= minUsdM) : showEvents if ok col = e.isHack ? color.new(#ff4d4f, 0) : color.new(#f5a623, 0) if showLines line.new(bar_index, low, bar_index, high, extend=extend.both, color=color.new(col, 70), width=1) yl = labelPos == "Top" ? high : low sty = labelPos == "Top" ? label.style_label_down : label.style_label_up label.new(bar_index, yl, e.name + "\n" + e.size, style=sty, color=col, textcolor=color.white, size=size.small, tooltip=e.note) nextIdx += 1