KnightFI Info

KnightFi is the premiere DeFi hub on BlackFort Blockchain — a non-custodial platform where you can stake BXN and bridged assets, bridge crypto to BlackFort, join Fortress contribution pools, and soon swap on the first BlackFort DEX, launch tokens, and earn through play.

KnightFI Logo

TrustNet Score

The TrustNet Score evaluates crypto projects based on audit results, security, KYC verification, and social media presence. This score offers a quick, transparent view of a project's credibility, helping users make informed decisions in the Web3 space.

57.92
Poor Excellent

Real-Time Threat Detection

Real-time threat detection, powered by Cyvers.io, is currently not activated for this project.

This advanced feature provides continuous monitoring and instant alerts to safeguard your assets from potential security threats. Real-time detection enhances your project's security by proactively identifying and mitigating risks. For more information, click here.

Security Assessments

Static Analysis Dynamic Analysis Symbolic Execution SWC Check Manual Review
Contract address
0x02Fd...A889
Network
Ethereum - Mainnet
License MIT
Compiler v0.8.36+commit.8a079791
Type Contribution Pool
Language Solidity
Onboard date 2026/11/21
Revision date 2026/11/21

Summary and Final Words

No crucial issues found

The contract does not contain issues of high or medium criticality. This means that no known vulnerabilities were found in the source code.

Contract owner cannot mint

It is not possible to mint new tokens.

Contract owner cannot blacklist addresses.

It is not possible to lock user funds by blacklisting addresses.

Contract owner can set high fees

Contract owner is able to set fees above 25%. Very high fees can also prevent token transfer.

Contract cannot be locked

Owner cannot lock any user funds.

Token cannot be burned

There is no burning within the contract without any allowances

Ownership is not renounced

The owner retains significant control, which could potentially be used to modify key contract parameters.

Contract is not upgradeable

The contract does not use proxy patterns or other mechanisms to allow future upgrades. Its behavior is locked in its current state.

Scope of Work

This audit encompasses the evaluation of the files listed below, each verified with a SHA-1 Hash. The team referenced above has provided the necessary files for assessment.

The auditing process consists of the following systematic steps:

  1. Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
  2. Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
  3. Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
  4. Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
  5. Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
  6. Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
  7. Actionable Recommendations: Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.

A file with a different Hash has been intentionally or otherwise modified after the security review. A different Hash may indicate a changed condition or potential vulnerability that was not within the scope of this review.

Final Words

The following provides a concise summary of the audit report, accompanied by insightful comments from the auditor. This overview captures the key findings and observations, offering valuable context and clarity.


Smart Contract Analysis Statement

Contract Analysis

The KnightFi Fortress ContributionPoolV2 contract implements a single-asset contribution pool with cohort-based, fixed-multiple payouts. Contributions are collected in forming cohorts, swept to the project treasury when the operator activates a cycle, and repaid pro rata from operator-funded cycle reports until each cohort has received its target multiple, after which it is retired. The contract also records referral commissions, report fees for a list of fee wallets and a claim fee. The same verified source is deployed on Ethereum with USDC (0x02Fd365d7803AAc00C4A58f9b6AdBEc766F9A889) and on BlackFort Exchange Network with BxUSD (0xf27B82349A287484D2e12BaC23FBA34cd42Bc952), and the BlackFort deployment copied the earning positions of an earlier pool when it was deployed. The contract is not upgradeable, uses no proxy and does not issue a token.

Ownership Privileges

The ownership of the contract has been retained by the deployer through role-based access control. The deployer address, an externally owned account, holds the default admin, admin and operator roles on both chains, and a second externally owned account holds the admin role. Because the admin role controls the operator role, that second account can grant itself operator rights at any time. There is no multisig and no timelock, and roles can never be renounced. The owner retains full privileges including:

  • Change the treasury that receives all swept contributions, and activate cycles that sweep every unswept contribution to it
  • Configure fee wallets that take up to 90% of every reported distribution, a claim fee of up to 10% and a referral commission of up to 100% of new contributions, paid out of the capital that would otherwise reach the treasury
  • Change the target multiple of new cohorts, the hardcap, the per-transaction limits, the reinvest minimum, the inviter of any user and the default inviter who collects unassigned commission
  • Pause new contributions, reinvestments and cycle activation, and rescue tokens that the pool does not owe to anyone
  • The owner cannot mint tokens, cannot change the owner, weight or terms of an existing position and cannot alter balances that have already been credited
  • Claims, cancellations of unswept contributions, fee and commission withdrawals and result reporting can never be paused
  • Rescue can only move the pool asset above everything the pool owes, so credited payouts, fees and commissions cannot be taken by an admin
  • Payouts depend entirely on the operator choosing to report and fund each cycle; the contract cannot enforce any return

