pub const LOOP_LIMIT: u64 = 1_000_000;
The most loop iterations one loop may run, and the deepest recursion: a mistaken while (true) ends with an error instead of hanging the page.
while (true)