Quantstamp reviewed Chromia (Chromia FT4 (token library)) on 21 Jun 2024: 10 findings, 0 critical; 8 marked fixed, 2 acknowledged.
Report hosted on certificate.quantstamp.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 0 |
| Medium | 0 | 0 | 2 |
| Low | 0 | 2 | 6 |
The most privileged auth descriptor for an account is the main auth descriptor. On account creation, the main auth descriptor requires both the Account flag and the Transfer flag (`A` and `T` flags respectively). This gives it access to all account and transfer operations. Additionally, the main auth descriptor is the only auth descriptor that can call `update_main_auth_descriptor()`. However, the new main auth descriptor is not validated to have the `A` and `T` flags. This could leave the account in a state where no auth descriptors are capable of account or transfer operations, potentially locking all funds held by the account.
`add_auth_descriptor()` makes a call to `validate_auth_descriptor_args()`. Unlike `validate_auth_descriptor_rules()`, `validate_auth_descriptor_args()` doesn't perform any validation on the auth descriptor. This makes it possible to set `signatures_required == 0` for the `multi_sig_args`. In the case of `ft_auth`: Given how the `for` loop in `check_multi_sig_auth()` works, at least one signature is required to reach the `if` statement checking whether the number of signatures has been reached. However, should this implementation ever change, the vulnerability may leak through. In the case of `evm_auth`: `signatures_required == 0` allows **anyone** to use the auth descriptor.
The `get_account_by_auth_descriptor()` query assumes that the `account.id == auth_descriptor.hash()`. However, the `account.id` is not constructed in this way. The query will mistakenly return `null`.
In `rell/src/lib/ft4/external/admin/operations.rell`, the function `add_rate_limit_points()` has no validation on `amount`, which could allow the admin to exceed `rl_config.max_points` (or alternatively input a negative number). Notably, this may affect priority check calculations in `rell/src/lib/ft4/core/prioritization/default/module.rell`. The calculated `priority` value appears to normally fall into the range `[0.0, 1.0]`, however this invariant may break if an improper amount of points are added.
The function `delete_all_auth_descriptors_except_main_message(gtv)` returns the following string: `Please sign the message\nto delete all auth descriptors except main:\n%s\n\n from account:\n{account_id}`. Note that it contains a "%s" however the function does not invoke `format()` on the string. The `gtv` parameter is unused, and its not clear how the `account_id` will be populated. If the string goes unformatted, the message can be used for any `account_id`.
`generate_operation_auth_message()` generates a message for an operation for users to sign. Backslashes are removed from the arguments before being added to the message. This loss of information results in differing arguments conforming to the same message. For example, `"\ ".replace("\"", "") == " \".replace("\"", "")`. In this scenario, both messages could be signed with the same signatures.
It is important to validate inputs, even if they only come from trusted addresses, to avoid human error. The following functions would benefit from additional validation: - `register_crosschain_asset()`: Parameters `origin_blockchain_rid` and `issuing_blockchain_rid` are not checked to be different from `chain_context.blockchain_rid`. - `create_rate_limiter_state_for_account()`: Value `points_at_start` not checked to be lower than `rl_config.max_points`.
In `validate_auth_descriptor_rules()`, the length of `rules_gtv` is validated with the following line in the `else` branch: ``` require(rules_gtv.size() <= chain_context.args.auth_descriptor.max_rules, "Too many rules"); ``` Since "and" occupies slot 0, this only permits `max_rules - 1`.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (130)
236 projects reviewed · 332 reports · latest Oct 2026
See Quantstamp’s auditsSomething wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us