Security Features

The contract implements several positive security features:

  • Immutable deployment, with source code verified on both block explorers and on-chain bytecode that matches the published source exactly
  • Exact accounting in which every token held by the pool is assigned to a ledger, rounding always favours solvency and fee-on-transfer assets are rejected
  • Reentrancy protection on every function that moves tokens, a pull-payment design and no loop that transfers funds to other users, so one blocked account cannot stop the others
  • Unswept contributions stay refundable until activation, and pausing never blocks an exit

Auditor's Comments

We found no flaw that would let an outside attacker take funds, and extensive stateful testing on both live deployments confirmed that the internal ledgers stay solvent and that no position is paid beyond its multiple. The main risks are centralisation and trust. Either of two externally owned admin keys can redirect the treasury and sweep contributions that are still refundable, swept capital is held by externally owned accounts, and returns rely solely on the team funding each report. The fee ceilings are high, the claim fee can be raised on balances that have already accrued, and the target multiple has no upper limit. Contributors should also be aware that free cancellation lets anyone temporarily occupy the hardcap, that fee-free reinvesting is all-or-nothing per position and is currently limited by the almost full hardcap on Ethereum, and that the positions migrated on BlackFort can still be credited by the previous pool. One fee wallet and the address that collects unassigned commission have never sent a transaction, so their growing balances depend on keys that have not yet been shown to work. We recommend moving the admin roles to a multisig behind a timelock before anything else, then separating the operator key and lowering the fee ceilings before the pools grow further.

Note - This Audit report consists of a security analysis of the KnightFi Fortress ContributionPoolV2 smart contract. This analysis did not include economic analysis of the contract's tokenomics. Moreover, we only audited the main contract for the KnightFi Fortress ContributionPoolV2 team. Other contracts associated with the project were not audited by our team. We recommend investors do their own research before investing.

Files and details

Findings and Audit result

medium Issues | 1 findings

Pending

#1 medium Issue
Externally owned admin accounts can divert unswept contributions without a timelock or multisig
FortressBase.sol
L124-130
L141-148
Description

On both deployments the deployer 0xbe82C3735536bC7558D3dA38E1b6754b53586968 is an externally owned account that holds DEFAULT_ADMIN_ROLE, ADMIN_ROLE and OPERATOR_ROLE, and a second externally owned account, 0xA9adBEe571fDf73ad138947b3856cd9488799fd9, holds ADMIN_ROLE. Because ADMIN_ROLE administers OPERATOR_ROLE, the second account can grant itself the operator role at any time. Either key alone can therefore point the treasury to any address, promote the pending cohort with a zero report and sweep every unswept contribution, the deployer in three transactions and the second admin in four. No privileged function is behind a timelock or a multisig. Those contributions still belong to their owners and are refundable until activation, so the owners lose their right to cancel. On the live state this would have moved 3,114 USDC on Ethereum and 419.58 BxUSD on BlackFort; capital that was already swept sits with the treasury by design and is not additionally exposed. The rating stays at Medium because the extra loss is limited to the refundable capital present at the moment of a compromise, but both keys are hot wallets and the second one has sent more than 1,100 transactions on BlackFort. The same keys also control fees, the target multiple, commission, the default inviter and pausing.

low Issues | 9 findings

Pending

#1 low Issue
Swept capital is held by externally owned accounts and payouts depend on voluntary operator reports
ContributionPoolV2.sol
L663-729
L739-818
Description

At every activation the whole unswept balance, minus commission, leaves the contract for the treasury. On both chains the treasury is an externally owned account, and on Ethereum the 95,640.72 USDC swept in cycle 1 was forwarded to a second externally owned account six minutes later. Nothing in the contract obliges the operator to report or to fund a report, and the reported amount is not tied to any on-chain yield, so the target multiple shown to contributors is a commitment of the team rather than something the code can enforce. There is also no minimum open window, so the operator can report and activate in consecutive transactions and close the cancellation window that contributors expect.

Pending

#2 low Issue
Free cancellation allows zero-cost hardcap squatting
ContributionPoolV2.sol
L852-898
L1281-1288
Description

Contributions share a global hardcap, and an unswept contribution can be cancelled at any time for a full refund, because only the reinvested part of a position pays the claim fee on cancellation. Anyone can therefore fill the remaining capacity, keep every other contributor out with the Hardcap exceeded revert, and cancel right before activation, for instance by reacting to the operator's pending activateCycle transaction. The only costs are gas and the short-term use of the capital. On Ethereum only about 1,245 USDC of capacity was left at the time of the audit, so blocking the pool needed very little capital, and the cycle then activates with less capital than intended.

