Introduction
We express our gratitude to the KiiChain team for the collaborative engagement that enabled the execution of this Blockchain Protocol Security Assessment.
KiiChain is a blockchain project focused on stablecoins and real-world assets, aimed at supporting practical financial use cases. Its broader goal is to improve utility, liquidity, and accessibility for users, businesses, and developers, particularly in emerging markets.
Document | |
|---|---|
| Name | Blockchain Protocol Review and Security Analysis Report for KiiChain |
| Audited By | Tanuj Soni, Lipartiia Nino |
| Approved By | Ivan Bondar |
| Website | https://kiichain.io/→ |
| Changelog | 10/04/2026 - Preliminary Report |
| Changelog | 16/04/2026 - Final Report |
| Platform | KiiChain |
| Language | Golang |
| Tags | Cosmos SDK, Oracle, EVM-compatible |
| Methodology | https://docs.hacken.io/methodologies/blockchain-protocols→ |
Document
- Name
- Blockchain Protocol Review and Security Analysis Report for KiiChain
- Audited By
- Tanuj Soni, Lipartiia Nino
- Approved By
- Ivan Bondar
- Website
- https://kiichain.io/→
- Changelog
- 10/04/2026 - Preliminary Report
- Changelog
- 16/04/2026 - Final Report
- Platform
- KiiChain
- Language
- Golang
- Tags
- Cosmos SDK, Oracle, EVM-compatible
Review Scope | |
|---|---|
| Repository | https://github.com/KiiChain/kiichain/→ |
| Initial Commit | cfe29972b490324c3a919bf44dd4212fc1564e1a |
| Final Commit | f632e7faf979ceb6822be087585798e18db32a3b |
Review Scope
- Repository
- https://github.com/KiiChain/kiichain/→
- Initial Commit
- cfe29972b490324c3a919bf44dd4212fc1564e1a
- Final Commit
- f632e7faf979ceb6822be087585798e18db32a3b
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
Documentation quality
All four custom modules have substantive README files covering state, messages, flows, and edge cases.
Protobuf definitions have service- and message-level comments; field-level documentation would benefit from more consistent coverage.
Additional committed documentation includes an EVM upgrade guide and a security vulnerability report in
contrib/docs/. The project would benefit from formal specifications to capture design rationale.Godoc comments on exported keeper functions are present but brief — more detailed parameter and behavioral documentation would improve maintainability.
The custom ante handler chain (23 Cosmos decorators, 2 EVM) is documented through inline comments; a standalone design document would help clarify the interaction between fee abstraction, oracle fee exemption, and the EVM path.
Code quality
All custom modules have unit tests covering keepers, message servers, types, and genesis. The
ante/package and fee abstraction ante decorators also have test coverage.The fee abstraction ante decorators are documented forks of the SDK's
DeductFeeDecoratorand thecosmos/evmmono decorator, with behavioral changes noted in each file's header.Simulation test support exists only for
tokenfactory.16 linters enabled (including
gosec,staticcheck,govet,errcheck,revive) and enforced in CI.Error handling in ABCI hooks is sound — errors propagate to callers; non-critical failures are logged and skipped.
A small number of
TODOcomments remain in production code.CI runs unit tests with coverage (Codecov) and linting on PRs. A separate e2e workflow runs on pushes to
mainand PRs targetingmain.
Architecture quality
Decentralization: No sudo or admin-privileged module exists. All custom module governance operations route authority through
x/gov. Oracle votes are restricted to bonded validators or their delegated feeders.MsgFundPoolandMsgCreateDenomare callable by any account; tokenfactory mint, burn, force transfer, and metadata operations require per-denomination admin status.Resilience: Fee abstraction self-disables when the native denomination's oracle TWAP becomes unavailable, and independently disables individual fee tokens with missing TWAPs. The oracle handles empty ballot periods gracefully. Price clamping limits per-block fee token price movement.
Interoperability: Custom CosmWasm plugins expose oracle, EVM, tokenfactory, and bech32 queries to contracts, and tokenfactory message execution. A custom oracle EVM precompile exposes exchange rates to Solidity contracts. The IBC transfer stack is extended with Packet Forward Middleware and rate limiting.
Module dependencies: Fee abstraction depends on oracle, ERC20, and bank keepers at runtime — failures can cascade into fee processing, partially mitigated by self-disabling. The rewards module must remain first in
BeginBlockerorder to feed coins to distribution.
System Overview
KiiChain is a Cosmos SDK appchain built on CometBFT consensus with two integrated smart contract runtimes: an EVM and CosmWasm. IBC-Go provides cross-chain communication. The daemon binary is kiichaind, the native denomination is akii.
The chain extends the standard Cosmos module set with four custom modules, and bridges native functionality into both contract runtimes via EVM precompiles and CosmWasm custom plugins.
Custom Modules
Oracle (
x/oracle) Decentralized price feed. Validators or delegated feeders submit aggregate exchange rate votes viaMsgAggregateExchangeRateVote. Feeder delegation is managed throughMsgDelegateFeedConsent. The keeper depends onAccountKeeper,BankKeeper, andStakingKeeper. EndBlock (on the last block of eachVotePeriod) tallies submitted ballots by denomination against a reference denom, persists weighted-median exchange rates, records per-validator success/miss/abstain counts, clears votes, applies the whitelist, and writes aPriceSnapshot. BeginBlock (on the last block of eachSlashWindow) slashes validators who missed vote obligations and prunes stale exchange rates. Two ante decorators —VoteAloneDecoratorandSpammingPreventionDecorator— enforce oracle transaction rules.Token Factory (
x/tokenfactory) Permissionless denomination creation and management. Any account can create native coins underfactory/{creator}/{subdenom}viaMsgCreateDenom. The denom admin can mint (MsgMint), burn (MsgBurn), force-transfer (MsgForceTransfer), change admin (MsgChangeAdmin), and set bank metadata (MsgSetDenomMetadata). Burn-from, force-transfer, and set-metadata operations are gated byenabledCapabilitieson the keeper. The keeper depends onAccountKeeper,BankKeeper, andCommunityPoolKeeper. No BeginBlock or EndBlock logic. This is the only custom module exposed to CosmWasm contracts for both queries and message execution.Fee Abstraction (
x/feeabstraction) Allows fees to be paid in non-native tokens. The keeper depends onBankKeeper,Erc20Keeper, andOracleKeeper. BeginBlock fetches TWAPs from the oracle over a configured lookback window and updates per-fee-token prices (with clamping); if the native oracle denom has no valid TWAP, the module disables itself by writingEnabled = falseto params. At transaction time, custom ante decorators (one for Cosmos txs, one for EVM txs) callConvertNativeFee. This checks whether the user has sufficient native balance; if not, it iterates enabled fee tokens, computes the ceiling-rounded equivalent amount, and attempts to source it from the user's bank balance or via ERC20-to-native conversion through theerc20Keeper. The first successful token is used, and aconvert_feesevent is emitted. Governed byMsgUpdateParamsandMsgUpdateFeeTokens.Rewards (
x/rewards) Time-based linear reward distribution. Stores aRewardPool, aReleaseSchedule(withTotalAmount,ReleasedAmount,EndTime,LastReleaseTime,Active), andParams. BeginBlock computes a linear proportion of remaining rewards based on elapsed seconds, sends that amount from the rewards module account to the fee collector viaSendCoinsFromModuleToModule, and updates the schedule. In the begin block ordering,rewardsruns beforedistribution, ensuring released coins are included in the standard validator/delegator distribution. Anyone can fund the pool viaMsgFundPool; schedule and params are governance-controlled.
EVM Precompiles
Static precompiles extend the Berlin set with: bech32 and p256 (stateless), plus staking, distribution, ics20, bank, gov, slashing, and a custom oracle precompile (stateful). These are registered in app/keepers/precompiles.go and give Solidity contracts direct access to native chain operations.
CosmWasm Bindings
Custom plugins registered in wasmbinding/ expose four query types to contracts — TokenFactory, EVM, Bech32, Oracle — and one message type — TokenFactory (create, mint, burn, transfer, change admin, set metadata).
IBC Stack
Assembled in app/keepers/keepers.go. The transfer stack layers Rate Limiting over Packet Forward Middleware over IBC Callbacks over the base transfer module. The ICA controller is wrapped with IBC Callbacks; the ICA host runs standalone. A wasm IBC handler is registered on its own port and serves as the contract keeper for callback dispatch. A separate IBCv2 transfer stack with callbacks and rate limiting is also configured.
Risks
The fee abstraction module operates without user-facing controls over token selection. When a user's native balance is insufficient to cover transaction fees, the system automatically iterates the fee token registry in a fixed order and selects the first enabled token for which the user holds a sufficient balance — either as a bank denomination or as an ERC20 token, converting the latter without explicit user consent. There is no mechanism to opt out of fee abstraction on a per-transaction basis, specify a preferred fee token, exclude specific tokens, or set a maximum acceptable fee amount. This may result in unexpected expenditure of tokens the user intended to hold, with the risk amplified during periods of rapid price movement when per-block oracle prices lag behind actual market rates. See F-2026-15670 for more context.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2026-1561 | Sub-Second Remaining Duration Causes Division by Zero in CalculateReward | fixed | High | |
| F-2026-1591 | Unpaginated DenomsFromAdmin Query Enables RPC Denial of Service | fixed | Medium | |
| F-2026-1548 | Missing Base Token Price Validation May Cause Chain Halt | fixed | Low | |
| F-2026-1548 | Outdated Governance Prices Cause Fee Token Mispricing | fixed | Low | |
| F-2026-1548 | Lack of Validation for NativeOracleDenom Against Oracle Vote Targets | fixed | Low | |
| F-2026-1562 | MsgUpdateParams Can Set Invalid Token Denom | fixed | Low | |
| F-2026-1561 | BeginBlock Panic From Rewards Pool And Bank Balance Mismatch | fixed | Low | |
| F-2026-1569 | Imprecise End-Time Validation in ChangeSchedule Can Introduce a Halting State | fixed | Low | |
| F-2026-1562 | Schedule Replacement Can Leave Previously Funded Rewards Undistributed | accepted | Low | |
| F-2026-1591 | CosmWasm Metadata Path Bypasses Capability Check | fixed | Low |
Appendix 1. Severity Definitions
Severity | Description |
|---|---|
Critical | Vulnerabilities that can lead to a complete breakdown of the blockchain network's security, privacy, integrity, or availability fall under this category. They can disrupt the consensus mechanism, enabling a malicious entity to take control of the majority of nodes or facilitate 51% attacks. In addition, issues that could lead to widespread crashing of nodes, leading to a complete breakdown or significant halt of the network, are also considered critical along with issues that can lead to a massive theft of assets. Immediate attention and mitigation are required. |
High | High severity vulnerabilities are those that do not immediately risk the complete security or integrity of the network but can cause substantial harm. These are issues that could cause the crashing of several nodes, leading to temporary disruption of the network, or could manipulate the consensus mechanism to a certain extent, but not enough to execute a 51% attack. Partial breaches of privacy, unauthorized but limited access to sensitive information, and affecting the reliable execution of smart contracts also fall under this category. |
Medium | Medium severity vulnerabilities could negatively affect the blockchain protocol but are usually not capable of causing catastrophic damage. These could include vulnerabilities that allow minor breaches of user privacy, can slow down transaction processing, or can lead to relatively small financial losses. It may be possible to exploit these vulnerabilities under specific circumstances, or they may require a high level of access to exploit effectively. |
Low | Low severity vulnerabilities are minor flaws in the blockchain protocol that might not have a direct impact on security but could cause minor inefficiencies in transaction processing or slight delays in block propagation. They might include vulnerabilities that allow attackers to cause nuisance-level disruptions or are only exploitable under extremely rare and specific conditions. These vulnerabilities should be corrected but do not represent an immediate threat to the system. |
Severity
- Critical
Description
- Vulnerabilities that can lead to a complete breakdown of the blockchain network's security, privacy, integrity, or availability fall under this category. They can disrupt the consensus mechanism, enabling a malicious entity to take control of the majority of nodes or facilitate 51% attacks. In addition, issues that could lead to widespread crashing of nodes, leading to a complete breakdown or significant halt of the network, are also considered critical along with issues that can lead to a massive theft of assets. Immediate attention and mitigation are required.
Severity
- High
Description
- High severity vulnerabilities are those that do not immediately risk the complete security or integrity of the network but can cause substantial harm. These are issues that could cause the crashing of several nodes, leading to temporary disruption of the network, or could manipulate the consensus mechanism to a certain extent, but not enough to execute a 51% attack. Partial breaches of privacy, unauthorized but limited access to sensitive information, and affecting the reliable execution of smart contracts also fall under this category.
Severity
- Medium
Description
- Medium severity vulnerabilities could negatively affect the blockchain protocol but are usually not capable of causing catastrophic damage. These could include vulnerabilities that allow minor breaches of user privacy, can slow down transaction processing, or can lead to relatively small financial losses. It may be possible to exploit these vulnerabilities under specific circumstances, or they may require a high level of access to exploit effectively.
Severity
- Low
Description
- Low severity vulnerabilities are minor flaws in the blockchain protocol that might not have a direct impact on security but could cause minor inefficiencies in transaction processing or slight delays in block propagation. They might include vulnerabilities that allow attackers to cause nuisance-level disruptions or are only exploitable under extremely rare and specific conditions. These vulnerabilities should be corrected but do not represent an immediate threat to the system.
Appendix 2. Scope
The scope of the project includes the following components from the provided repository:
Scope Details | |
|---|---|
| Repository | https://github.com/KiiChain/kiichain/→ |
| Commit | cfe29972b490324c3a919bf44dd4212fc1564e1a |
Scope Details
- Repository
- https://github.com/KiiChain/kiichain/→
- Commit
- cfe29972b490324c3a919bf44dd4212fc1564e1a
Assets in Scope
Appendix 3. Additional Valuables
Frameworks and Methodologies
This security assessment was conducted in alignment with recognised penetration testing standards, methodologies and guidelines, including the NIST SP 800-115 – Technical Guide to Information Security Testing and Assessment →, and the Penetration Testing Execution Standard (PTES) →, These assets provide a structured foundation for planning, executing, and documenting technical evaluations such as vulnerability assessments, exploitation activities, and security code reviews. Hacken’s internal penetration testing methodology extends these principles to Web2 and Web3 environments to ensure consistency, repeatability, and verifiable outcomes.