Inconsistent price units across flags of the same command (--price-per-tick raw ECC vs --deposit-shells whole SHELL)
Not a correctness bug — every flag is individually documented — but the mixed unit conventions inside one command are an easy footgun. Hit it live during a v0.0.18 shellnet E2E.
dexdo provision mixes three unit systems in adjacent flags:
--price-per-tick Tick price P in raw ECC[2] units; must be a positive multiple of PRICE_STEP(1 SHELL) [default: 1000000000]
--deposit-shells Note ECC[2] allocation in whole SHELL, not raw nano/vmshell (1 SHELL = 1e9 raw) [...]
--max-ticks Max ticks the deal TokenContract bounds to [default: 1024]
So in the same invocation the operator writes --deposit-shells 20 (= 20 SHELL) but must write --price-per-tick 1000000000 for 1 SHELL/tick. The natural attempt --price-per-tick 1 fails pre-flight:
price 1 raw ... is not a whole multiple of PRICE_STEP = 1000000000 raw (1 SHELL)
dexdo buyer --max-price-per-tick is the same (raw ECC, default 1000000000).
Why it bites:
- Adjacent flags of one command read in different units (whole SHELL vs raw nano), which is exactly where users don't re-read the help.
- The DEX.DO terminal presents the buy ticket as
Price/tick: [1] SHELL, so a human copying "1 SHELL/tick" into the raw CLI gets rejected. (The terminal itself converts SHELL→raw internally, so this is specifically about the raw CLI surface for hand-driven use.)
Suggestions (any one):
- Accept whole-SHELL for
--price-per-tick / --max-price-per-tick the way --deposit-shells does (with the same fail-closed floor/overflow handling), so all money flags in a command share one unit; or
- Accept an explicit unit suffix (
1shell / 1000000000raw); or
- If raw must stay, rename to make it unmissable (e.g.
--price-per-tick-raw) and echo the SHELL equivalent in the help/error (= 1 SHELL).
Environment: published dexdo 0.0.18 aarch64-macos, live shellnet 4.0.30, doctor PASS.
Inconsistent price units across flags of the same command (
--price-per-tickraw ECC vs--deposit-shellswhole SHELL)Not a correctness bug — every flag is individually documented — but the mixed unit conventions inside one command are an easy footgun. Hit it live during a v0.0.18 shellnet E2E.
dexdo provisionmixes three unit systems in adjacent flags:So in the same invocation the operator writes
--deposit-shells 20(= 20 SHELL) but must write--price-per-tick 1000000000for 1 SHELL/tick. The natural attempt--price-per-tick 1fails pre-flight:dexdo buyer --max-price-per-tickis the same (raw ECC, default1000000000).Why it bites:
Price/tick: [1] SHELL, so a human copying "1 SHELL/tick" into the raw CLI gets rejected. (The terminal itself converts SHELL→raw internally, so this is specifically about the raw CLI surface for hand-driven use.)Suggestions (any one):
--price-per-tick/--max-price-per-tickthe way--deposit-shellsdoes (with the same fail-closed floor/overflow handling), so all money flags in a command share one unit; or1shell/1000000000raw); or--price-per-tick-raw) and echo the SHELL equivalent in the help/error (= 1 SHELL).Environment: published
dexdo 0.0.18aarch64-macos, live shellnet 4.0.30,doctorPASS.