Pending

#3 low Issue
Unbounded target multiple can block activation and paid reports
ContributionPoolV2.sol
L483-491
L696-698
L1536-1539
Description

setTargetMultiple only enforces the lower floor, and every cohort keeps the multiple that was in force when it was opened. With a value above roughly 1.16e59 bps, activateCycle overflows while computing the exit accumulator and reverts for the whole cycle. Lowering the multiple again does not help because existing cohorts keep their terms, so only a voluntary cancellation by every affected contributor unblocks activation. With a smaller but still unrealistic value such as 1e56 bps, activation succeeds, but the distance to the exit multiplied by the active weight overflows inside the report calculation as soon as that cohort becomes the next one to fill. Every report that would retire the last normal cohort in front of it therefore reverts, so that cohort can never be retired, and once the extreme cohort is first in line every report with a non-zero amount reverts. outstandingObligation and getCohort revert immediately, wherever the cohort sits in the queue. It takes an admin mistake or a malicious admin, but the result is a stuck distribution pipeline.

Pending

#4 low Issue
Migrated positions remain live in the V1 pool
ContributionPoolV2.sol
L1601-1645
Description

The BlackFort deployment copied the 76 earning positions of the V1 pool at 0x7aEd037Eb15DB2371c3F43b2ee884c9EB1504828 at deployment and credited them up to the V1 accumulator, so V2 keeps paying them toward their original multiple. The V1 pool is paused, but its reportCycle is deliberately not pausable, and both accounts that operate V2 still hold OPERATOR_ROLE there. A report sent to V1 by mistake, or by a script still pointing at the old address, credits the same positions a second time, so the same capital earns in both pools and can be paid beyond its multiple. On a copy of the live chain, a 1,000 BxUSD report to V1 gave position 1 an extra 15.61 BxUSD in V1 while it kept earning in V2. Contributors lose nothing, but the operator overpays and the two pools' books diverge.

Pending

#5 low Issue
Contributions are not protected against a target-multiple change in flight
ContributionPoolV2.sol
L833-842
L971-1005
L1303-1324
Description

The documentation promises that contributors always receive the terms displayed when they contributed, but contribute and reinvest do not take the expected multiple as an argument. If the admin lowers targetMultipleBps while a contribution is waiting in the mempool, or right before it, the transaction still succeeds and the position joins a new cohort with the lower multiple, which can be as low as the 1.01x floor. The contributor can cancel until the next activation, but only if they notice the change in time.

Pending

#6 low Issue
Claim fee increases apply to balances that already accrued
ContributionPoolV2.sol
L584-591
L879-880
L912
L947
Description

claimFeeBps is read when a claim is made and is charged on the whole claimable amount, including distributions that were credited while a lower fee was in force. The admin can raise the fee from the current 2% to the 10% maximum at any time without notice, which reduces what contributors receive for value that already belongs to them. The same rate at the time of cancellation is applied to the reinvested part of a cancelled position.

Pending

#7 low Issue
Self-referral turns the commission into a rebate
ContributionPoolV2.sol
L1011-1019
L1290-1299
L1026-1039
Description

Any user can register any address other than their own as inviter, including a second wallet they control, through setInviter or the inviter argument of contribute. Commission is calculated on every contribution and on every reinvested amount and becomes withdrawable after the next activation, so whenever commissionBps is above zero a user simply gets that percentage of their own capital back while keeping the full weight of the position. The BlackFort pool ran with a 1.5% commission during its first cycles. The cost falls on the treasury, which receives correspondingly less capital.

Pending

#8 low Issue
Report fee list may take up to 90% of each distribution
ContributionPoolV2.sol
L161
L558-578
Description

MAX_TOTAL_FEE_BPS is 9,000, so the admin can configure fee wallets that take up to 90% of every reported amount, and the list can be replaced at any time with effect from the next report. The operator chooses and funds the reported amount, so the ceiling does not let anyone take value that is already credited to contributors; what it changes is the split of whatever result is reported. If the reported amount is meant to reflect the pool's actual performance, or if fee wallets belong to third parties, contributors could receive as little as 10% of a published result, and about 9% after the maximum claim fee. Both deployments currently use three fee wallets with 10% each and a 2% claim fee.

Pending

#9 low Issue
Reinvest is all-or-nothing per position and fails above maxPerTx or the remaining hardcap
ContributionPoolV2.sol
L971-1005
L1281-1288
L1326-1333
Description

