Skip to Content
ContractsReserch7. Storage Deposit Refund Test

Storage Deposit Refund Test

TL;DR

  • Storage deposit refund goes to the DELETE caller (world owner), not the original depositor
  • Operator paid 314,800 ugnot for metadata storage -> Owner received full 939,700 ugnot refund on world deletion
  • Operator loses entire storage deposit; owner gains net +295,400 ugnot

1) Background and Goal

Verify who receives the storage deposit refund when a Personal World is deleted.

Subjects:

  • World Owner (account1) — world creator and deletion caller
  • Operator — chunk metadata setter

Goals:

  • Identify storage deposit refund recipient
  • Compare refund amount vs paid amount per account
  • Derive production operation implications

2) Test Environment

  • Date: 2025-01-15
  • Execution: gnodev (local machine)
  • Gno RPC: localhost:26657
  • Chain ID: dev
  • World ID: 11
  • account1 (owner): g1mejkh4wt3k8tf9yut3nuw70n588lp9g0449w6k
  • operator: g1nsayuj7ydac0gthssefwtz53xpvfv6rnquczmx

3) Test Procedure

  1. Create personal world as account1 (world ID: 11)
  2. Set chunk metadata 10 times as operator
  3. Delete world as account1 (owner)
  4. Compare balances

4) Results

Balance Changes

AccountInitialAfter SetMetadataFinalNet Change
account1 (owner)9,999,999,926,8829,999,999,292,58210,000,000,222,282+295,400
operator10,000,002,501,83710,000,002,086,43710,000,002,086,437-415,400

Storage Cost Breakdown

OperationCallerStorage FeeGas Fee
CreateWorldaccount1624,30010,000
SetChunkMetadata (1st)operator150,10010,000
SetChunkMetadata (2-10)operator18,300 x 9 = 164,70010,000 x 9
DeleteWorldaccount1-939,700 (refund)10,000

5) Analysis

Refund Mechanism

  • Gno refunds storage deposit to the transaction caller that triggers storage reduction
  • Refund does NOT go to the account that originally paid the storage fee

Cost Flow

  • Operator total storage paid: 314,800 ugnot (150,100 + 164,700)
  • account1 CreateWorld storage paid: 624,300 ugnot
  • DeleteWorld refund total: 939,700 ugnot (= 624,300 + 314,800 + 700)
  • Refund recipient: account1 (owner) — includes operator’s portion

Net Impact

AccountStorage PaidStorage RefundGas PaidNet
account1-624,300+939,700-20,000+295,400
operator-314,8000-100,000-414,800

6) Conclusions

  • Refund recipient: storage deposit refund goes to the deletion caller (owner), not the original payer (operator)
  • Operator risk: setting metadata on a personal world exposes operator’s storage deposit to transfer upon owner deletion
  • Owner profit: owner can receive more refund than originally paid
  • Gno behavior: storage reduction refund is attributed to the transaction caller
Last updated on
Docsv1.0.10