{"id":"XE-13245","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"374","source_url":"https://github.com/xeprotocol/xe/issues/374","reporter_id":1343,"title":"[Severe] Provider mints XE for a VM that never existed — settlement has no proof-of-service, stake is zero","area":"leasing-ledger","claimed_tier":"severe","assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-0012","tracked":true,"internal_ref":"#1095","internal_url":"https://github.com/xeprotocol/core/issues/1095","status":"closed","closed_reason":"duplicate","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:03.344901+00:00","updated_at":"2026-11-20T00:06:56.935280+00:00","source_created_at":"2026-11-11T11:59:50+00:00","told_at":"2026-11-20T00:05:00+00:00","status_changed_at":"2026-11-20T00:04:38.444795+00:00","url":"https://bounty.xe.network/XE-13245","body":"## Summary\n\n`lease_settle` — the protocol's only post-genesis XE creation — is purely time-based. A provider collects full emission while delivering no compute, and the victim consumer's XUSD escrow is burned anyway. The settled lease even *improves* the provider's on-chain reputation (`leases_settled_as_provider` +1, `unfulfilled` 0).\n\n## Evidence\n\n`validateAndAddLeaseSettle` (`core/ledger.go:2117`) gates settlement only on: lease exists, not already settled, provider matches, state `LeaseAccepted`, timekeeper attestations, `settleTime >= expiry` and `<= expiry + LeaseSettleGrace`, `b.Amount == LeaseTotalEmission(lease)`. **No check that a VM was provisioned, running, or ever reachable** — attestations only prove wall-clock time (`core/attestation.go:13`, payload = `sha256(leaseHash || timestamp)`). `LeaseStakeDivisor = 0` (`core/ledger.go:116`) → stake is always 0; accept enforces stake 0, settle refunds 0. The stock node itself can be a fake provider: `XE_VM_MOCK=1` → `vm.NewMockManager()` (`node/node.go:522-524`); `Provision()` only creates a temp dir and returns `Status: \"running\"`.\n\n## Reproduction (confirmed 3 independent ways, full PoC: `poc-f4.md`)\n\nAll runs use the exact testnet-0005 code (commit `89a542e`), on a local 2-node devnet with the same 5 s minimum lease / 120 s grace as testnet-0005.\n\n**Run A — stock node, `XE_VM_MOCK=1`, full auto-flow:** lease `e40f924a…` (1 vCPU / 1 GB / 60 s / 0.5×, cost 259 mXUSD, stake 0) auto-accepted in ~5 s. `GET /vms` showed `status: running` with mock credentials — but the mock dir was **empty** and `ps` showed **no QEMU/lima processes ever**. After a real 60 s wait, auto-settle fired: settle block `bf07de81…`, provider XE **5,000,000 → 5,000,518 mXE (+518 = ⌈259×2000/1000⌉)**, consumer XUSD stuck at 999,741 (escrow burned, nothing received). Reputation: settled-as-provider 0→1, unfulfilled 0.\n\n**Run B — hand-built blocks, no VM backend at all:** provider node stopped; hand-built `lease_accept` (`15ffda16…`) and `lease_settle` (`9980c973…`, +518 mXE → 5,001,036) POSTed to the plain consumer node only. Lease 2 settled. Settlement is just a signed block + two wall-clock attestations.\n\n**Run C — bare-ledger harness** (imports only `core`+`store`): settle accepted, +518 mXE. Controls: early settle correctly rejected (`lease not yet expired`); double settle correctly rejected (`lease already settled`).\n\n## Venue caveat (stated honestly)\n\nThis was **not** demonstrated on public testnet-0005 itself: the faucet rejects this VM's hosting-network IP, and XUSD is operator-minted only — the faucet dispenses XE only (it holds 0 XUSD), so an independent tester cannot obtain the XUSD a lease costs. A public-testnet repeat needs the XE team to mint test XUSD to a throwaway account; the reproduction steps in `poc-f4.md` §5 are written so that repeat is a straight rerun. The devnet used identical timing (5 s min lease, 120 s grace) and the identical code.\n\n## Fix direction\n\nRequire proof-of-service at settle (e.g. provider attestation of VM liveness/SSH reachability, or consumer-signed delivery receipt); restore a non-zero provider stake so fake providers have collateral at risk; make mock mode refuse to accept/settle leases (or mark mock-provisioned leases as ineligible for emission).\n\nMy XE address for any reward: 5422b32c07cf2b2ca53b00c2073be5a895dae3fdf13645c05ebdd1c08864cf8f\n\n— @agngmarley\n\n[poc-f4.md](https://github.com/user-attachments/files/34686355/poc-f4.md)","patch_refs":[{"id":729,"repo":"xeprotocol/xe","kind":"pr","ref":"878","title":"fix(xe): severe--provider-mints-xe-for (fixes #374)","url":"https://github.com/xeprotocol/xe/pull/878","note":"","state":"open","author":"tipprb","added_by":"desk","created_at":"2026-11-19T18:12:27.330926+00:00"}],"thread":[{"id":12799,"source":"github","source_ref":"7025801042","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-0012, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-13245 and says what differs; it is read like any other.","created_at":"2026-11-20T00:05:00+00:00"}]}