reinvest always collects the full claimable amount of every listed position and then requires the total to stay within maxPerTx and within the free hardcap capacity. A position whose claimable exceeds either limit can never be reinvested, not even in part, and claim also takes the full amount, so the holder has to claim and pay the claim fee or wait. Repeated contributions to the same open cohort are merged into one position, which makes large claimables more likely. The capacity limit is the more pressing one: on Ethereum only about 1,245 USDC of hardcap room was left at the time of the audit, and earning weight only frees capacity when a cohort retires, so once the first distribution arrives, fee-free reinvesting will in practice be limited to that remaining room unless the hardcap is raised. The admin can also block reinvest for everyone by setting maxPerTx below minReinvest. No capital is lost, because claimable amounts never expire.

optimization Issues | 6 findings

Pending

#1 optimization Issue
Use custom errors instead of revert strings
ContributionPoolV2.sol, FortressBase.sol
Lmultiple (63 require statements)
Description

Every check uses a require with a string message. Each string is stored in the bytecode and copied to memory on revert. The runtime code is 23,460 bytes, about 95% of the 24,576-byte limit, which leaves little room for future fixes.

Pending

#2 optimization Issue
Pack the Cohort struct
ContributionPoolV2.sol
L102-108
Description

Each cohort occupies five storage slots, one of them only for the status enum. The two-slot layout above spreads its saving over the cohort's life: fewer fresh slots when the cohort is created, a cheaper first contribution because the weight shares an already written slot, and one fresh slot less at activation, roughly 60,000 gas per cohort in total, plus fewer cold storage reads in reports and claims.

Pending

#3 optimization Issue
Accumulate in memory before writing to storage
ContributionPoolV2.sol
L703
L949
Description

claimMany subtracts from payoutReserve and activateCycle adds to totalActiveWeight on every loop iteration, which costs a storage write each time even though only the final value matters.

Pending

#4 optimization Issue
Cache repeated storage reads
ContributionPoolV2.sol
L1533
L1549-1555
L720-728
L802-817
Description

The retirement loop of _simulateReport reads cohorts[activeCohortIds[newHead]] twice per step, and activateCycle and reportCycle read currentCycle, accPerUnit, totalActiveWeight and treasury from storage several times in the same call.

Pending

#5 optimization Issue
On-chain position index duplicates event data
FortressBase.sol
L69
L278-282
Description

Every new position pushes its id to _ownerPositionIds, which costs a new storage slot of about 22,000 gas, and the list never shrinks even after cancellation. The same information can be rebuilt from events.

Pending

#6 optimization Issue
Pack the Position struct into three slots
ContributionPoolV2.sol
L110-118
Description

Position uses four slots because weight and claimed each take a full slot. Storing both as uint128 puts them into one slot. Most of the saving appears at a position's first claim, when claimed changes from zero and currently needs a fresh slot of about 20,000 gas, and every later claim or claimableOf call saves one cold storage read.

informational Issues | 9 findings

Pending

#1 informational Issue
Roles can never be renounced and the last default admin can never be removed
FortressBase.sol
L185-204
Description

renounceRole always reverts and revokeRole refuses to remove the caller's own role. This prevents accidental lock-out, but it also means DEFAULT_ADMIN_ROLE can never be left empty, so the contract can never become admin-free, and a key that wants to step down depends on another holder of the same role.

Pending

#2 informational Issue
Import trusts the internal consistency of the old pool
ContributionPoolV2.sol
L1601-1695
Description

The constructor copies EARNING cohorts and positions from the old pool and checks weights and the order of the active list, but not that each listed cohort is EARNING and listed only once, that each EARNING cohort is listed, or that exit accumulators are above the imported accumulator and consistent with their multiple. An inconsistent source would deploy without complaint and could later make paid reports revert. The check runs only once, and the BlackFort import was verified against the V1 state during the audit: all 76 positions and 16 cohorts match and every exit accumulator lies above the imported value.

Pending

#3 informational Issue
Commission or fees credited to an account that never withdraws stay locked
ContributionPoolV2.sol
L1026-1056
L1257-1264
Description

Commission and fees can only be withdrawn by the account they are credited to, and rescue cannot reach them because they are part of owed. If an inviter or a fee wallet is an address that cannot call withdrawCommission or withdrawFee, such as a contract, a mistyped address or a burn address, the amount stays in the pool forever. Two such accounts already exist on the live deployments. The shared default commission account belongs to 0xD741a548b9e93E295A86AB1B2fE438dA63F7Fe7e, which has never sent a transaction on either chain and holds 79.97 BxUSD on BlackFort. The fee wallet 0x975c46a48B0103692309Ad8D6083606F429C54A8 has never sent a transaction either and had 257.09 BxUSD of unwithdrawn fees on BlackFort on 21 November 2026, up from 140.91 BxUSD at the audit snapshot.

