The way nostrdb works is that it keeps versions of replaceable events and aggregates sats and zaps across the entire note history, which allows it to know when a zap or like is targeting an older version. The main issue is that relates delete older versions so we’re trying to fix that at the protocol level (replaceable events change to versioned events ideally)
Discussion
relays delete older versions*