Edge Cases & Error Handling

Test 8.1: Deployment with Insufficient AKT

Objective: Verify graceful failure when user lacks funds

User Actions:

  1. Create wallet with 10 AKT
  2. Attempt deployment requiring 100 AKT deposit
  3. Observe failure

Expected Results:

  • Transaction fails with insufficient funds error
  • No BME state changes
  • No pending record created
  • User’s 10 AKT untouched

Test 8.2: Invalid Swap Route

Objective: Verify rejection of unsupported token conversions

User Actions:

  1. Attempt to swap tokens other than AKT↔ACT (if possible via direct tx)

Expected Results:

  • Error: ErrInvalidDenom: invalid swap route
  • No state changes

Test 8.3: Insufficient ACT Supply for Burn

Objective: Verify error when burning more ACT than exists

User Actions:

  1. Attempt scenario where ACT burn requested > total ACT supply

Expected Results:

  • Error: ErrInsufficientVaultFunds
  • No partial execution

Test 8.4: Concurrent Operations - Queue Integrity

Objective: Verify system handles concurrent requests correctly

User Actions:

  1. Create wallet with 5000 AKT
  2. Submit multiple operations simultaneously:
    • Create Deployment A
    • Create Deployment B
    • Top up existing deployment
  3. Verify all operations complete correctly

Expected Results:

  • Each operation gets unique LedgerRecordID
  • Sequence numbers increment correctly within block
  • No race conditions
  • Final state consistent

Test 8.5: Ledger Record ID Uniqueness

Objective: Verify LedgerRecordID is unique across all records

User Actions:

  1. Perform multiple operations across multiple blocks
  2. Query all ledger records
  3. Verify all IDs unique

Expected Results:

  • Each record has unique combination: (Denom, ToDenom, Source, Height, Sequence)
  • Sequence resets each block (per BeginBlocker)
  • No duplicate IDs

Test 8.6: SDL Pricing Denom Validation - Reject uakt

Objective: Verify deployment creation rejects SDL with uakt pricing (must use uact)

Background: With BME enabled, ACT is the only compute payment token. SDL pricing must specify uact. Using uakt should be rejected.

User Actions:

  1. Create SDL with uakt pricing:

    profiles:
    placement:
    akash:
    pricing:
    web:
    denom: uakt # <-- INVALID, should be uact
    amount: 100000
  2. Attempt to create deployment:

    Terminal window
    akash tx deployment create deploy-uakt.yml --deposit 5000000uakt --from <wallet> -y
  3. Observe result

Expected Results:

  • Transaction fails with denom validation error
  • Error message indicates uact required (not uakt)
  • No deployment created
  • No state changes
  • User’s AKT balance unchanged (except gas if tx submitted)

⚠️ Current Status (as of testing):

  • Deployment with uakt pricing is incorrectly accepted
  • This bypasses BME entirely (AKT goes to escrow directly, no ACT conversion)
  • Bug reported - validation check to be added

Why This Matters:

  • Using uakt bypasses the entire BME mechanism
  • No ACT minted, no remint credits accrued
  • Provider settlements would fail or behave unexpectedly
  • Defeats purpose of BME price stability