Quantstamp reviewed Datachain (Datachain - App for Liquidity) on 27 Jan 2025: 11 findings, 0 critical; 9 marked fixed, 2 acknowledged; 1 more marked mitigated.
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 | Mitigated |
|---|---|---|---|---|
| Critical | 0 | 0 | 0 | 0 |
| High | 0 | 0 | 2 | 0 |
| Medium | 0 | 1 | 3 | 1 |
| Low | 0 | 1 | 4 | 0 |
Marked Informational or Undetermined by the firm. Not counted as findings.
Current implementation only tracks transfers above `THRESHOLD`, allowing rate limit bypass through multiple smaller transfers. Allowing unlimited transfers below threshold. **Current Code**: ```solidity if (THRESHOLD < amount) { $._cancellableAmount = amount; $._currentPeriodAmount += amount; } else { $._cancellableAmount = 0; } ```
The `refuelAmount` is capped once received by the destination chain. The source chain validates that the `refuelAmount` is within bounds before sending out the message. However, the `refuelDstCap` can be updated at any time in `BridgeManager.setRefuelCap()`. If the chains fuel caps are ever desynchronized, a user may not have their full refuel amount transferred to them and the difference will be kept by the protocol.
The `getDriftProtocolFee()` is intended to eliminate any profits that might be made from token arbitrage. If `srcPrice < dstPrice`, it will charge the user any profits made from the arbitrage as a fee. Otherwise it will return a fee of zero. However, if the `srcStatus == IStableTokenPriceOracle.PriceDeviationStatus.Normal`, then a fee of zero is returned regardless of whether an arbitrage opportunity exists. If the `dstPrice` has an upwards depeg such that it is worth more than the pegged `srcPrice` (such as $1.01), then an arbitraged trade is possible. While price depegs in the upwards direction tend to repeg quickly, it is important to consider how rapid fluctuations in liquidity affect the protocol.
As described by the delta algorithm, the `Pool.transfer()` function will check that there is sufficient balance in the destination pool before executing a transfer. However, the balance check does not match the balance decremented on receival: ``` // Pool.transfer() feeInfo.lastKnownBalance = amountGD - feeInfo.lpFee + feeInfo.eqReward; if (peerPoolInfo.balance < amountGD) { revert TokiInsufficientPoolLiquidity( peerPoolInfo.balance, amountGD ); } // Pool.recv() peerPoolInfo.lastKnownBalance = peerPoolInfo.lastKnownBalance - feeInfo.lastKnownBalance; ``` If `feeInfo.lpFee > feeInfo.eqReward`, it is possible that the transfer will overdraft and revert due to underflow on the receiving side, thereby breaking the guarantee of finality.
The `_deltaSourceUpdate()` function in `Pool.sol` contains a loop that iterates over all entries in the `_peerPoolInfos` array. The number of iterations of this loop is not bounded by any constant or configuration parameter. If the number of peer pools grows large, this loop could consume excessive gas, potentially leading to out-of-gas errors and a denial-of-service (DoS) condition. **Specifically, the following loops are affected:** ```solidity for (uint256 i = 0; i < peerPoolInfosLength; ++i) { ... } ```
The constructors of implementation contracts fail to call the `_disableInitializers()` function, leaving the contracts vulnerable to unexpected initialization outside the proxy.
The `RecoveredLCPClientUpgradeable.upgrade()` is an unprotected `reinitializer` function that can be exploited in protocol takeover scenarios.
Relying on `address.transfer()` in Solidity for a reentrancy-free transfer of funds can lead to unexpected failed calls. The gas cost of different opcodes has been adjusted before and can be adjusted again, which may create unforeseen side effects.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (47)
240 projects reviewed · 338 reports · latest Nov 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