docs(lore-0172): USDT/USDC candles close at ~0.14, not ~1.00 - #189
Merged
Conversation
Found verifying the 0165 deploy. USDT was 0165's control asset and the kill switch passed - the peg arm did not flatten it - but the values themselves are impossible: 891 daily candles, 132,685 trades, ~492k USDT volume, closing at 0.09-0.49 against USDC. Pre-existing and unchanged by 0165: arm B contributes 0/0 wherever sum(w) > 0, so every value is arithmetically identical to what the old view published. Records two falsified hypotheses so they are not re-run - 0139 collision (id 111 resolves to exactly one identity) and misattributed XLM prices (0.142572 vs 0.163999, never equal) - plus the query gotcha that price_ohlcv_1d holds one row per source, which fans a naive XLM join out ~4x per day. Also captures a number measured in passing that appears nowhere in 0139: it affects 3,281 asset_ids across 6,568 identities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while verifying the 0165 deploy on prod. USDT was 0165's control asset — the peg arm must not flatten it — and that check passed. But the values it returned are impossible.
Measured
Two dollar-pegged assets cannot trade at 0.09–0.49 against each other.
close_usd ≈ close_nativeis correct — a USDC-quoted candle takes the stablecoin-direct tier, soclose_usd = close × $1. The defect is incloseitself.Not caused by 0165
Arm B contributes 0/0 wherever
sum(w) > 0, so every one of these values is arithmetically identical to what the old view published. Pre-existing; nobody had looked at USDT.Two hypotheses tested and falsified — recorded so they aren't re-run
asset_idcollision ❌ —asset_id = 111resolves to exactly one identity.Also a query gotcha worth keeping:
price_ohlcv_1dholds one row per source, so a naive join to XLM/USDC fans out ~4× per day.Measured in passing, and worth carrying to 0139
3,281
asset_ids serve 6,568 natural identities. 0139 currently records the collision as a schema-level suspicion with no blast radius; this is the first measurement I'm aware of.Why it matters
close_usdis what BE multiplies into TVL. If USDT positions value at ~$0.14 instead of ~$1.00, every USDT-legged pool is understated ~7×. BE's CSV has 102 priceable USDT pools — pools that look healthy and are silently wrong, which is worse than the never-priced ones 0165 just fixed.The task carries four concrete next probes (writer-side id assignment, raw-trade vs candle agreement, orientation/scaling, other USDT pairs).