{"id":"XE-0065","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"90","source_url":"https://github.com/xeprotocol/xe/issues/90","reporter_id":2867,"title":"[Lease Settlement] Provider can settle and claim full emission without ever running the VM (no proof of service, no dispute path)","area":"leasing-ledger","claimed_tier":"high","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-10-29T13:57:20.043892+00:00","updated_at":"2026-11-16T13:42:49.539255+00:00","source_created_at":"2026-10-26T21:51:12+00:00","told_at":"2026-11-08T08:47:25+00:00","status_changed_at":"2026-10-29T14:22:10.434618+00:00","url":"https://bounty.xe.network/XE-0065","body":"Suggested severity: High (10,000 XE).\n\n## Summary\n\n`validateAndAddLeaseSettle` (core/ledger.go:2117-2240) never checks any proof of service: no VM provisioning proof, no consumer confirmation, no uptime evidence, no credential-delivery proof. It only checks provider == account, state == Accepted, not settled, timekeeper attestation median within [expiry, expiry+grace], Amount == LeaseTotalEmission(lease) (based on full Cost, not actual service duration), pending escrow exists, and balances. Accept does not check provisioning either — provisioning only happens in the honest node's `autoAcceptLease` (node/node.go:1460), not in consensus. A modified provider node can hand-craft `lease_accept` + `lease_settle` blocks without ever calling `VMManager.Provision`. There is no dispute/complaint mechanism anywhere in the codebase (grep for dispute|complaint|ProofOfService returns nothing).\n\n## Impact\n\nA malicious provider can take the full XE emission while the consumer's entire XUSD escrow is burned and the consumer never receives a VM. Cost to the attacker is ~0: stake is 0 (LeaseStakeDivisor = 0, refunded on settle via AssetCredit) and PoW is near-free. Settle even increases the provider's reputation (LeasesSettledAsProvider++). The consumer cannot fight back: cancel is only allowed in Created state (except the pre-finalization cancel-wins race), and force-settle is only allowed after expiry + grace + gap, while the provider's settle window (grace) comes first, so the provider always wins the race. This matches the program's explicitly in-scope class \"escrow taken without service\".\n\n## Steps to Reproduce (local, no real funds)\n\n1. Consumer creates a lease to the provider (escrow = full Cost in XUSD, pending).\n2. Provider hand-crafts a `lease_accept` block (stake 0) without provisioning any VM.\n3. Provider waits until expiry, then submits a `lease_settle` block in the grace window with fresh timekeeper attestations.\n4. Observed: settle succeeds, provider receives LeaseTotalEmission(lease) in XE, consumer escrow is burned, no VM was ever provisioned. The same settle path was verified locally with a ledger harness in which no VM code runs at all (settle still succeeds and pays emission).\n5. Sync variant (same root cause): via AddSyncedBlock (skipSkew=true), a provider can collect attestations for a Created lease, then submit a backdated accept (old StartTime) plus a settle inside the old grace window — both pass because attestations bind only time + leaseHash, never proof of service.\n\n## Recommendation\n\nRequire a proof-of-service artifact in settle validation (e.g. a consumer-signed service receipt, or timekeeper attestation over VM provisioning evidence), and add a dispute path that lets the consumer challenge a settle before the escrow is burned.\n\nHonest caveat: the team could answer \"the consumer chooses its provider, this is market risk\". Counter: the program explicitly lists \"escrow taken without service\" as in-scope, and there is no dispute path at all — so this is a protocol flaw, not just a market choice. A Severe argument (25,000 XE) is open (loss of the whole escrow with no dispute path), but this report is filed as High, since the loss per lease is bounded by that lease's Cost.\n\nPayout address: to be provided on request.","patch_refs":[],"thread":[{"id":792,"source":"github","source_ref":"6719441834","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as #21, which was filed first: `lease_settle` checks elapsed time and nothing about service actually delivered. #21 is accepted and the fix is in progress; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, reply with what differs and we will look again.","created_at":"2026-11-08T08:47:25+00:00"}]}