<!-- XE-13362 · [Low] sys.minter.keys accepts a public key where an account address is required (silent mint lockout) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13362>. The page is the record; this is the same page for reading.*

XE-13362 · Bounty

# \[Low\] sys.minter.keys accepts a public key where an account address is required (silent mint lockout)

Closed · duplicate
—
[xe#379](https://github.com/xeprotocol/xe/issues/379)
filed 2026-11-11 12:07 UTC
by akitaBugBounty

Verdict
:   Duplicate

Tier
:   —

Claimed
:   —

Area
:   Leasing / ledger

Duplicate of
:   [XE-0360](https://bounty.xe.network/XE-0360) triaging

Tracked
:   —

Updated
:   2026-11-20 00:06 UTC

Told
:   2026-11-20 00:05 UTC

### Patches

- [xe#879](https://github.com/xeprotocol/xe/pull/879) open by tipprb
  fix(xe): low--sys-minter-keys-accepts (fixes #379)

### History

- [543797](https://bounty.xe.network/log/543797) 2026-11-20 00:05 UTC github.state\_pushed
- [543796](https://bounty.xe.network/log/543796) 2026-11-20 00:05 UTC github.labels
- [543770](https://bounty.xe.network/log/543770) 2026-11-20 00:05 UTC reply.mirrored
- [543624](https://bounty.xe.network/log/543624) 2026-11-20 00:04 UTC proposal.adopted
- [543623](https://bounty.xe.network/log/543623) 2026-11-20 00:04 UTC reply.sent
- [543622](https://bounty.xe.network/log/543622) 2026-11-20 00:04 UTC ticket.status new → closed
- [542284](https://bounty.xe.network/log/542284) 2026-11-20 00:04 UTC proposal.adopted
- [542283](https://bounty.xe.network/log/542283) 2026-11-20 00:04 UTC ticket.facts area
- [542282](https://bounty.xe.network/log/542282) 2026-11-20 00:04 UTC proposal.adopted
- [542281](https://bounty.xe.network/log/542281) 2026-11-20 00:04 UTC ticket.facts
- [542280](https://bounty.xe.network/log/542280) 2026-11-20 00:04 UTC proposal.adopted
- [542279](https://bounty.xe.network/log/542279) 2026-11-20 00:04 UTC ticket.facts

[Full history](https://bounty.xe.network/log?ref=XE-13362) · [JSON](https://bounty.xe.network/v1/tickets/XE-13362) · [markdown](https://bounty.xe.network/XE-13362.md)

### Report

### Summary

`isMinter` (`core/mint.go:12`) compares the minting block's `Account` against the entries of `sys.minter.keys` verbatim (`strings.EqualFold`). The documentation (`docs/api.md:764`) states that `sys.minter.keys` holds account **addresses**, matched against the block's `account` — unlike `sys.timekeepers` / `sys.oracle` / `sys.dao_keyset`, which hold verifying keys matched against signatures. But the field is named `keys`, the statechain config validation calls each entry `minter key[i]`, and every sibling keyset holds raw verifying keys — so an operator following the naming will configure the minter's **public key** instead of its derived address. Config validation only checks that each entry is 64 hex characters, so a public-key entry is silently accepted; every later mint then fails with "not an authorized minter", including mints from the legitimate minter, with no error at config time. A public key and an account address are both 64 hex characters, so the two spellings cannot be told apart by inspection.

### Impact

A single operator mistake at config time silently disables all XUSD minting: the legitimate minter's mint blocks are rejected ("not an authorized minter") and there is no error, warning, or health signal at config load to reveal the misconfiguration. XUSD is the only mintable asset and the only way new XUSD enters the system, so a misconfigured `sys.minter` blocks the mint supply path entirely until the config is corrected.

Severity is Low, not higher: this is a latent misconfiguration trap, and the live network is configured correctly — the testnet-0005 minter account is `8bc63438d2e9e59ef229865abb73520955da9f3c43b41ff50298884f78ab970d`, and its opening mint block (hash `14c2b2584172...`, 100 XUSD) is FINALIZED, with 12 finalized mint/send blocks on that account. There is no live impact; the defect only bites the next operator who configures a minter by following the field name.

### Root cause (repo `github.com/xeprotocol/xe`, commit `89a542ea51d38375299aee54c6c99102e9bfa666`, "release: testnet-0005 quorum withhold fix")

`core/mint.go:12` — `isMinter` matches the entry verbatim, with no fallback to the derived address:

```
func (l *Ledger) isMinter(account string) bool {
	...
	for _, k := range cfg.Keys {
		if strings.EqualFold(k, account) {
			return true
		}
	}
	return false
}
```

And the rejection is produced in `validateAndAddMint` (`core/mint.go`):

```
if !l.isMinter(b.Account) {
	return fmt.Errorf("mint: account %s is not an authorized minter", shortAddr(b.Account))
}
```

Three things combine to create the trap:

1. The config field is `MinterConfig.Keys` (`core/mint.go`, `Keys []string` json:"keys"\`\`) — the name says "keys", and every other keyset in the same config family (`sys.oracle`, `sys.timekeepers`, `sys.dao_keyset`) holds verifying keys.
2. Statechain config validation (`statechain/kvstore.go:126-132`) only checks the shape of each entry — 64 hex characters, unique — while calling it `minter key[i]`:

```
return fmt.Errorf("minter key[%d] invalid length: got %d, want 64 hex chars", i, len(k))
return fmt.Errorf("minter key[%d] invalid hex: %w", i, err)
return fmt.Errorf("minter key[%d] is a duplicate", i)
```

3. The one place that states the real semantics is a single sentence in `docs/api.md:764`: "`sys.minter.keys` holds account **addresses**, matched against the block's `account` (unlike `sys.timekeepers` / `sys.oracle` / `sys.dao_keyset`, which hold verifying keys matched against signatures)". An account address is `sha256("xe/account/v1" || pubkey)` — also 64 hex — so nothing distinguishes a wrong (pubkey) entry from a right (address) entry at config time.

### Reproduction

PoC tests (assert the trap; they fail once `isMinter` accepts both spellings or the config rejects pubkeys):

- `core/xe02_mint_config_test.go` — `TestXE02MintWorksWithAddressConfig`: mint accepted when `sys.minter` holds the minter's derived address (XUSD balance after mint \= 1,000,000). `TestXE02MintFailsWithPubkeyConfig`: the same mint, signed by the same key, rejected with "not an authorized minter" when `sys.minter` holds the minter's public key instead.

Run:

```
git clone https://github.com/xeprotocol/xe && cd xe
# add the PoC test file above, then:
go test ./core/ -run XE02 -v   # 2/2 PASS (trap reproduced)
```

Live cross-check (testnet-0005, 2026-11-11): the minter account `8bc63438d2e9...` declares pubkey `200048d329da...` on its opening mint block, and that pubkey's derived address IS `8bc63438d2e9...` — i.e. the live `sys.minter` entry is the derived address, which is why minting works there. This confirms the trap is latent, not live.

### Suggested fix

- Make `isMinter` accept both spellings: an entry matches if `entry == account` OR `DeriveAddress(entry) == account`.
- And/or rename/document the field as addresses (e.g. `sys.minter.addresses`, or a doc note on the field) and validate at config load that each entry equals the derived address of some known key — or at least warn when an entry looks like a raw public key rather than a derived address.
- The live network needs no change (it is already configured with the address spelling).

### Environment

- Codebase: `github.com/xeprotocol/xe` @ `89a542e` (2026-11-10)
- Go 1.25.0, `go test` as above, local reproduction only (live testnet used only for read-only cross-checks)

XE payout address: e3d3e4407fec5a846201c7ed8560484ffb881cc30068745a110dd8efb824500c

### Thread

**Joseph Denne**team2026-11-20 00:05 UTCgithub

Thanks. This is the same finding as https://bounty.xe.network/XE-0360, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-13362 and says what differs; it is read like any other.
