CertiK reviewed Credbull on 13 May 2024: 8 findings, 0 critical; 4 marked fixed, 4 acknowledged.
Report hosted on skynet.certik.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 | 2 | 0 |
| Medium | 0 | 0 | 2 |
| Low | 0 | 2 | 2 |
The `UpsideVault` contract inherits from the `Pausable` contract, which provides functionality to pause and unpause contract operations. However, the `UpsideVault` does not utilize the `whenNotPaused` modifier from the `Pausable` contract in its `_deposit()` and `_withdraw()` functions. This oversight nullifies the benefits of having a pausable mechanism.
The `FixedYieldVault` and `UpsideVault` contracts use the `totalAssetDeposited` variable to track the total assets deposited into the vault. This variable is adjusted upward during deposits and downward during withdrawals. However, if assets are directly transferred into the vault without using the `_deposit()` function (e.g., through donations or direct transfers), these assets are not recorded in `totalAssetDeposited`. they will be locked in the contract indefinitely. Although this issue is somewhat mitigated since both contracts inherit from the `MaturityVault` contract, which includes a `_mature()` function that adjusts `totalAssetDeposited` to match the current balance, this adjustment is not guaranteed to occur before withdrawals are permitted. Moreover, tokens transferred after `_mature()` has been called would still be locked.
The state variable `_balances` in the `UpsideVault` contract is shadowing the same named component in the parent contract `ERC20`. This means that when the derived contract accesses the state variable by its name, it will use the one defined in the derived contract, not the one in the parent contract. This can lead to confusion.
The comments of the `transfer()` and `transferFrom()` functions in the `CredbullBaseVault` contract indicate that tokens sent to the contract should allow for asset redemption. However, there appears to be no mechanism in the provided code to handle the tokens once they reach the contract. This could lead to tokens being locked within the contract with no clear method for users to retrieve the corresponding assets. ```solidity /// @notice The share token should be soul bound. Should be transferable only to vault to receive assets back function transfer(address to, uint256 value) public override(ERC20, IERC20) returns (bool) { if (to != address(this)) revert CredbullVault__TransferOutsideEcosystem(); address owner = _msgSender(); _transfer(owner, to, value); return true; } /// @notice The share token should be soul bound. Should be transferable only to vault to receive assets back function transferFrom(address from, address to, uint256 value) public override(ERC20, IERC20) returns (bool) { if (to != address(this)) revert CredbullVault__TransferOutsideEcosystem(); address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } ```
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (15)
1,045 projects reviewed · 1,376 reports · latest May 2025
See CertiK’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