Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Our code silently replaced our own $50 daily loss limit with $142

Description and use

The bot silently replaced a hard $50 daily loss limit with a looser $142 cap, allowing losses up to $100. After fixing, the stricter limit is enforced.

Problem

A hard daily loss limit of $50 was silently overridden by a looser automatic cap of ~$142, allowing losses up to $100 without triggering the guard.

Outcome

The bug allowed daily losses up to $100.26 over 42 trading days, with the $50 limit never firing. After fixing, the stricter cap rule now prevents such losses.

Workflow

  • Read risk rule file at startup
  • Compute automatic cap as 1.5% of balance each tick
  • Unconditionally overwrite config cap with automatic cap
  • Stop trading when cap reached

Evidence

we set a hard daily loss limit of $50. For at least the 42 trading days we can measure, the number actually running was about $142.

Source

Every tick, the bot computes a day cap from the account balance: 1.5% of the balance, which on a roughly $9,500 account is about $142. Then it assigned that value to the variable that holds the cap.

Source

That assignment was unconditional. It did not compare the two numbers. It did not ask which one was stricter. It just wrote over whatever was there — including the $50 that our own rule file had just supplied.

Source

The change is two lines long and the principle is one sentence: when a rule and a default disagree, take the stricter one.

Source

Five days below a limit that was supposedly live is not a subtle discrepancy. It is a contradiction, and it had been sitting in our own data the whole time.

Source

  • Record date: 2026-10-09T01:41:08.701Z