Skip to content

Commit a8902d9

Browse files
committed
fix(explorer): flag round-million proof amounts in suspicious-pattern check
Warning 4 used a hardcoded 1 trillion atomic literal, which at the correct 100k atomic/DERO conversion flagged only multiples of 10M DERO (just 10M and 20M in the valid range). Restore the original intent of flagging exact multiples of 1M DERO via 1_000_000 * ATOMIC_UNITS_PER_DERO.
1 parent da6f814 commit a8902d9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

proof_validation.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ func DetectSuspiciousProofPatterns(amount uint64) []string {
125125
fmt.Sprintf("Large transfer amount: %d DERO", amountDero))
126126
}
127127

128-
// Warning 4: Suspiciously round number in trillions (often fabricated)
129-
if amount >= 1_000_000_000_000 && amount%1_000_000_000_000 == 0 {
128+
// Warning 4: Suspiciously round number (exact multiple of 1M DERO) - often fabricated
129+
roundThreshold := uint64(1_000_000 * ATOMIC_UNITS_PER_DERO) // 1M DERO
130+
if amount >= roundThreshold && amount%roundThreshold == 0 {
130131
amountDero := amount / ATOMIC_UNITS_PER_DERO
131132
warnings = append(warnings,
132133
fmt.Sprintf("Suspiciously round number (%d DERO exactly)", amountDero))

0 commit comments

Comments
 (0)