!5326itz/gaia-writedown-noop → developb831e07be7

Reimburse tcso for GAIA, TRON and LTC, replacing the write-down

AI-generatedEverything on this page was written by an AI agent from the diff: the summaries, the narration, the diagrams, the flags and the glossary. It can be wrong or incomplete, so check it against the code before you rely on it.

15commits
9files
590lines changed
251lines to read
v20→21consensus version, unchanged
11,768.65RUNE leaves the Reserve, or none

Where the diff is

What the upgrade does on mainnet

Same registered step; three fixed RUNE payments, all or none, replace the ATOM write-down.

newremoved

3-minute explainer

What changed

Why the write-down went

MR says treasury refilled the vault; not checked on chain here.

books 3,213.35Hub 2,697.58top-up 515.77

The three payments

GAIA, TRON, LTC to one account; Maya, not tcso, paid LTC.

1,161.608,582.432,024.6311,768.65 RUNE

How the amounts were set

All three constants reproduce; the prices and txs are off-chain inputs.

USD÷ RUNE pricehardcoded 1e8

What the migration does

Cached context: any failure pays nothing, and the version still advances.

Reservethor1gkvv…dalf

What the tests catch

Atomicity is caught; doubling TRON, GAIA +1 or swapping the payee pass.

  • payment removed: fail
  • commit or cache removed: fail
  • TRON doubled: still passes
  • payee swapped: still passes

State + upgrade

Migration

v20→v21

Same slot; on mainnet sends 11,768.65313600 RUNE from Reserve to thor1gkvv…dalf in three payments, all or none. Off mainnet, a no-op.

Line by line · every changed logic line, narrated

8:03runtime
12code chapters
100%logic lines narrated (234/234)
11flagged spots
speed

Chapters

What to check

Ask an AI about this change

Chat assistantClaude, ChatGPT, … (reads a link)

Coding agentClaude Code, Cursor, … (reads the repo)

The context file is context.md. Use Copy with context for an AI that can't open links; it pastes the whole file in.

Glossary

Asgard
The module account and vault type holding pooled funds. This migration does not touch it.
Consensus version
The module's state version. The stored version must be 20 for this migration to run. module.go ↗
LUVI
The guard on LP value in a pool. A CI gate fails migrations that drop it beyond tolerance without a declared entry. luvi_migration.go ↗
mso
Maya Secured Ops, the Ethereum sender 0xA388…bC80 that paid the LTC refund in ETH. Per the code comment; not checked on chain here.
Reserve
The protocol's RUNE module account. It pays these reimbursements.
Soft-skip
Logging and returning nil when a migration can't proceed, so the upgrade doesn't halt. Here all three payments are then simply lost.
tcso / Secured-Ops
The recipient, named adr028SecuredOpsAddr in earlier migrations. The MR title says treasury; common.TreasuryAddress differs. Maya Secured Ops (mso) is separate. migrations_mainnet.go ↗
Top-up
tcso's direct ATOM transfer to the vault on the Cosmos Hub, restoring backing. Per the MR; not checked on chain here.
Vault ...jy4h
The Asgard vault credited for five GAIA inbounds it never received; named by the end of its public key.
Write-down
Removing asset amounts from vault books and pool depth. This MR removes a planned one for GAIA.ATOM.