Assessment reports>Circuit DAO>Design>Atom announcer

Atom announcer

The atom announcers are responsible for providing the price of XCH. Announcer prices are used to update the Oracle price. Each such update requires a minimum of M-of-N announcer price announcements from distinct Announcers that have been approved by governance.

These announcers are custom singletons and are owned by the data providers. Any new announcer is approved by the governance after which they could register themselves and announce the atom values.

Operations

The following operations could be performed on the announcer.

  • Governance operations. The announcer-govern operation can only be performed when it receives a message from the statutes to toggle the activation and updates the APPROVAL parameter.

  • Owner operations. The announcer-register operation is used to register the puzzle and send a message to the announcer registry to register this puzzle. It is important to verify that the APPROVED value is set and the inner_puzzle_hash is provided to make sure that the operation can only be performed by the owner. The announcer-mutate operation can be used by the owner to set the atom value, and the delay is updated to the current timestamp + DELAY. Lastly, the announcer-configure operation allows to change the inner puzzle hash, deposit, delay, activation status, cooldown start, and the atom value.

  • Keeper operations. The announcer-announce operation creates an announcement with the launched ID and the atom value. The announcer-penalize operation penalizes an announcer by reducing the amount of tokens from the puzzle.

Condition filtering and solution-parameters verification

The REMARK, ANNOUNCEMENTS, and MESSAGE conditions returned by the inner puzzles are filtered to make sure these are not protocol-specific announcements. In the case of the keeper operations, the conditions are directly passed as the solution. The conditions should also contain only one CREATE_COIN condition, which is used to get the operation to be performed, along with the arguments, the new puzzle hash, and the deposit amount.

It is also important for the singleton to prove its lineage when it is spent or verify that the parameters are 0 when it is initialized; this is to make sure that the curried parameters are not preset to nonzero values.

Test coverage

Intended branches

Negative behavior

Zellic © 2025Back to top ↑