> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hydro.markets/llms.txt
> Use this file to discover all available pages before exploring further.

# Security and audits

> hATOM's trust assumptions, its on-chain protections, the limits integrators should know, and audit reports.

## Audits

| Item | Detail |
| - | - |
| Auditor | Bugless (Mirel Dalcekovic) |
| Dates | 2026-11-02 to 2026-11-23. The report was last revised on 2026-11-24. |
| Scope | The hATOM contract (`contracts/hatom/src`) against `docs/SPEC.md`, at commit [`e30edbe`](https://github.com/informalsystems/hatom-contracts/commit/e30edbe) (2026-10-16), plus the fixes up to [`cab208a`](https://github.com/informalsystems/hatom-contracts/commit/cab208a). The deployed code is built from `cab208a`. |
| Report | [`audits/2026-11-24-bugless-hatom.pdf`](https://github.com/informalsystems/hatom-contracts/blob/main/audits/2026-11-24-bugless-hatom.pdf) |

## Trust assumptions

Holders trust the roles below. Each is set at instantiate.

| Role | Can | Bound |
| - | - | - |
| admin | pause every operation, exits included, for any length of time | only the admin unpauses |
| admin | set the fee, at once | rewards only, never the stake |
| admin | change the basket at any time | each validator bonded and at or under the commission maximum; validators left out are drained by burns, never redelegated |
| admin | name operators and transfer the admin role | two-step transfer |
| operators | pause | can't unpause |
| wasm admin | migrate the contract to any code, at once | a migration never goes to an older version or another contract |

On the [deployed contract](https://docs.hydro.markets/hatom/developers/addresses.md):

* The admin is the Hydro Committee, a [DAO DAO DAO](https://daodao.zone/dao/cosmos1elg0jdr2cn7jdqu4agqnvhmy8n4aayxg365esmudgk56vn7dlf0s8v0j39) (`cosmos1elg0jdr2cn7jdqu4agqnvhmy8n4aayxg365esmudgk56vn7dlf0s8v0j39`). The Hydro Committee has 9 members, trusted members of the Cosmos community: see [Hydro Committee members](https://docs.hydro.markets/hydro/committee/members.md). A proposal passes with 55% of the votes cast and a quorum of 20%, after 2 days of voting.
* The wasm admin is also the Hydro Committee (`cosmos1elg0jdr2cn7jdqu4agqnvhmy8n4aayxg365esmudgk56vn7dlf0s8v0j39`).
* Operators can only pause, so Hydro can react quickly to any circumstance without waiting for a Committee vote. Only the Hydro Committee can unpause.

`Params` (commission maximum, imbalance settings, cooldowns, unbonding time, fan-out) are checked against fixed ceilings at instantiate. No message can change them. Only a migration can.

## Behaviours to know

* **Exit value and pending rewards.** A burn pays at the rate. The rate excludes the rewards since the last `Compound` and the part of earlier gains still being released. Those go to the remaining holders. Regular compounding keeps this small.
* **Rewards in other denoms.** Staking on the Hub also pays rewards in other denoms, such as consumer chain rewards. They are not counted for holders. `Sweep`, which anyone can send, sends them to the fee recipient. This is by design.
* **The Hub's liquid staking caps.** On the Hub, only tokenized shares count as liquid staked. Mints, LSM deposits and `Compound` never meet the caps. A burn tokenizes, so if the Hub's global liquid staking cap (25% of bonded ATOM) were ever reached, burns would be refused, like every tokenization on the Hub. The per-validator cap on the Hub is 100%.
* **Slashing.** The contract's stake is ordinary Hub stake. A slash of a basket validator lowers the delegations, and the rate falls by the loss the locked gain can't cover. The contract detects it at the next operation and re-syncs its books.
* **Jailed validators.** A validator out of the bonded set gets no new stake. Bonuses are off while it is weighted. Once it has been out for a third of the unbonding time, in sighted time, anyone's `ReportJailed` removes it from the weights. A pause stops that clock.
* **Unbonding time.** `unbonding_time_s` is a copy of the Hub's unbonding time, set by hand. The wasm admin keeps it in sync by a migration when a governance change to the Hub's unbonding time passes. Until then, a jailed validator's removal delay is too short if the unbonding time grew, and too long if it shrank.
* **Idle ATOM above the delegations.** Undelegated ATOM (a donation, rewards left idle) counts in the rate but can't be paid in LSM shares. When it exceeds what the delegations can pay, the last exits are refused with `InsufficientDelegation` until a `Compound` delegates it. If no basket validator can take stake, the last exits wait for the admin's `SetBasket`, then a `Compound`. No value is lost in the meantime.
* **Bank transfers of ATOM.** A plain transfer of ATOM to the contract raises the rate at once. It is not spread over time, so it can be front-run. Don't send incentives that way.
* **Fee changes.** A new fee applies to rewards claimed from then on, including rewards that built up before the change and were not compounded yet.
* **Commission rises.** A basket validator above the commission maximum gets no new stake, and bonuses are off for everyone until `rebate_cooldown_s` after the first `Compound` that sees it back under, or after the admin removes it. The admin is expected to remove such a validator quickly.
* **Limits.** No cap on a validator's share of the stake or on the total supply. The basket is never larger than the active set. A burn takes from at most 50 validators by the default plan (more only to cover its amount) and 50 by a split.

## Protections

* **Invariants after every operation.** Every mint, burn, `Compound` and `SetFee` ends with `AssertInvariants`. It checks the supply against the contract's books, each delegation against what the books expect, that the rate didn't fall for existing holders, and that the contract still holds its initial deposit. Any mismatch reverts the whole transaction.
* **Operation guard.** No message starts while another operation is between its start and its final check.
* **Funds.** Only `MintFromNative`, `MintFromLsm` and `Burn` accept funds. A coin sent with any other message would be stranded, or counted as rewards, so those messages refuse it.
* **No first-depositor attack.** `initial_deposit` (at least 1 ATOM) is delegated and minted to the contract itself at instantiate and never leaves it. The supply never returns to 0.
* **Rounding.** Every rounding favours existing holders over the caller.
* **Pricing.** The imbalance fee is exact and never capped. Bonuses only shrink and are paid only from fees other users paid, so no sequence of operations takes more than the pool gives. Entries above `max_fee_bps` are refused, so you learn the price before paying it. Exits are never refused for their fee, and never paid in part.
* **No rate jumps.** Every gain is locked and released linearly. No one can trigger a jump in the rate and trade around it.
* **Jail clocks.** A permissionless removal needs the validator out of the bonded set for the full delay, in sighted time, with each gap between sightings capped. A short outage, or an outage of the reporting bots, doesn't remove a healthy validator.
* **Overflow.** Overflow checks stay on in the release build, dependencies included.
* **Reproducible build.** See [Contract addresses](https://docs.hydro.markets/hatom/developers/addresses.md#check-a-deployment) to compare the code on chain with the repository.

## Report a vulnerability

> [!NOTE]
>
> TBD: the security contact and disclosure process.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.