<!-- XE-10279 · Collateral Slashing Evasion: validateAndAddSend checks raw frontier balance instead of unencumbered stake allowing providers to drain locked collateral · testnet -->
*Markdown view of <https://bounty.xe.network/XE-10279>. The page is the record; this is the same page for reading.*

XE-10279 · Bounty

# Collateral Slashing Evasion: validateAndAddSend checks raw frontier balance instead of unencumbered stake allowing providers to drain locked collateral

Closed · invalid
—
web
filed 2026-11-12 11:27 UTC
by xe:e4cd6974

Verdict
:   Invalid

Tier
:   —

Claimed
:   —

Area
:   Leasing / ledger

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:48 UTC

Told
:   2026-11-20 00:48 UTC

### Patches

None linked.

### History

- [557044](https://bounty.xe.network/log/557044) 2026-11-20 00:48 UTC reply.sent
- [553317](https://bounty.xe.network/log/553317) 2026-11-20 00:33 UTC proposal.adopted
- [553090](https://bounty.xe.network/log/553090) 2026-11-20 00:33 UTC proposal.adopted
- [553089](https://bounty.xe.network/log/553089) 2026-11-20 00:33 UTC ticket.status new → closed
- [552409](https://bounty.xe.network/log/552409) 2026-11-20 00:33 UTC proposal.adopted
- [552408](https://bounty.xe.network/log/552408) 2026-11-20 00:33 UTC ticket.facts area
- [552404](https://bounty.xe.network/log/552404) 2026-11-20 00:33 UTC proposal.adopted
- [552403](https://bounty.xe.network/log/552403) 2026-11-20 00:33 UTC ticket.facts
- [551375](https://bounty.xe.network/log/551375) 2026-11-20 00:32 UTC note.added
- [551374](https://bounty.xe.network/log/551374) 2026-11-20 00:32 UTC proposal.created
- [551373](https://bounty.xe.network/log/551373) 2026-11-20 00:32 UTC proposal.created
- [551372](https://bounty.xe.network/log/551372) 2026-11-20 00:32 UTC proposal.created

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

### Report

## Vulnerability Summary

In `core/ledger.go:972-1002`, `validateAndAddSend` validates whether an account has sufficient balance to execute a transfer:

```
func (l *Ledger) validateAndAddSend(b *Block) error {
...
	oldBal := l.getAssetBalanceOverlay(b.Account, b.Asset)
	if b.Amount == 0 {
		return fmt.Errorf("send amount must be > 0")
	}
	if b.Amount > oldBal {
		return fmt.Errorf("insufficient balance: have %d, sending %d", oldBal, b.Amount)
	}
	if b.Balance != oldBal-b.Amount {
		return fmt.Errorf("balance mismatch: expected %d, got %d", oldBal-b.Amount, b.Balance)
	}
```

When a provider accepts a lease via `BlockLeaseAccept` (`core/ledger.go:1675-1735`), the provider commits an XUSD collateral stake (`b.Amount = Stake`). However, this stake is not deducted from the account's frontier `Balance` field—it is merely recorded in the `Lease` object (`commit.PutLease.Stake = b.Amount`).

Because `validateAndAddSend` compares `b.Amount` against `l.getAssetBalanceOverlay(b.Account, b.Asset)` (the raw unencumbered balance) rather than deducting active, locked lease stakes:

1. A provider can accept multiple leases and commit hundreds of thousands of XUSD in collateral stake.
2. Immediately following lease acceptance, the provider creates and submits a `BlockSend` transferring their entire XUSD balance to an external wallet or exchange address.
3. `validateAndAddSend` permits the transfer because `b.Amount <= oldBal`.
4. If the provider subsequently defaults, shuts down the VM, or acts maliciously, the consumer issues a `BlockLeaseForceSettle`.
5. When the protocol attempts to slash the provider's forfeited stake, the provider's account balance is already zero. The consumer and protocol are left completely uncompensated.

## Impact \& Severity

1. Total Collateral Evasion: Malicious compute providers can offer fake hardware, accept leases, immediately siphon out their committed collateral via `BlockSend`, and walk away with zero risk of financial loss from slashing.
2. Protocol Insolvency \& Escrow Breakdown: Breaks the fundamental economic security guarantee of the XE decentralized cloud, allowing unbacked computational offers.

## Proposed Remediation

In `validateAndAddSend`, enforce that `oldBal` subtracts all active locked stakes across active accepted leases:

```
	lockedStake := l.getActiveLockedStake(b.Account, b.Asset)
	spendable := oldBal - lockedStake
	if oldBal < lockedStake || b.Amount > spendable {
		return fmt.Errorf("insufficient spendable balance: have %d (%d locked in active leases), sending %d", oldBal, lockedStake, b.Amount)
	}
```

### Thread

**XE desk**team2026-11-20 00:48 UTCdesk

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links
https://bounty.xe.network/XE-10279 and says what; it is read like any other.
