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
- Create personal world as account1 (world ID: 11)
- Set chunk metadata 10 times as operator
- Delete world as account1 (owner)
- Compare balances
4) Results
Balance Changes
| Account | Initial | After SetMetadata | Final | Net Change |
|---|---|---|---|---|
| account1 (owner) | 9,999,999,926,882 | 9,999,999,292,582 | 10,000,000,222,282 | +295,400 |
| operator | 10,000,002,501,837 | 10,000,002,086,437 | 10,000,002,086,437 | -415,400 |
Storage Cost Breakdown
| Operation | Caller | Storage Fee | Gas Fee |
|---|---|---|---|
| CreateWorld | account1 | 624,300 | 10,000 |
| SetChunkMetadata (1st) | operator | 150,100 | 10,000 |
| SetChunkMetadata (2-10) | operator | 18,300 x 9 = 164,700 | 10,000 x 9 |
| DeleteWorld | account1 | -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
| Account | Storage Paid | Storage Refund | Gas Paid | Net |
|---|---|---|---|---|
| account1 | -624,300 | +939,700 | -20,000 | +295,400 |
| operator | -314,800 | 0 | -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