Test 2.1: Close Deployment - Price Unchanged - Remint Credits Sufficient
Objective: Verify closing deployment uses remint credits (no new AKT minted)
User Actions:
- Create new wallet, fund with 1000 AKT
- Record oracle price (P_initial)
- Create deployment with 500 AKT deposit
- Record RemintCredits after deposit
- Let deployment run briefly (1-2 settlement periods)
- Confirm oracle price is still ~P_initial
- Close deployment:
akash tx deployment close --owner <addr> --dseq <seq> --from <wallet>
- Query final state
Expected Results:
- User receives AKT refund for unused portion
- Refund amount = (Unused ACT) / P_current
- Since price unchanged: AKT out ≈ AKT in (minus compute used)
- RemintCredits decreased by refund amount
- TotalMinted unchanged (no inflationary mint occurred)
- VaultAKT decreased
- OutstandingACT decreased
Critical Verification:
- Check that
TotalMinteddid NOT increase - Confirm refund came from remint credits, not new minting
Test 2.2: Close Deployment - AKT Price Increased - Remint Credits Sufficient
Objective: Verify user receives fewer AKT back when price rose, using only remint credits
User Actions:
- Create new wallet, fund with 1000 AKT
- Record oracle price: P_initial = $1.00
- Create deployment with 500 AKT deposit (user gets 500 ACT worth of credits)
- Record RemintCredits (should be ~500 AKT)
- Let deployment run minimally (avoid significant compute charges)
- [Testnet Admin] Adjust oracle price to P_final = $2.00
- Close deployment
- Query final user AKT balance and BME state
Expected Results:
- User deposited: 500 AKT at \(1.00 =\)500 worth
- User had ~500 ACT credits (minus minimal usage, say 490 ACT remaining)
- At withdrawal: 490 ACT / $2.00 = 245 AKT returned
- User started with 1000 AKT, ends with ~745 AKT
- RemintCredits decreased by 245 AKT (not 500 AKT)
- 255 AKT remains in RemintCredits as surplus
- TotalMinted unchanged (no inflation)
Critical Observations:
- This confirms USD exposure, not AKT exposure
- The “deflationary” effect: remint credits surplus remains in system
Test 2.3: Close Deployment - AKT Price Decreased - Remint Credits Insufficient (Inflationary Path)
Objective: Verify system mints new AKT when remint credits are insufficient
User Actions:
- Create new wallet, fund with 1000 AKT
- Record oracle price: P_initial = $1.00
- Create deployment with 500 AKT deposit
- Record:
- RemintCredits (should be ~500 AKT)
- TotalMinted (baseline)
- Total AKT supply
- Let deployment run minimally
- [Testnet Admin] Adjust oracle price to P_final = $0.50
- Close deployment
- Query final state
Expected Results:
- User deposited: 500 AKT at \(1.00 =\)500 worth
- User had ~490 ACT remaining
- At withdrawal: 490 ACT / $0.50 = 980 AKT needed
- RemintCredits only has 500 AKT
- Shortfall: 480 AKT must be newly minted
- RemintCredits reduced to 0
- TotalMinted increased by 480 AKT
- Total AKT supply increased by 480 AKT
- User receives full 980 AKT
Critical Verification:
- Confirm
TotalMintedincreased (inflationary event) - Verify total AKT supply increased
- This is the inflationary path we discussed earlier
Test 2.4: Close Deployment - Partial Remint Credit Usage
Objective: Verify system uses all available remint credits before minting
User Actions:
- Create scenario where RemintCredits = 300 AKT
- Create situation requiring 400 AKT payout
- Verify:
- 300 AKT comes from remint credits
- 100 AKT is newly minted
- Query ledger record for this transaction
Expected Results:
- RemintCredits reduced by 300 (to 0)
- TotalMinted increased by 100
- Ledger record shows:
RemintCreditIssued: 300 AKTMinted: 100 AKT