Pending

#4 informational Issue
Tokens sent directly to the pool are not credited
ContributionPoolV2.sol
L618-649
L1257-1264
Description

Only contribute creates a position. Tokens transferred straight to the contract become surplus above owed and can only be moved by an admin through rescue. On BlackFort, 0x3A32056b0D8CE6CCE870165bD7c9B2B5cDC71e9B sent 105 BxUSD directly to the pool on 19 November 2026 and received no position; the amount is still recoverable.

Pending

#5 informational Issue
Dependence on the administrative controls of USDC
FortressBase.sol
L259-273
Description

The Ethereum deployment holds USDC, whose issuer can blacklist addresses, pause transfers and upgrade the token. The pool uses pull payments and never transfers to other users inside a loop, so a blacklisted contributor only blocks their own claims while everyone else is unaffected, but such a holder cannot redirect a position and its value stays in the pool. If the pool itself were blacklisted or USDC paused, all payouts would stop. A blacklisted treasury or operator only delays activation or reports until the admin replaces the address. BxUSD on BlackFort is a plain fixed-supply token without such controls.

Pending

#6 informational Issue
Event, view and counter semantics
ContributionPoolV2.sol
L369
L692-694
L786-797
L892-897
L989
L1235-1243
L1365
Description

reinvest emits Claimed with a zero fee for each collected position and adds the amount to totalClaimed, so indexers that read Claimed as a payout overstate withdrawals. ContributionCancelled reports the net refund and leaves out the claim fee kept back, so claim fees cannot be rebuilt from events when a reinvested position is cancelled. Pending cohorts are promoted at a report and empty cohorts are discarded at activation without a dedicated event, DefaultInviterChanged has no indexed parameters, and the cycle field of Contributed holds the current cycle rather than the first cycle in which the contribution earns. totalCommissionAccrued is a gross lifetime counter that also contains commission later unwound by cancellations, and no counter records the unwound part, which explains the gap of 0.21 BxUSD between that counter and the commission ledgers on BlackFort. Finally, commissionOf for the default inviter returns zero although withdrawCommission pays that address the shared account, which commissionOf only shows under the zero address.

Pending

#7 informational Issue
External call before the end of state updates in activateCycle
ContributionPoolV2.sol
L673-729
Description

activateCycle transfers the swept amount to the treasury before it updates the cohorts, the cycle counter and the phase. Every value-moving function is protected by nonReentrant and the assets have no transfer hooks, so this cannot be exploited, but view functions read during such a callback would see a half-updated state if an asset with hooks were ever used.

Pending

#8 informational Issue
Code quality and maintainability
ContributionPoolV2.sol, FortressBase.sol
LContributionPoolV2.sol 146-153
L772-784
L1156-1162
L1432-1435; FortressBase.sol 23-24
L49
L52-53
L88
L155-165
L198-204
L235-239
Description

_ceilDiv duplicates Math.ceilDiv from the OpenZeppelin library that is already part of the build. assetDecimals is stored but never used in any calculation. setPerTxLimits does not re-check minReinvest, so lowering maxPerTx below it silently blocks every reinvest. The Init struct reuses the names of state variables. positionIdsOf returns an unbounded list and outstandingObligation iterates every earning cohort, which can become expensive for integrators. The NatSpec of FortressBase still says the family has no token-rescue function, although ContributionPoolV2 has rescue, and describes the asset as a wrapped BX token, which does not fit the USDC deployment. Claim fees are only distributed inside reportCycle, so after the last cohort retires, during a pause in the open phase or while the fee list is empty they wait until the operator runs another cycle; the amount belongs to the fee wallets and is not lost. The success path of renounceRole is unreachable by design. Native coin forced into the contract cannot be recovered, and the runtime size of 23,460 bytes leaves little room for changes.

Pending

#9 informational Issue
Compiler version with known issues
ContributionPoolV2.sol, FortressBase.sol
L2
Description

Both files are compiled with solc 0.8.36, for which the official bug list names six issues that were fixed in 0.8.37 to 0.8.39. None of their triggering patterns appears in this code: there are no recursive storage structs, the IR pipeline is not used, no element of a memory bytes array is deleted and no custom errors with named arguments exist. The low-severity optimizer issue needs a specific pattern of reassigned memory or storage pointers that the source does not contain.