RiskState score_v4: A Risk Engine Upgrade Built on Six Months of Live Evidence
score_v4 and API v1.5.0: a trend gate tested on 8 years, DeFi health factor as a hard limit, rules counted once, fail-closed sizing, and a stable portfolio API v2.
What ships
RiskState score_v4 is live, together with API v1.5.0 and the first stable release of the portfolio API, v2.0.0. It is the first scoring upgrade since May: we froze the engine for six months, recorded more than two thousand live decisions with the price moves that followed, audited that record, and changed only what the evidence supported.
The short version: position limits now respect the trend, a DeFi health factor is a hard limit, every market condition is counted once, and the engine closes exposure when a number cannot be trusted. Request shape and existing field names are unchanged.
A trend gate, tested on eight years with the production code
The largest change is simple to state. While price is below the average of its last 50 daily closes, the permitted size is halved. If the daily data is missing, the engine assumes the worse case.
We ran this rule over BTC from March 2018 to May 2026 with the same module that serves the API, not a spreadsheet approximation. Return per unit of maximum drawdown came out at 0.61, against 0.37 for a fixed position at the same average exposure and 0.34 for the previous version. Annualised return was 19.5% against 12.3% for the fixed position.
The gain comes from holding less during declines and full size during advances. Maximum drawdown over the whole period is about the same as the fixed position (31.8% against 33.3%), and in long bear years such as 2018 and 2022 the fixed position drew down less. We publish that alongside the headline because a risk engine that only reports its good years is not one you should size from.
Your health factor is now a hard limit
For anyone borrowing against BTC or ETH on Aave or Spark, this is the change that matters most. The permitted size can no longer exceed the limit set by the health factor. Before, the four limits were blended, and a tight health factor could be partly averaged away by healthy readings elsewhere.
A health factor that cannot be read on a wallet with debt now closes new exposure instead of being treated as "no position". When the engine does not know how close you are to liquidation, the safe answer is zero.
Each condition counts once
A crowded long market shows up in several places at once: funding, the long/short ratio, open interest, the basis, liquidations. The previous rules engine could count that one condition up to five times, and it could also count conditions that the macro and cycle limits had already priced in.
In score_v4 each family of rules contributes once, by its most severe alert, and a family that another limit already accounts for is left out. Severity now works the way you would expect: a danger alert weighs more than a warning. Rules that are a risk only for short positions are still shown but no longer reduce a long book's limit.
The long/short crowding rule was rebuilt as well. It used fixed thresholds that sat below the ratio's normal level, so it fired most of the time. It now compares the ratio with its own last 30 days and speaks only when positioning is unusual.
Direction is advisory, and neutral by default
The engine tells you how much exposure is allowed. It does not forecast price, and the record gave us no reason to pretend otherwise. So direction_bias is now explicitly advisory and NEUTRAL unless the short-term and structural readings agree and the move of the last week is not already extended. Expect NEUTRAL far more often. That is the honest reading of the data, and it keeps the direction field from nudging an agent into chasing a move that has already happened.
Better inputs for ETH and for on-chain data
ETH is now scored on ETH data throughout. A review found that some server-side ETH readings (taker flow, liquidations) were still using BTC series. They now use ETH's own, and signals that exist only for BTC are skipped for ETH instead of borrowed.
The API also receives two BTC on-chain supply metrics that the dashboard already had, so the structural reading is built on more real data and fewer defaults. Funding thresholds are evaluated in the unit they were calibrated in, which lets the funding rules do their job.
Fail closed, and checked line by line
If any step of the calculation produces a number that is not finite, the result is zero exposure and the most defensive level. The panic floor, which guarantees a minimum allocation in extreme capitulation, no longer applies when core data is missing.
We also had the arithmetic checked independently. The limit calculation was ported to C and compared with the production JavaScript on 200,000 random inputs, including NaN and infinities: identical on every row. An external automated-reasoning review then tried to break a list of stated properties. On the previous version it found real defects, including a zero health factor that was read as "no position". Every one of those is fixed in score_v4. On the new version it tested 17 properties and found no way to make a bad number pass or to make the health-factor limit fail to bind.
Portfolio API v2 is stable
/v2/portfolio-risk-state and /v2/stress-scenario are now 2.0.0. From here, a breaking change requires two weeks of notice and a new major version. The portfolio gate also understands hedges: the size limit is tested on an asset's net exposure, and a position that reduces net exposure is not blocked by a constraint that only concerns the other side.
What integrators should expect
1. Smaller max_size_fraction while BTC or ETH trades below its 50-day average. On our recorded decisions from mid-October to mid-November, a period spent mostly below that average, the mean limit moved from 0.28 to 0.20 for BTC and from 0.31 to 0.19 for ETH.
2. NEUTRAL direction most of the time.
3. Every policy_hash changes once, because the hash now also covers the four limits, the trend gate, the rules load and data quality.
4. New response fields: trend_gate and exposure_policy.direction_advisory, plus rules_load and sizing with include_details.
5. scoring_version reads score_v4 and api_version reads 1.5.0. Nothing in the request changes.
What we tested and did not ship
Restraint is part of the upgrade. In June we pre-registered sizing by realized volatility as the leading candidate for this version. We tested it on the same eight years, and it did not beat a fixed position at the same exposure, so it is not in score_v4. A reworked structural score still tracked past price and stays out. Sizing from the combined score failed its test and its shadow field was removed from the response.
The scores that describe the market (composite, structural, tactical) are still there, and still useful for context. They do not drive size, and we do not claim they predict returns.
Frozen again for six months
score_v4 is now frozen for six months: no changes to weights, thresholds or formulas. Every decision keeps being recorded with its inputs, its hash and the returns that follow, so the next review starts from live evidence. The full analysis behind this release is in our research note.
See score_v4 on live markets.
The app shows the current limits for BTC and ETH, the trend gate and every rule that counts, straight from the engine.