Curl, Troika, Setun — the ternary saga · 02_ternary_systems/TERNARY_RESEARCH.md
TERNARY COMPUTING AND IOTA'S TERNARY HISTORY
A Deep Technical + Historical Review — with Implications for the Qals Project
Version note: this is the comprehensive canonical version. A tighter ~2,500-word variant with extra details (Curl-P 243-trit rate and Winternitz-signing impact; Qubic's modern KangarooTwelve + FourQ stack) is preserved at
archive/TERNARY_RESEARCH_20260906_v2_concise.md.
Date: 2026-09-06 · Author: research agent (superlocal) · Status: complete
Method: live web sources (Wikipedia, IACR ePrint, arXiv API, IOTA wiki, Wayback Machine) + first-hand reading of local code clones in ~/projects/GLM_projects/crypto_currency/repos/ (entangled, bee, iota-sdk, iota). Code citations reference files that were actually read. Claims that could not be verified from a primary source are tagged [UNVERIFIED].
PART 1 — TERNARY COMPUTING FUNDAMENTALS
1.1 Radix economy: the math (and its limits)
The standard cost model. To represent an integer up to N in base b you need about log_b(N) digits. If hardware cost of a digit cell is roughly proportional to the number of states it must distinguish (i.e. cost ≈ b per digit), the total cost is:
E(b, N) = b · log_b(N) = (b / ln b) · ln N
So for large N, cost efficiency is governed by the factor b/ln(b) (see Optimal radix choice, Wikipedia). Evaluating it:
| base b | b / ln b | relative to optimum E(b)/E(e) |
|---|---|---|
| 2 | 2 / 0.693147 = 2.88539 | 1.0615 |
| e | 2.71828 / 1 = 2.71828 | 1.0000 |
| 3 | 3 / 1.098612 = 2.73072 | 1.0046 |
| 4 | 2.88539 | 1.0615 |
| 10 | 4.34294 | 1.5977 |
Base 3 is the integer radix closest to the optimum. The continuous optimum is a classic calculus exercise (posed and solved by Jakob Steiner in 1850): minimize x/ln x, whose solution is x = e; equivalently, maximize x^(1/x) → e^(1/e) ≈ 1.44467. Among integers, b/ln b is minimized at b = 3: binary costs ~5.7% more than base 3 (ratio 1.0615), while base 3 is only ~0.46% off the theoretical optimum (ratio 1.0046). These are exactly the figures from the prompt and they check out against the Wikipedia table (which also cites the 1950 engineering text High-Speed Computing Devices, whose triode ring-counter analysis concluded "the radix 3, on the average, is the most economical choice, closely followed by radices 2 and 4").
Caveats — be honest about them: - The cost model assumes digit cost grows linearly with b. Real CMOS gates don't price that way: a binary inverter is not "half" a ternary threshold gate. Noise margin shrinks as b grows, so reliability cost grows faster than linear. - Brian Hayes ("Third Base", American Scientist 89(6), 2001 — JSTOR) both popularized and deflated the argument; Underwood Dudley's Mathematical Cranks (MAA, 1992) outright mocks "base e is best" numerology. The 5.7% figure is a statement about idealized components, not about computers. - Where the model is legitimately useful: decision trees and menus (optimal branching factor ≈ 3 — ternary search trees, IVR menus), d-heaps (d = 3–4 optimal in practice), and any storage where states genuinely cost ∝ states (multi-level flash, which industry happily uses — see §1.4).
1.2 Balanced ternary: the pretty number system
Trits. Balanced ternary digits ("trits") are {-1, 0, +1}, conventionally written T, 0, 1. Any integer has a unique representation Σ tᵢ·3ⁱ with tᵢ ∈ {-1,0,+1}. Example: 5 = 9 − 3 + 1 = (1, T, 1)₃bal. A tryte is 3 trits (27 values), a convenient byte-analogue; IOTA used exactly this (§2.2).
Elegances (all verifiable on paper): - No sign bit. Negation = digit-wise inversion (1↔T). Subtraction is addition of the inverted operand. Every integer from −(3ⁿ−1)/2 to +(3ⁿ−1)/2 is representable symmetrically — no overflow asymmetry like two's complement. - Multiplication table is tiny and sign-symmetric:
| × | T | 0 | 1 |
|---|---|---|---|
| T | 1 | 0 | T |
| 0 | 0 | 0 | 0 |
| 1 | T | 0 | 1 |
(compare: binary needs two products per bit; balanced ternary's is exactly the sign rule).
- Addition carries at most ±1: 1+1 = 1·3 + T (write T, carry 1); T+T = T·3 + 1 (write 1, carry T).
- Rounding = truncation. To round a balanced-ternary fraction to the nearest integer, delete the trailing trits. The most significant discarded trit is ≥ 1 exactly when the value is ≥ 1/2, so truncation is round-to-nearest. (Also: no separate rounding half-cases.)
- Donald Knuth, TAOCP Vol. 2 (Seminumerical Algorithms, §4.1): calls balanced ternary "perhaps the prettiest number system of all", notes a number needs only log₃2 ≈ 63% as many digit positions as binary, and speculates its "symmetric properties and simple arithmetic... will prove to be quite important some day."
- Douglas W. Jones (Univ. of Iowa) maintains the canonical English-language engineering treatment ("Douglas W. Jones on Ternary Computing" / "The Ternary Manifesto"): balanced ternary cuts interconnect wires by ~36%, but he also showed ternary addition needs ~62% more logic gates than binary at equal speed — the trade that keeps resurfacing.
1.3 Historical machines: Setun and Setun-70
Prehistory. Thomas Fowler built an all-wood balanced-ternary calculating machine in 1840 (Glusker, Hogan & Vass, IEEE Annals of the History of Computing, 2005), and mused in a letter to Airy that computing history might have been different had ternary been adopted early. Claude Shannon discussed the symmetric notation in "A Symmetrical Notation for Numbers" (Amer. Math. Monthly, 1950).
Setun (1958). Developed at Moscow State University under Sergei Sobolev with Nikolay P. Brusentsov as executive designer (project initiated 1956; first machine 1958) — see Wikipedia: Setun and Brusentsov et al., "Development of ternary computers at Moscow State University" (Russian Virtual Computer Museum). Key facts: - 18-trit words; 81 words of ferrite-core RAM + 1,944 words on magnetic drum; named after the Setun river. - How ternary from binary parts: each trit was stored in a pair of magnetic (ferrite) cores wired in tandem, giving three stable states out of four possible — Brian Hayes's critique: "A pair of cores could have held two binary bits, which amounts to more information than a single trit, and so the ternary advantage was squandered." The machine's real win was simplicity/reliability (fewer elements, ~1/7 the elements of comparable binary designs per Brusentsov, low power), not radix economy. - ~50 units built at the Kazan Mathematical Machines Plant (1959–1965). It worked well in the field (universities, weather forecasting, plant management; teaching tool in 30+ universities), and a replacement binary machine cost 2.5× as much. - Why it was killed — bureaucracy, not technology: the Kazan plant leadership disliked the low sale price and resisted production (a 1961 act forced the director to keep producing); the Ministry of Foreign Trade never filled foreign orders; production stopped in 1965 at ~15–20 machines/year when the plant refused to continue. Later, a new university rector deemed Brusentsov's work "pseudoscience"; his lab was moved to an attic in a student dormitory and the original Setun prototype was destroyed. - Setun-70 (1970): Brusentsov's redesign around 6-trit "syllables" (~9.5 bits), structured-programming-oriented instruction model (independently of RISC ideas); its architecture lives on via DSSP, a Forth-like stack language emulating Setun-70 on binary hardware.
Douglas W. Jones has written the standard retrospective analyses of Setun's technology and of ternary arithmetic design; his pages remain the main English reference outside the Russian Virtual Computer Museum.
1.4 Modern ternary research (state through 2025–2026)
- Multi-level cell flash is ternary's quiet victory. MLC/TLC/QLC NAND stores 2–16 analog voltage levels per cell. Industry effectively abandoned the "1 bit per cell" dogma for storage (where level-count is cheap) while keeping strictly binary logic. QLC = 16-level cells; "PLC" (5 bits/cell) research is ongoing [UNVERIFIED for current PLC productization].
- Ternary content-addressable memory (TCAM): ubiquitous in network routers/switches. Note: its "ternary" means {0, 1, X} where X = don't-care — a wildcard-match semantic, not arithmetic base 3. Frequently confused with radix-3 computing; don't conflate the two in Qals materials.
- Ternary semiconductors/logic: UNIST (South Korea, Kim Kyung-rok's team) demonstrated the first large-wafer unbalanced-ternary semiconductor design in 2019 (funded via Samsung's future-projects program; Maeil Business, 2019). Carbon-nanotube FET ternary logic is a busy academic niche — 100+ IEEE papers 2020–2024 (per Wikipedia: Ternary computer). Huawei patented a ternary add/subtract logic-gate circuit in 2025 (CN119652311A, "three transistors, three voltage levels"). Josephson-junction ternary memory cells (circulating currents: CW / CCW / off) were proposed as early as 1998 (Morisue et al., ISMVL).
- Ternary optical computing: Jin Yi & He Huacan (Shanghai Univ.) proposed ternary optical computer architecture using light intensity/polarization — dark = 0, two orthogonal polarizations = ±1 (Physica Scripta T118, 2005; Science in China Ser. F, 2003). Impressive lab demos; no general-purpose machine resulted.
- AI: ternary weights (the most commercially real "ternary" of the 2020s). BitNet-style 1.58-bit LLMs quantize weights to {−1, 0, +1} (Ma et al., "The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits", Feb 2024) — balanced ternary by another name, motivated by exactly the radix-economy intuition, now shipping in research-grade inference chips.
- Qutrits (quantum ternary). A qutrit is a 3-level quantum system
|Ψ⟩ = α|0⟩ + β|1⟩ + γ|2⟩. Because superconducting transmons are multi-level anharmonic oscillators anyway, the extra levels are nearly free hardware — the question is whether they help. Signals from the arXiv API query (2025–2026, retrieved today): - Hardware-efficiency erasure qubits from transmon qutrits (arXiv:2604.08672, Apr 2026): logical states in |0⟩ and |2⟩ of a qutrit, erasure detection via ancilla, logical T1 > 500 µs (10× physical) — shows qutrits actively improving error correction on standard superconducting hardware.
- Transversal AND in Quantum Codes (Li & Yeh, Reversible Computing 2026, arXiv:2603.04548): AND is reversible on qutrits; a qutrit [[6,2,2]] code with transversal AND, extendable to [[48,2,4]] — qutrits make some fault-tolerant gates cheaper.
- Qutrit CSS stabilizer codes without string logical operators (fracton-style self-correcting memories, arXiv:2606.19873, 2026); encoder-circuit optimization for qutrit [[9,5,3]], [[5,1,3]], [[7,1,3]] codes (IEEE Trans. Quantum Engineering, 2026); quantum Hamming bound proven in arbitrary local dimension with qutrits as the boundary case (arXiv:2606.22538, 2026); qutrit QEC cycles discovered by multi-agent RL (arXiv:2509.03974).
- Context: the flagship industrial QEC machines of 2024–2026 (Google Willow, IBM, AWS Ocelot) remain qubit/bosonic-qubit based; qutrit/qudit QEC is a credible research direction, not yet a platform bet. [UNVERIFIED beyond the cited arXiv items] any big-lab qutrit-processor announcements by name.
- DNA storage base-3: some DNA-storage codec papers explore ternary/ternary-friendly encodings to dodge homopolymer constraints [UNVERIFIED — secondary memory; not load-bearing for this report].
1.5 HONEST VERDICT: why binary won, and when ternary makes sense
Binary won because of ecosystem economics, not math: Boolean algebra maps perfectly onto noisy switching devices; binary noise margins are maximal; CMOS foundries, EDA flows, libraries, verification and testing are all binary-optimized; every ternary gate is built from binary transistors and pays for the privilege. Daniel Etiemble & Michel Israël's VLSI comparison (Computer, 1988) concluded: "Multi-valued circuits and two-valued circuits must not be seen as competitors. If they are seen as such, two-valued circuits have already won." Douglas Jones's own arithmetic (36% fewer wires vs. 62% more logic) shows the radix-economy dividend being eaten by gate complexity.
Ternary genuinely makes sense when: (a) states are cheap but digits/wires/energy are expensive (flash storage, on-chip interconnect, optical channels); (b) symmetric signed data dominates (ternary weights in AI; analog computing); (c) levels come for free in the physics (qutrits in transmon hardware); (d) aesthetics/pedagogy. A general-purpose ternary CPU in 2026 remains a hobby (e.g. Triador, 5500FP projects) [UNVERIFIED beyond project pages].
PART 2 — IOTA'S TERNARY ERA (2014–2021)
2.1 Jinn Labs and the origin story
IOTA's four founders — David Sønstebø, Sergey Ivancheglo ("Come-from-Beyond", co-author of NXT's proof-of-stake), Serguei Popov (mathematician), Dominik Schiener — first organized in Norway around 2014 as Jinn, a startup aiming to build balanced-ternary microprocessors for IoT (sensors that natively compute in trits). Jinn ran a token sale in September 2015; when the hardware path proved impractical, the team pivoted the token economics into IOTA, whose public crowdsale (Nov–Dec 2015) raised ~1,337 BTC (≈ US$500k at the time) — Wikipedia: IOTA says "approximately 1300 BTC... approximately US$500,000". The Jinn token was later mapped/redeemed into IOTA tokens [UNVERIFIED — commonly recounted in community histories; I could not reach a primary Jinn source; the archived jinn.io (Wayback 2018/2019/2021) is now a parked domain]. Hardware never shipped; Jinn as a company is dead. The ternary-computing dream survived as Qubic (Popov/Ivancheglo, 2017 whitepaper — ternary oracle/computing layer on IOTA; the name is usually glossed as "qu-balanced trit-coded inputs and outputs" [UNVERIFIED]). Qubic later left the IOTA orbit entirely and launched as its own ledger (2022) [UNVERIFIED]; the 1337 (leet) figure and dates above should be double-checked against contemporaneous Bitcointalk threads before quoting.
Ivancheglo resigned from the IOTA Foundation board in June 2019 (founder dispute, his Medium account); Sønstebø was parted from the Foundation in Dec 2020 — both departures bracket the ternary era's end.
2.2 The trinary data model (from the actual code)
All quoted from repos/entangled (IOTA's C library for the trinary era, IOTA Stiftung, Apache-2.0):
common/trinary/trits.h:c typedef int8_t trit_t; // a trit is a whole signed byte holding -1, 0, +1common/defs.h:RADIX 3,TRYTE_ALPHABET "9ABCDEFGHIJKLMNOPQRSTUVWXYZ"(27 chars),NUMBER_OF_TRITS_IN_A_TRYTE 3,NUMBER_OF_TRITS_IN_A_BYTE 5,HASH_LENGTH_TRIT 243,HASH_LENGTH_TRYTE 81,BYTE_VALUE_MIN/MAX -121/121.- So: 1 tryte = 3 trits = one of 27 symbols
9A–Z; an address = 81 trytes = 243 trits; a seed = 81 trytes; messages usedcommon/trinary/tryte_ascii.cto map ASCII into trytes. common/trinary/trit_tryte.ckeeps a 27×3 lookup tableTRYTES_TRITS_LUTand converts viavalue = t₀ + 3·t₁ + 9·t₂(normalized into 0..26 to index the alphabet) — seetrits_to_trytes()(lines 52–66) andset_trit_at()(line 44).- Packing variants:
flex_trit(bit-packed trits), andptrit.h("parallel trits", trits as SIMD lanes) used by the PoW solver. T5B1 (5 trits per byte) appears later in the Rust stacks.
2.3 Curl: the ternary sponge (code walkthrough)
File: repos/entangled/common/crypto/curl-p/curl_p.c (header trit.h, constants const.h/const.c, index table indices.h; "(c) 2016 Paul Handy, based on code from come-from-beyond").
- State:
trit_t state[STATE_LENGTH]withSTATE_LENGTH = 3 × HASH_LENGTH_TRIT = 729 trits(const.hline 15). Sponge with rate 243 trits / capacity 486 trits. - Absorb (
curl_absorb, lines 36–46): XOR-copy is overwrite-copy here — each 243-trit block ismemcpy'd over the first third of the state, thentransform(). Squeeze is the mirror image: copy 243 trits out, transform. (I.e. rate/capacity separation is weaker than in Keccak — the capacity is carried across only by not being overwritten.) - Transform (
transform, lines 16–32): runsctx->typerounds (27 or 81 —CURL_P_27/CURL_P_81inconst.h), ping-ponging between two buffers (sandctx) to avoid allocation. Each round is thesboxstep (lines 9–14):c c->state[i] = TRUTH_TABLE[ s->state[CURL_INDEX[i]] + ((unsigned)s->state[CURL_INDEX[i+1]] << 2) + 5 ];i.e. every output trit is a function of exactly two input trits, indexed by a fixed interleaved permutationCURL_INDEX(indices.h:0, 364, 728, 363, 727, ..., 730 entries). With a,b ∈ {−1,0,1}, the lookup indexa + 4b + 5∈ {0,…,10};TRUTH_TABLE = {1, 0, −1, 2, 1, −1, 0, 2, −1, 1, 0}(const.hline 14). The nine reachable entries define a 2-trit → 1-trit ternary S-box (non-injective, 9→3); entries at indices 3 and 7 (value 2) are unreachable padding — dead table slots, a small but telling code smell. - Variants: mainnet addresses and PoW used Curl-P-27 (27 rounds); the enum also defines Curl-P-81 [UNVERIFIED: which callers used 81 — some libraries used it for signature-related hashing]. PoW ("PearlDiver",
curl-p/pearl_diver.c, plushamming.c/hashcash.c/digest.c) searched for a 243-trit hash with ≥ min-weight-magnitude trailing zero trits. - Security red flags visible in the code itself: 729-trit state is tiny; the S-box is massively non-injective; the round function has no constants (fully symmetric under round rotation) and no keying; absorbing is overwrite (not XOR), so differential propagation is trivially controllable by an attacker who picks the second block. This is exactly what the MIT DCI team exploited (§2.4).
2.4 The 2017 MIT DCI controversy — both sides, fairly
The finding. On 7 September 2017, Ethan Heilman (Boston University) and Neha Narula et al. of MIT's Digital Currency Initiative published "IOTA Vulnerability Report: Cryptanalysis of the Curl-P Hash Function". The peer-reviewed version — Heilman, Narula, Tanzer, Lovejoy, Colavita, Virza, Dryja, "Cryptanalysis of Curl-P and Other Attacks on the IOTA Cryptocurrency" (IACR ePrint 2019/344; published at FSE 2020) — abstract states: practical attacks on Curl-P-27 allowing fast generation of colliding messages (even equal-length), a break of the EU-CMA security of the IOTA Signature Scheme (ISS), and in a chosen-message setting the ability to forge signatures and multi-signatures of valid spending bundles. The attacks used Curl-P's structure (the 2-block absorb) to inject controlled differentials — a fault-injection-style collision costing laptop-scale compute, against the then-deployed scheme.
IOTA's response (their strongest points first, as fairness requires):
1. The "copying bug" claim. IOTA asserted that the public JavaScript Curl implementation the DCI analyzed differed from deployed code — the copy was missing a final transform after the last absorb — and therefore the demonstrated forgery did not transfer to mainnet as-is. This had some technical substance: there was a discrepancy in the circulated reference code, and DCI's disclosure (a few days' notice) arrived while IOTA claimed to be mid-refactor.
2. Timing/disclosure. IOTA said DCI had not coordinated responsibly and that a responsible window was needed because ~$2B of user funds were exposed.
3. Conflict-of-interest allegation. IOTA claimed MIT DCI had received donations from projects competitive with IOTA, framing the report as biased. No evidence of technical misconduct was ever produced; this was widely read as deflection.
4. Tone and retaliation. This is where IOTA damaged itself most: legal posturing by a founder against a researcher (FT Alphaville, "FUD, inglorious FUD", 2018), leaked internal emails mocking cryptographers (Vice: "A $5 Billion Cryptocurrency Has Enraged Cryptographers", Mar 2018), the infamous claim that the implementation discrepancy was a deliberate "copy-protection" honeypot (i.e., funds routed through copied-but-buggy code could be seized) — which Neha Narula called deeply concerning. UCL's Centre for Blockchain Technologies severed ties with the IOTA Foundation over the threats to researchers (TNW, Apr 2018).
Adjudication (my reading of the record): DCI's core cryptographic claim was sound and eventually peer-reviewed at a top venue (FSE 2020); Curl-P-27 was broken for its intended purpose (hash-then-sign bundle integrity). IOTA's "copy bug" point affects exploit logistics, not the conclusion — the authors' own paper title says "the cryptography formerly used", and its practical forgery is demonstrated on IOTA's scheme. Meanwhile IOTA's behavior — rolling its own unkeyed ternary hash, then responding with legal threats and a conflict-of-interest smear — became the canonical industry case study of why you don't roll your own crypto. Crucially, IOTA's subsequent engineering (§2.5–2.6) is itself an admission: addresses moved to Kerl within months; ternary left the protocol entirely in 2021.
2.5 Kerl: SHA-3 wearing a trinary coat
With Curl discredited for addresses/signatures, IOTA introduced Kerl — Keccak-384 (SHA-3) wrapped in a trinary interface, so 243-trit values in, 243-trit values out, binary proven crypto underneath. Local code: repos/entangled/common/crypto/kerl/:
- kerl.h: typedef struct { Keccak_HashInstance keccak; } Kerl; (FIPS-202) with kerl_init/absorb/squeeze/reset on trits.
- converter.c: convert_trits_to_bytes() does a full base-3 → base-256 big-integer conversion (12×uint32 limbs) of the 243 trits into 48 bytes (384 bits ≈ 3^243), handling the all-(−1) edge case (null hash) with the HALF_3 constant; the inverse conversion folds bytes back to trits.
- Cost: each Kerl absorb pays a trit→byte conversion + Keccak-384 + byte→trit — proof that once you need real security, the trinary interface is pure overhead.
2.6 Troika: the last ternary hash (and its cryptanalysis)
repos/entangled/common/crypto/troika/troika.{h,c} ("(c) 2019 IOTA Stiftung / Cybercrypt A/S") and mam/troika/:
- Design: ternary sponge, rate 243 trits, state 729 trits organized as 9 columns × 3 rows × 27 slices (troika.h: NUM_ROUNDS 24, TROIKA_RATE 243; troika.c macros COLUMNS 9, ROWS 3, SLICES 27, STATESIZE 729, NUM_SBOXES 243), round function = ternary S-box layer (sub_trytes) + shift_rows + shift_lanes + add_column_parity + add_round_constant, 24 rounds, 0x1 padding, plus a variable-rounds API for cryptanalysis.
- Per Boura, Funk & Rotella (ePrint 2023/036), Troika was designed in 2019 by Kölbl, Tischhauser, Bogdanov and Derbez (CYBERCRYPT ApS, Denmark) for IOTA's ternary architecture.
- The competition: IOTA announced the "International Troika Hash Function Competition" (2019) with an academic jury, inviting cryptanalysis/designs [UNVERIFIED — jury membership and outcome; the competition site is offline and not in the Wayback index under troika.iota.org]. Nothing met the bar before the project pivoted; Troika never entered production. The local README is blunt: "should be regarded as alpha and should not be used in production yet".
- Was it broken? Reduced-round, yes; full, no — but it was never deployed, so "broken" is moot:
- Liu & Isobe, "Preimage Attacks on Reduced Troika with Divide-and-Conquer Methods" (ePrint 2019/618, Jun 2019): preimages on 2–3 rounds.
- Boura, Funk & Rotella, "Differential analysis of the ternary hash function Troika" (ePrint 2023/036, Jan 2023): differential/internal-differential cryptanalysis of reduced-round Troika; noted there were "almost no analysis tools for ternary designs".
- The "2023 Ravi et al. Troika attack" in the tasking brief: not found. IACR ePrint's full-text search for "troika" returns exactly the two papers above. (Prasanna Ravi has published on other IOTA-adjacent crypto, e.g. fault attacks on its signing stack, but not a 2023 Troika break [UNVERIFIED for Ravi's IOTA papers — flagged so we don't mis-cite].) The accurate citation for 2023 is Boura–Funk–Rotella.
- Also in entangled: common/crypto/ftroika/ (a "fast Troika" tryte-oriented variant) and the ISS signature code (common/crypto/iss/v1|v2/iss_curl.c) — ternary Winternitz one-time signatures over Curl/Kerl, used by IOTA until Chrysalis.
2.7 Chrysalis (28 April 2021): ternary is dead, long live ed25519
IOTA 1.5 "Chrysalis" went live 28 April 2021 and, per Wikipedia, removed "controversial decisions such as ternary encoding and quantum-proof [Winternitz one-time] cryptography... replaced with established standards": Ed25519 (EdDSA) signatures, BLAKE2b-256 hashing, plain binary transactions, 64-char iota1... bech32-style addresses. Holders had to migrate tokens from WOTS/Curl addresses to EdDSA addresses (the bulk of supply migrated; ~85% figure commonly cited [UNVERIFIED]). Context: the 2020 Trinity wallet hack ($2M, coordinator shutdown 12 Feb–10 Mar 2020) and the coordination/enterprise push made the binary rewrite politically possible. The ternary hardware lineage was already gone: Jinn dead, Qubic independent, Ivancheglo and Sønstebø out of the Foundation (2019/2020). In public statements IOTA developers settled on the blunt verdict that ternary was abandoned for the sake of standards and auditability — "ternary is dead" is a fair paraphrase of the Chrysalis spec cycle [UNVERIFIED as a verbatim quote].
2.8 Ternary remnants in the 2026 codebases (checked locally)
repos/iota— the current IOTA ledger (IOTA "Rebased", a Move/Sui-derived Rust stack, confirmed by wiki.iota.org's own notice that docs are adapted from SUI Documentation):rgover all Rust sources fortrit|tryte|ternary→ zero hits. Protocol-level ternary is extinct.repos/iota-sdk— the SDK still carries two fossils:sdk/Cargo.tomlpullsiota-crypto 0.23.2with feature"ternary_encoding";sdk/src/pow/score.rs(PowScorer): hash block bytes with BLAKE2b, encode via b1t6 (binary→6-trits-per-byte) into aTritBuf<T1B1Buf>, pad to 243 trits with three zero trits, hash with CurlP, and score PoW bycount_trailing_zeros()= number of trailing zero trits. Yes — Curl-P is still executed in 2026, only for spam-PoW score computation.sdk/src/types/block/payload/milestone/option/receipt/tail_transaction_hash.rs: legacy receipts store 243-trit (T5B1) tail-transaction hashes — migration-era compat only.repos/bee(the pre-Rebased node, now legacy): a completebee-ternarycrate (t1b1/t2b1/t3b1/t4b1/t5b1, balanced/unbalanced trits,b1t6, tryte, serde) andbee-pow/src/score.rsinstantiatingCurlP— maintained-as-frozen, superseded by the Sui fork.repos/entangled— the full trinary museum:common/trinary/*(trit/tryte/flex_trit/ptrit/ascii LUTs),crypto/curl-p,crypto/kerl,crypto/troika+ftroika,crypto/iss/v1|v2(ternary WOTS), andmam/(Masked Authenticated Messaging withntru,wots,mss,pb3,sponge,troika) — archived, unmaintained.
Summary: in 2026, trinary survives in IOTA's orbit only as (a) legacy PoW scoring (CurlP behind a feature flag), (b) migration receipts, and (c) historical repos. Everything cryptographic that matters is ed25519 + BLAKE2b + Keccak-family, in binary.
PART 3 — WHAT THIS MEANS FOR QALS
Recommendation
Do not put ternary anywhere in Qals' cryptography or consensus. Full stop. The evidence is unusually one-sided: the one major project that bet its protocol on base 3 needed a custom hash (Curl), got it broken by MIT DCI (FSE 2020), handled disclosure so badly that UCL cut ties, paid for two protocol rewrites (Kerl 2017–18, Chrysalis 2021), and by 2026 runs a Sui-derived binary stack while still executing CurlP only to compute spam scores. "Radix economy" saves 5.7% on an idealized hardware cost model — it buys nothing in software, where trits cost a byte (or a bit-packing hassle) and every primitive must be hand-audited. A 2026 chain should ship ed25519/BLAKE2b/Keccak or equivalent standard, audited primitives.
What ternary can legitimately buy Qals:
1. Naming & homage (cheap, fun, safe). Smallest unit = 1 trit; ladder in powers of three (1 trit, 27 trits = "tryte", 243 trits = "packet"); docs can tip the hat to Setun and to IOTA's cautionary tale. Zero protocol risk.
2. Ternary weights, not ternary bytes. If Qals ships any on-device AI (the compute-marketplace angle, folder 07_compute_marketplace), {−1,0,+1} quantization (BitNet 1.58-bit line) is the one place balanced ternary is commercially winning right now.
3. A qutrit watchlist, not a roadmap. Qutrit QEC results (2025–2026 arXiv output above) are the first credible "ternary done right" — because physics gives the third level for free. If Qals' long-term differentiator is brokering compute, track qudit/QEC platforms; revisit only when a qutrit machine exists that a customer could actually rent.
4. An honesty box in the whitepaper. One paragraph: we did Steiner's 1850 math (b/ln b minimized at 3, within 0.46% of e vs. binary's 5.7% penalty), we admire Setun, and we still chose binary — because ecosystem, tooling, and auditability beat radix economy every time. That paragraph costs nothing and inoculates Qals against exactly the criticism that hobbled IOTA.
What to avoid: conflating with TCAM's "ternary" ({0,1,X}); any trit-based address or hash scheme; any claim that ternary improves cryptographic security (it never has — Curl-P is the standing counterexample).
Key sources
- Wikipedia: Optimal radix choice · Wikipedia: Setun · Wikipedia: Ternary computer · Brusentsov et al., computer-museum.ru/english/setun.htm · Hayes, "Third Base" (American Scientist 2001) · Jones, Ternary Computing pages
- Heilman et al., Cryptanalysis of Curl-P (ePrint 2019/344, FSE 2020) · Liu & Isobe, ePrint 2019/618 · Boura, Funk & Rotella, ePrint 2023/036 · Wikipedia: IOTA · Vice (2018) · FT Alphaville (2018) · TNW UCL (2018)
- Local code:
repos/entangled/common/crypto/curl-p/{curl_p.c,const.h,const.c,indices.h,trit.h},common/trinary/{trits.h,trit_tryte.c,defs.h→common/defs.h},common/crypto/kerl/{kerl.h,converter.c},common/crypto/troika/{troika.h,troika.c,README.md},repos/bee/bee-ternary/,repos/iota-sdk/sdk/src/pow/score.rs,repos/iota-sdk/sdk/Cargo.toml(lines 36–41). - arXiv API qutrit-QEC query (2025–2026 items cited by ID in §1.4) · Ma et al., arXiv:2402.17764.