Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

hATOM

A liquid staking token over a weighted list of Cosmos Hub validators: mint with ATOM or with LSM shares, burn for LSM shares (an instant exit to staked ATOM), rewards compounded into the stake, one fee on rewards. One CosmWasm contract on the Hub's x/liquid and tokenfactory.

Licence: Apache License 2.0, see LICENSE and NOTICE.

Specification: docs/SPEC.md (messages, roles, settings, invariants).

Audit: audits/2026-11-24-bugless-hatom.pdf by bugless (Mirel Dalcekovic), November 2026: commit e30edbe and the fixes up to cab208a.

Layout

Path What
contracts/hatom/src The contract: contract.rs (entry points, roles, the basket), ops.rs (mints, burns), compound.rs (Compound, AssertInvariants), jail.rs (ReportJailed), query.rs (queries, simulations); the pricing (pricing.rs, quote.rs, math.rs), the valuation (valuation.rs, accrual.rs), the bonded-set reader (active_set.rs), the Hub's messages (chain.rs, proto.rs)
contracts/hatom/tests Flow and property tests on a mocked chain (tests/common)
ts_types/ The TypeScript types and client, generated from the schema (scripts/ts-codegen.sh)
audits/ Third-party audit reports
scripts/ build.sh (the optimized wasm, checked by check-wasm.sh), check.sh (the standing checks), localnet.sh (a throwaway gaiad chain), e2e.sh (end-to-end on it), e2e-dust.sh (the rounding dust of a slashed validator, end-to-end on a chain of its own), schema.sh (the JSON schema), ts-codegen.sh (the TypeScript types)

Build and test

cargo test
cargo clippy --all-targets -- -D warnings      # clippy.toml pins the optimizer's rustc (1.86)
scripts/check.sh                               # the above, the release-profile suite, the overflow guard, the generated files
scripts/build.sh                               # artifacts/hatom.wasm (cosmwasm/optimizer 0.17.0), then check-wasm.sh
# end-to-end on a local gaiad: v28.0.0 is needed (x/liquid, tokenfactory, wasm), taken from the PATH
# or from GAIAD=/path/to/gaiad
LOCALNET_HOME=/tmp/hatom-localnet scripts/localnet.sh
LOCALNET_HOME=/tmp/hatom-localnet scripts/e2e.sh

Schema and TypeScript types: scripts/schema.sh regenerates the JSON schema (contracts/hatom/schema/) from the messages; run it after a message changes. scripts/ts-codegen.sh regenerates ts_types/ (types and client, ts-codegen 1.7.2) from that schema; run it after the schema changes. hydro-fe copies ts_types/ into its app/ts_types/. scripts/check.sh fails when either is stale.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages