source stringclasses 1
value | protocol stringclasses 17
values | title stringlengths 4 24 | severity_raw stringclasses 8
values | severity stringclasses 8
values | description stringlengths 198 2k | vulnerable_code stringlengths 0 2k | fixed_code stringlengths 0 2k | recommendation stringclasses 1
value | category stringclasses 12
values | report_url stringlengths 71 98 | collected_at stringlengths 32 32 | source_hash stringlengths 64 64 | code_block_count int64 0 10 | solidity_block_count int64 0 10 | total_code_chars int64 0 1.73k | github_ref_count int64 0 26 | vulnerable_code_is_url bool 2
classes | fixed_code_is_url bool 2
classes | has_code_in_description bool 2
classes | has_recommendation bool 1
class | quality_estimate stringclasses 2
values | primary_code stringlengths 0 1.72k | primary_code_language stringclasses 19
values | primary_code_char_count int64 0 1.72k | all_code_blocks stringlengths 0 1.87k | all_code_blocks_count int64 0 10 | has_diff_blocks bool 2
classes | diff_code stringclasses 71
values | solidity_code stringlengths 0 1.68k | github_refs_formatted stringlengths 0 562 | github_files_list stringlengths 0 203 | github_refs_count int64 0 26 | vulnerable_code_actual stringlengths 0 2k | has_vulnerable_code_snippet bool 2
classes | fixed_code_actual stringlengths 0 2k | has_fixed_code_snippet bool 2
classes | has_vuln_fix_pair bool 2
classes | content_richness_score float64 2.4 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c4 | 02-ethos | orion Q | High | high | Price is not checks when opening//closing trove
## Impact
Contract can return unintended results if collateral price is not configured yet
## Proof of Concept
The open/close trove functionalities takes the price of the collateral from the price feed contract :
```
vars.price = priceFeed.fetchPrice(_collateral);
...... | vars.price = priceFeed.fetchPrice(_collateral);
...
uint price = priceFeed.fetchPrice(_collateral); | oracle | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/orion-Q.md | 2026-01-02T18:17:25.776249+00:00 | 6b067851f4a1976602360075387c024b7d811c0b2078207e19ee8bff9d094fb7 | 1 | 0 | 100 | 0 | false | true | true | false | medium | vars.price = priceFeed.fetchPrice(_collateral);
...
uint price = priceFeed.fetchPrice(_collateral); | unknown | 100 | // Code block 1 (unknown):
vars.price = priceFeed.fetchPrice(_collateral);
...
uint price = priceFeed.fetchPrice(_collateral); | 1 | false | 0 | vars.price = priceFeed.fetchPrice(_collateral);
...
uint price = priceFeed.fetchPrice(_collateral); | true | false | false | 3.71 | |||||||
c4 | 03-asymmetry | 0xnev Q | Critical | critical | ### Issues Template
| Letter | Name | Description |
|:--:|:-------:|:-------:|
| L | Low risk | Potential risk |
| NC | Non-critical | Non risky findings |
| R | Refactor | Code changes |
| O | Ordinary | Commonly found issues |
| Total Found Issues | 28 |
|:--:|:--:|
### Low Risk Template
| Count | Title | Instan... | 4 results - 4 files
/WstEth.sol
33: function initialize(address _owner) external initializer {
34: _transferOwnership(_owner);
35: maxSlippage = (1 * 10 ** 16); // 1%
36: }
/SfrxEth.sol
36: function initialize(address _owner) external initializer {
37: _transferOwnership(_owner);
38: ... | 4 results - 4 files
/WstEth.sol
97: receive() external payable {}
/SfrxEth.sol
126: receive() external payable {}
/SafEth.sol
246: receive() external payable {}
/Reth.sol
245: receive() external payable {} | access-control | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/0xnev-Q.md | 2026-01-02T18:17:44.969194+00:00 | 6b474cfcf86a7a527cec371beb58a31ea9ceccd662c1908ba596de63db96f1e1 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | 4 results - 4 files
/WstEth.sol
33: function initialize(address _owner) external initializer {
34: _transferOwnership(_owner);
35: maxSlippage = (1 * 10 ** 16); // 1%
36: }
/SfrxEth.sol
36: function initialize(address _owner) external initializer {
37: _transferOwnership(_owner);
38: ... | true | 4 results - 4 files
/WstEth.sol
97: receive() external payable {}
/SfrxEth.sol
126: receive() external payable {}
/SafEth.sol
246: receive() external payable {}
/Reth.sol
245: receive() external payable {} | true | true | 5 | ||||||||
c4 | 03-revert-lend | SM3_SS G | High | high |
# Gas Optimizations
| Number | Issue | Instances |
|--------|-------|-----------|
|[G-01]| Precompute Off-Chain When Possible | 6 |
|[G-02]| Check Arguments Early | 3 |
|[G-03]| Don’t make variables public unless necessary | 19 |
|[G-04]| Greater or Equal Comparison Costs Less Gas than Greater Comparison | 24 |
|[G-... | // On-chain computation
function verify(uint numA, uint numB) {
require(numA * numB < 1000);
}
// Precomputed off-chain
function verify(uint result) {
require(result < 1000);
} | file: blob/main/src/V3Oracle.sol
338 if (updatedAt + feedConfig.maxFeedAge < block.timestamp || answer < 0) {
| access-control | https://github.com/code-423n4/2024-03-revert-lend-findings/blob/main/data/SM3_SS-G.md | 2026-01-02T19:03:04.178851+00:00 | 6c025837296b03476ab805ecbe2cdf601f9d69f0fdce50e5eaebd241dc145170 | 2 | 2 | 295 | 1 | false | false | true | false | high | // On-chain computation
function verify(uint numA, uint numB) {
require(numA * numB < 1000);
}
// Precomputed off-chain
function verify(uint result) {
require(result < 1000);
} | solidity | 182 | // Code block 1 (solidity):
// On-chain computation
function verify(uint numA, uint numB) {
require(numA * numB < 1000);
}
// Precomputed off-chain
function verify(uint result) {
require(result < 1000);
}
// Code block 2 (solidity):
file: blob/main/src/V3Oracle.sol
338 if (updatedAt + feedConfig.maxFeedAge <... | 2 | false | // On-chain computation
function verify(uint numA, uint numB) {
require(numA * numB < 1000);
}
// Precomputed off-chain
function verify(uint result) {
require(result < 1000);
}
file: blob/main/src/V3Oracle.sol
338 if (updatedAt + feedConfig.maxFeedAge < block.timestamp || answer < 0) { | V3Oracle.sol#L338 | V3Oracle.sol | 1 | // On-chain computation
function verify(uint numA, uint numB) {
require(numA * numB < 1000);
}
// Precomputed off-chain
function verify(uint result) {
require(result < 1000);
} | true | file: blob/main/src/V3Oracle.sol
338 if (updatedAt + feedConfig.maxFeedAge < block.timestamp || answer < 0) {
| true | true | 8 | ||
c4 | 01-salty | chaduke G | Gas | gas | G1. ``findLiquidatableUsers()`` resizes array ``liquidatableUsers`` into array ``resizedLiquidatableUsers`` by copying element-wise. This is a waste of gas. The resizing can be done by assembly in the original array ``liquidatableUsers`` without copying.
[https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfa... | assembly { mstore(liquidatableUsers, count) }
return liquidatableUsers; | other | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/chaduke-G.md | 2026-01-02T19:01:35.425119+00:00 | 6c177aec8e0e212916cb86647a400f2b94f41495069c36fd61c29ede44ee13c5 | 1 | 0 | 72 | 1 | false | true | true | false | medium | assembly { mstore(liquidatableUsers, count) }
return liquidatableUsers; | javascript | 72 | // Code block 1 (javascript):
assembly { mstore(liquidatableUsers, count) }
return liquidatableUsers; | 1 | false | CollateralAndLiquidity.sol#L311-L342 | CollateralAndLiquidity.sol | 1 | assembly { mstore(liquidatableUsers, count) }
return liquidatableUsers; | true | false | false | 4.4 | |||||
c4 | 02-ethos | hunter_w3b G | High | high | # Gas Optimization
# Summary
| Number | Optimization Details | Context |
|:--:|:-------| :-----:|
| [G-01] | internal functions only called once can be inlined to save gas | 57 |
| [G-02] |Functions guaranteed to revert when called by normal users can be marked payable| 7 |
| [G-03] |<X> += <Y> COSTS MORE GAS THAN <... | File: /Ethos-Core/contracts/BorrowerOperations.sol
438 function _getCollChange(
439 uint _collReceived,
440 uint _requestedCollWithdrawal
441 )
442: internal
443 pure
444 returns(uint collChange, bool isCollIncrease)
455 function _updateTroveFromAdjustment
456 (
457 ... | File: /Ethos-Core/contracts/TroveManager.sol
478 function _getCappedOffsetVals
479 (
480 uint _entireTroveDebt,
481 uint _entireTroveColl,
482 uint _price,
483 uint256 _MCR,
484 uint _collDecimals
485 )
486: internal
487 pure
488 returns (LiquidationValue... | reentrancy | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/hunter_w3b-G.md | 2026-01-02T18:17:17.669886+00:00 | 6c5710edcaf9a252c8346ab91fff1c4811b5c25fe87041bdcf40385263b68b1e | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | File: /Ethos-Core/contracts/BorrowerOperations.sol
438 function _getCollChange(
439 uint _collReceived,
440 uint _requestedCollWithdrawal
441 )
442: internal
443 pure
444 returns(uint collChange, bool isCollIncrease)
455 function _updateTroveFromAdjustment
456 (
457 ... | true | File: /Ethos-Core/contracts/TroveManager.sol
478 function _getCappedOffsetVals
479 (
480 uint _entireTroveDebt,
481 uint _entireTroveColl,
482 uint _price,
483 uint256 _MCR,
484 uint _collDecimals
485 )
486: internal
487 pure
488 returns (LiquidationValue... | true | true | 5 | ||||||||
c4 | 01-salty | 7ashraf Q | Critical | critical |
# Quality Assurance Report
## Summary
The QA report highlights several issues in the codebase. One critical issue ([L-01]) involves the addition of a cooldown period even when the price is not changed, leading to false emissions. Additionally, the report identifies issues such as checking ballot existence before re... | else if ( priceFeedNum == 3 )
priceFeed3 = newPriceFeed;
priceFeedModificationCooldownExpiration = block.timestamp + priceFeedModificationCooldown;
emit PriceFeedSet(priceFeedNum, newPriceFeed); | function markBallotAsFinalized( uint256 ballotID ) external nonReentrant
{
require( msg.sender == address(exchangeConfig.dao()), "Only the DAO can mark a ballot as finalized" );
Ballot storage ballot = ballots[ballotID];
// Remove finalized whitelist token ballots from the list of open whitelisting proposals... | reentrancy | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/7ashraf-Q.md | 2026-01-02T19:01:11.780959+00:00 | 6d4c5f60c83e95af99bfeb91c4af04e0399af96e2cfbc493b1e8e2d0d97fdd2e | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | else if ( priceFeedNum == 3 )
priceFeed3 = newPriceFeed;
priceFeedModificationCooldownExpiration = block.timestamp + priceFeedModificationCooldown;
emit PriceFeedSet(priceFeedNum, newPriceFeed); | true | function markBallotAsFinalized( uint256 ballotID ) external nonReentrant
{
require( msg.sender == address(exchangeConfig.dao()), "Only the DAO can mark a ballot as finalized" );
Ballot storage ballot = ballots[ballotID];
// Remove finalized whitelist token ballots from the list of open whitelisting proposals... | true | true | 5 | ||||||||
c4 | 08-dopex | 0xta G | High | high | # Gas Optimization
# Summary
| Number | Gas | Context |
| :----: | :------------------------------------------------------------------------------------------------------- | :-----: |
| [G-01] | Avoid emitting storage... | 349 emit LogSetAddresses(addresses);
370 emit LogSetPricingOracleAddresses(pricingOracleAddresses);
| 211 emit AddressesSet(addresses);
389 emit PayFunding(
390 msg.sender,
391 totalFundingForEpoch[latestFundingPaymentPointer],
392 latestFundingPaymentPointer
393 );
451 emit CalculateFunding(
452 msg.sender,
453 amount,
454 strike,
455 premium,
456: la... | access-control | https://github.com/code-423n4/2023-08-dopex-findings/blob/main/data/0xta-G.md | 2026-01-02T18:24:27.246007+00:00 | 6d4dd9576a7b173a6af0cb50ec9ca0ce8c4715b8737fc7dd292dd229b8425135 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | 349 emit LogSetAddresses(addresses);
370 emit LogSetPricingOracleAddresses(pricingOracleAddresses);
| true | 211 emit AddressesSet(addresses);
389 emit PayFunding(
390 msg.sender,
391 totalFundingForEpoch[latestFundingPaymentPointer],
392 latestFundingPaymentPointer
393 );
451 emit CalculateFunding(
452 msg.sender,
453 amount,
454 strike,
455 premium,
456: la... | true | true | 5 | ||||||||
c4 | 10-badger | DavidGiladi G | High | high |
### Gas Optimization Issues
|Title|Issue|Instances|Total Gas Saved|
|-|:-|:-:|:-:|
|[G-1] Inefficient use of abi.encode() | [Inefficient use of abi.encode()](#inefficient-use-of-abiencode) | 6 | 600 |
|[G-2] Use assembly to emit events | [Use assembly to emit events](#use-assembly-to-emit-events) | 78 | 2964 |
|[G-3] ... | File: contracts/BorrowerOperations.sol
682 return keccak256(abi.encode(typeHash, name, version, _chainID(), address(this))) | File: contracts/BorrowerOperations.sol
717 bytes32 digest = keccak256(
718 abi.encodePacked(
719 "\x19\x01",
720 domainSeparator(),
721 keccak256(
722 abi.encode(
723 _PERMIT_POSITION_MANAGER_TY... | reentrancy | https://github.com/code-423n4/2023-10-badger-findings/blob/main/data/DavidGiladi-G.md | 2026-01-02T18:26:31.345886+00:00 | 6d53f0184b0e9ea861eca05b8a664c733681007324d23d59a5b8c26cff1ea52b | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | File: contracts/BorrowerOperations.sol
682 return keccak256(abi.encode(typeHash, name, version, _chainID(), address(this))) | true | File: contracts/BorrowerOperations.sol
717 bytes32 digest = keccak256(
718 abi.encodePacked(
719 "\x19\x01",
720 domainSeparator(),
721 keccak256(
722 abi.encode(
723 _PERMIT_POSITION_MANAGER_TY... | true | true | 5 | ||||||||
c4 | 05-ajna | Shubham Q | Critical | critical | ## Non-Critical Issues
| |Issue|Instances|
|-|:-|:-:|
| [NC-1](#NC-1) | Using while for unbounded loops isn’t recommended | 3 |
| [NC-2](#NC-2) | Immutables should be in uppercase | 5 |
| [NC-3](#NC-3) | Use underscores for number literals | 4 |
| [NC-4](#NC-4) | Assembly Codes Specific – Should Have Comments | 2 |
| ... | File: main/ajna-core/src/RewardsManager.sol
L:616 while (claimEpoch <= burnEpochToStartClaim_) {
burnEpochsClaimed_[i] = claimEpoch;
// iterations are bounded by array length (which is itself bounded), preventing overflow / underflow
unchecked {
++i;... | File: main/ajna-grants/src/grants/base/StandardFunding.sol
L:820 while (
targetProposalId_ != 0
&&
_standardFundingProposals[proposals_[targetProposalId_]].votesReceived >
_standardFundingProposals[proposals_[targetProposalId_ - 1]].... | access-control | https://github.com/code-423n4/2023-05-ajna-findings/blob/main/data/Shubham-Q.md | 2026-01-02T18:21:14.866683+00:00 | 6d76eb11ecd91a9c7ad65701a87b41fa1f75455a374c588654fc48e163c90e4a | 2 | 2 | 1,078 | 1 | false | false | true | false | high | File: main/ajna-core/src/RewardsManager.sol
L:616 while (claimEpoch <= burnEpochToStartClaim_) {
burnEpochsClaimed_[i] = claimEpoch;
// iterations are bounded by array length (which is itself bounded), preventing overflow / underflow
unchecked {
++i;... | solidity | 381 | // Code block 1 (solidity):
File: main/ajna-core/src/RewardsManager.sol
L:616 while (claimEpoch <= burnEpochToStartClaim_) {
burnEpochsClaimed_[i] = claimEpoch;
// iterations are bounded by array length (which is itself bounded), preventing overflow / underflow
unchec... | 2 | false | File: main/ajna-core/src/RewardsManager.sol
L:616 while (claimEpoch <= burnEpochToStartClaim_) {
burnEpochsClaimed_[i] = claimEpoch;
// iterations are bounded by array length (which is itself bounded), preventing overflow / underflow
unchecked {
++i;... | RewardsManager.sol#L616-L624 | RewardsManager.sol | 1 | File: main/ajna-core/src/RewardsManager.sol
L:616 while (claimEpoch <= burnEpochToStartClaim_) {
burnEpochsClaimed_[i] = claimEpoch;
// iterations are bounded by array length (which is itself bounded), preventing overflow / underflow
unchecked {
++i;... | true | File: main/ajna-grants/src/grants/base/StandardFunding.sol
L:820 while (
targetProposalId_ != 0
&&
_standardFundingProposals[proposals_[targetProposalId_]].votesReceived >
_standardFundingProposals[proposals_[targetProposalId_ - 1]].... | true | true | 8 | ||
c4 | 08-dopex | Jorgect G | Gas | gas | # GAS REPORT
## [G-01] The RpdxV2Core.sol contract is performing aditional calculation in some cases.
The _curveSwap is calculating the minOut always but this depend of minAmount input so if the minAmount is set the minOut is gonna be calculated but never used.
```
file:contracts/core/RdpxV2Core.sol
function _curveS... | file:contracts/core/RdpxV2Core.sol
function _curveSwap(
uint256 _amount,
bool _ethToDpxEth,
bool validate,
uint256 minAmount
) internal returns (uint256 amountOut) {
...
// calculate minimum amount out
uint256 minOut = _ethToDpxEth
? (((_amount * getDpxEthPrice()) / 1e8) -
((... | function _transfer(uint256 _rdpxAmount, uint256 _wethAmount, uint256 _bondAmount, uint256 _bondId) internal {
if (_bondId != 0) {
(, uint256 expiry, uint256 amount) = IRdpxDecayingBonds(addresses.rdpxDecayingBonds).bonds(_bondId); //@audit (gas) you can get the owner here and not call ownerOf
... | access-control | https://github.com/code-423n4/2023-08-dopex-findings/blob/main/data/Jorgect-G.md | 2026-01-02T18:24:44.301311+00:00 | 6d7cf0381be10934ab767b9cc4f61dac12365afd3dd018c5912c317bfc04bca2 | 2 | 0 | 1,283 | 1 | false | false | true | false | high | file:contracts/core/RdpxV2Core.sol
function _curveSwap(
uint256 _amount,
bool _ethToDpxEth,
bool validate,
uint256 minAmount
) internal returns (uint256 amountOut) {
...
// calculate minimum amount out
uint256 minOut = _ethToDpxEth
? (((_amount * getDpxEthPrice()) / 1e8) -
((... | unknown | 743 | // Code block 1 (unknown):
file:contracts/core/RdpxV2Core.sol
function _curveSwap(
uint256 _amount,
bool _ethToDpxEth,
bool validate,
uint256 minAmount
) internal returns (uint256 amountOut) {
...
// calculate minimum amount out
uint256 minOut = _ethToDpxEth
? (((_amount * getDpxEthP... | 2 | false | RdpxV2Core.sol#L515-L3 | RdpxV2Core.sol | 1 | file:contracts/core/RdpxV2Core.sol
function _curveSwap(
uint256 _amount,
bool _ethToDpxEth,
bool validate,
uint256 minAmount
) internal returns (uint256 amountOut) {
...
// calculate minimum amount out
uint256 minOut = _ethToDpxEth
? (((_amount * getDpxEthPrice()) / 1e8) -
((... | true | function _transfer(uint256 _rdpxAmount, uint256 _wethAmount, uint256 _bondAmount, uint256 _bondId) internal {
if (_bondId != 0) {
(, uint256 expiry, uint256 amount) = IRdpxDecayingBonds(addresses.rdpxDecayingBonds).bonds(_bondId); //@audit (gas) you can get the owner here and not call ownerOf
... | true | true | 8 | |||
c4 | 04-caviar | contractcops Q | Low | low | ## [L-01] changeFee can only be set once & unused parameters in flashFee(address, uint256)
In PrivatePool.sol:
```
87: /// @notice The change/flash fee to 4 decimals of precision. For example, 0.0025 ETH = 25. 500 USDC = 5_000_000.
88: uint56 public changeFee;
```
The change fee is then initialized in the initializ... | 87: /// @notice The change/flash fee to 4 decimals of precision. For example, 0.0025 ETH = 25. 500 USDC = 5_000_000.
88: uint56 public changeFee; | function initialize(
address _baseToken,
address _nft,
uint128 _virtualBaseTokenReserves,
uint128 _virtualNftReserves,
uint56 _changeFee,
...
...
changeFee = _changeFee; | access-control | https://github.com/code-423n4/2023-04-caviar-findings/blob/main/data/contractcops-Q.md | 2026-01-02T18:20:23.725069+00:00 | 6d9f1488e93f956b114fd21b43fb34cb206212a847838ddc198b1575a9fe719a | 4 | 0 | 673 | 5 | false | false | true | false | high | 87: /// @notice The change/flash fee to 4 decimals of precision. For example, 0.0025 ETH = 25. 500 USDC = 5_000_000.
88: uint56 public changeFee; | unknown | 149 | // Code block 1 (unknown):
87: /// @notice The change/flash fee to 4 decimals of precision. For example, 0.0025 ETH = 25. 500 USDC = 5_000_000.
88: uint56 public changeFee;
// Code block 2 (unknown):
function initialize(
address _baseToken,
address _nft,
uint128 _virtualBaseTokenReserves,
... | 4 | false | PrivatePool.sol#L632, PrivatePool.sol#L750, PrivatePool.sol#L251, EthRouter.sol#L105, PrivatePool.sol#L34 | EthRouter.sol, PrivatePool.sol | 5 | 87: /// @notice The change/flash fee to 4 decimals of precision. For example, 0.0025 ETH = 25. 500 USDC = 5_000_000.
88: uint56 public changeFee; | true | function initialize(
address _baseToken,
address _nft,
uint128 _virtualBaseTokenReserves,
uint128 _virtualNftReserves,
uint56 _changeFee,
...
...
changeFee = _changeFee; | true | true | 10 | |||
c4 | 03-asymmetry | carlitox477 G | High | high | # `SafEth.stake()` can use `derivatives` and `weights` storage pointer to save gas in both for loop
```diff
function stake() external payable {
require(pauseStaking == false, "staking is paused");
require(msg.value >= minAmount, "amount too low");
require(msg.value <= maxAmount, "amount too ... | # `SafEth.stake()` can cache `derivativeCount` and `totalWeight` to save gas
This will reduce storage access in both for loops in each iteration | # `SafEth.stake()` can cache `derivatives[i].balance()`
In the first for loop, 2 external calls can be reduced to one by saving the queried value: | access-control | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/carlitox477-G.md | 2026-01-02T18:18:54.407363+00:00 | 6daf9d422a29094acc510906facb1b6b99540d6164c0974ac89bf0e402bd3f3a | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | # `SafEth.stake()` can cache `derivativeCount` and `totalWeight` to save gas
This will reduce storage access in both for loops in each iteration | true | # `SafEth.stake()` can cache `derivatives[i].balance()`
In the first for loop, 2 external calls can be reduced to one by saving the queried value: | true | true | 5 | ||||||||
c4 | 04-caviar | 0xSmartContract G | Medium | medium | ### Gas Optimizations List
| Number | Optimization Details | Context |
|:--:|:-------| :-----:|
| [G-01] |Structs can be packed into fewer storage slots| 2 |
| [G-02] |Function Calls in a Loop Can Cause Denial of Service (DOS) and out of gas due to not checking the Array length| 8 |
| [G-03] |Missing `zero-address` che... | src\EthRouter.sol:
48: struct Buy {
49: address payable pool;
50: address nft;
51: uint256[] tokenIds;
52: uint256[] tokenWeights;
53: PrivatePool.MerkleMultiProof proof;
54: uint256 baseTokenAmount;
55: bool isPublicPool;
56: }
| 2. The ``Sell`` structure can be packaged as suggested below. (from 6 slots to 5 slots)
**1 slot win: 1 * 2k = 2k gas saved**
| access-control | https://github.com/code-423n4/2023-04-caviar-findings/blob/main/data/0xSmartContract-G.md | 2026-01-02T18:19:19.004429+00:00 | 6e1f9b90626378309d8f2c2796ff3a077dfe15ef6e2703f0fd8095de665594f1 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | src\EthRouter.sol:
48: struct Buy {
49: address payable pool;
50: address nft;
51: uint256[] tokenIds;
52: uint256[] tokenWeights;
53: PrivatePool.MerkleMultiProof proof;
54: uint256 baseTokenAmount;
55: bool isPublicPool;
56: }
| true | 2. The ``Sell`` structure can be packaged as suggested below. (from 6 slots to 5 slots)
**1 slot win: 1 * 2k = 2k gas saved**
| true | true | 5 | ||||||||
c4 | 03-revert-lend | 0xAnah G | High | high | # REVERT LEND GAS OPTIMIZATIONS
## INTRODUCTION
Highlighted below are optimizations exclusively targeting state-mutating functions and view/pure functions invoked by state-mutating functions. In the discussion that follows, only runtime gas is emphasized, given its inevitable dominance over deployment gas costs thr... | file: src/V3Vault.sol
954: function _repay(uint256 tokenId, uint256 amount, bool isShare, bytes memory permitData) internal {
955: (uint256 newDebtExchangeRateX96, uint256 newLendExchangeRateX96) = _updateGlobalInterest();
956:
957: Loan storage loan = loans[tokenId];
958:
959: uint256 cu... | ## [G-02] Calculations should be memoized rather than re-calculating them
In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls to pure functions and returning the cached result when the same inputs occur aga... | reentrancy | https://github.com/code-423n4/2024-03-revert-lend-findings/blob/main/data/0xAnah-G.md | 2026-01-02T19:02:51.701206+00:00 | 6e3fe4f2f04ae58a69d66457338a94b9bf9c25cbd9d3f2489532bf89aa072235 | 0 | 0 | 0 | 4 | false | false | false | false | medium | 0 | 0 | false | V3Vault.sol#L990, V3Vault.sol#L959, V3Vault.sol#L1217, V3Vault.sol#L1220 | V3Vault.sol | 4 | file: src/V3Vault.sol
954: function _repay(uint256 tokenId, uint256 amount, bool isShare, bytes memory permitData) internal {
955: (uint256 newDebtExchangeRateX96, uint256 newLendExchangeRateX96) = _updateGlobalInterest();
956:
957: Loan storage loan = loans[tokenId];
958:
959: uint256 cu... | true | ## [G-02] Calculations should be memoized rather than re-calculating them
In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls to pure functions and returning the cached result when the same inputs occur aga... | true | true | 6 | ||||||
c4 | 02-ethos | oyc_109 G | High | high | ## [G-01] Don't Initialize Variables with Default Value
Uninitialized variables are assigned with the types default value. Explicitly initializing a variable with it's default value costs unnecesary gas.
```
2023-02-ethos/Ethos-Core/contracts/ActivePool.sol::108 => for(uint256 i = 0; i < numCollaterals; i++) {
2023-0... | 2023-02-ethos/Ethos-Core/contracts/ActivePool.sol::108 => for(uint256 i = 0; i < numCollaterals; i++) {
2023-02-ethos/Ethos-Core/contracts/CollateralConfig.sol::56 => for(uint256 i = 0; i < _collaterals.length; i++) {
2023-02-ethos/Ethos-Core/contracts/LQTY/LQTYStaking.sol::206 => for (uint i = 0; i < assets.length; i+... | 2023-02-ethos/Ethos-Core/contracts/CollateralConfig.sol::56 => for(uint256 i = 0; i < _collaterals.length; i++) {
2023-02-ethos/Ethos-Core/contracts/LQTY/LQTYStaking.sol::206 => for (uint i = 0; i < assets.length; i++) {
2023-02-ethos/Ethos-Core/contracts/LQTY/LQTYStaking.sol::228 => for (uint i = 0; i < collaterals.le... | access-control | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/oyc_109-G.md | 2026-01-02T18:17:26.229185+00:00 | 6e64d4125b56870c45b9a5a2a10362d4acdf371f99bf41de2e762c522526865d | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | 2023-02-ethos/Ethos-Core/contracts/ActivePool.sol::108 => for(uint256 i = 0; i < numCollaterals; i++) {
2023-02-ethos/Ethos-Core/contracts/CollateralConfig.sol::56 => for(uint256 i = 0; i < _collaterals.length; i++) {
2023-02-ethos/Ethos-Core/contracts/LQTY/LQTYStaking.sol::206 => for (uint i = 0; i < assets.length; i+... | true | 2023-02-ethos/Ethos-Core/contracts/CollateralConfig.sol::56 => for(uint256 i = 0; i < _collaterals.length; i++) {
2023-02-ethos/Ethos-Core/contracts/LQTY/LQTYStaking.sol::206 => for (uint i = 0; i < assets.length; i++) {
2023-02-ethos/Ethos-Core/contracts/LQTY/LQTYStaking.sol::228 => for (uint i = 0; i < collaterals.le... | true | true | 5 | ||||||||
c4 | 05-ajna | codeslide G | Medium | medium | ### Gas Optimizations
| Number | Issue | Instances |
| :----: | :---------------------------------------- | :-------: |
| [G-01] | Don’t initialize integers to zero | 25 |
| [G-02] | Cache array size before loop | 8 |
| [G-03] | Unnecessary comput... | File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) { | File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) {
364: for (uint256 i = 0; i < indexesLength; ) {
474: uint256 filteredIndexesLength = 0;
476: for (uint256 i = 0; i < indexesLength; ) { | access-control | https://github.com/code-423n4/2023-05-ajna-findings/blob/main/data/codeslide-G.md | 2026-01-02T18:21:23.918671+00:00 | 6e734ae5a1212ff13d387ac91512195abe412aff21eba5084299b2134409aeb6 | 4 | 4 | 946 | 0 | false | false | true | false | high | File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) { | solidity | 96 | // Code block 1 (solidity):
File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) {
// Code block 2 (solidity):
File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) {
364: for (uint256 i = 0; i < indexesLength; ) {
474: ... | 4 | false | File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) {
File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) {
364: for (uint256 i = 0; i < indexesLength; ) {
474: uint256 filteredIndexesLength = 0;
476: for (... | 0 | File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) { | true | File: ajna-core/src/PositionManager.sol
181: for (uint256 i = 0; i < indexesLength; ) {
364: for (uint256 i = 0; i < indexesLength; ) {
474: uint256 filteredIndexesLength = 0;
476: for (uint256 i = 0; i < indexesLength; ) { | true | true | 9 | ||||
c4 | 03-asymmetry | 0x_kmr_ Q | Critical | critical | GAS OPTIMIZATIONS:
### G[1] Use arithmetic operating instead using loop for calculating totalWeight adjustment
[Link to github permalink](https://github.com/code-423n4/2023-03-asymmetry/blob/main/contracts/SafEth/SafEth.sol#L165-L175)
```
function adjustWeight(
uint256 _derivativeIndex,
uint256 _weight
) exte... | function adjustWeight(
uint256 _derivativeIndex,
uint256 _weight
) external onlyOwner {
+ uint256 oldWeight = weights[_derivativeIndex];
+ weights[_derivativeIndex] = _weight;
+ totalWeight = totalWeight - oldWeight + _weight;
- weights[_derivativeIndex] = _weight;
- uint256 localTotalWeight = 0... | function addDerivative(
address _contractAddress,
uint256 _weight
) external onlyOwner {
derivatives[derivativeCount] = IDerivative(_contractAddress);
weights[derivativeCount] = _weight;
derivativeCount++;
// @remind
gas/extra calcualtion
+ totalWeight = totalWe... | access-control | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/0x_kmr_-Q.md | 2026-01-02T18:17:39.597894+00:00 | 6e9d14430cb5fca860514924fcb9af8d8cf6f81949aacd6b25f5f2a59fda0590 | 1 | 0 | 502 | 2 | false | false | true | false | high | function adjustWeight(
uint256 _derivativeIndex,
uint256 _weight
) external onlyOwner {
+ uint256 oldWeight = weights[_derivativeIndex];
+ weights[_derivativeIndex] = _weight;
+ totalWeight = totalWeight - oldWeight + _weight;
- weights[_derivativeIndex] = _weight;
- uint256 localTotalWeight = 0... | unknown | 502 | // Code block 1 (unknown):
function adjustWeight(
uint256 _derivativeIndex,
uint256 _weight
) external onlyOwner {
+ uint256 oldWeight = weights[_derivativeIndex];
+ weights[_derivativeIndex] = _weight;
+ totalWeight = totalWeight - oldWeight + _weight;
- weights[_derivativeIndex] = _weight;
- u... | 1 | false | SafEth.sol#L165-L175, SafEth.sol#L182-L195 | SafEth.sol | 2 | function adjustWeight(
uint256 _derivativeIndex,
uint256 _weight
) external onlyOwner {
+ uint256 oldWeight = weights[_derivativeIndex];
+ weights[_derivativeIndex] = _weight;
+ totalWeight = totalWeight - oldWeight + _weight;
- weights[_derivativeIndex] = _weight;
- uint256 localTotalWeight = 0... | true | function addDerivative(
address _contractAddress,
uint256 _weight
) external onlyOwner {
derivatives[derivativeCount] = IDerivative(_contractAddress);
weights[derivativeCount] = _weight;
derivativeCount++;
// @remind
gas/extra calcualtion
+ totalWeight = totalWe... | true | true | 7 | |||
c4 | 07-amphora | hunter_w3b G | Medium | medium | # Gas Optimization
# Summary
| Number | Optimization Details | Context |
| :----: | :--------------------------------------------------------------------------------------------------------- | :-----: |
| [G-01] | Gas inefficient impl... | File: contracts/core/VaultController.sol
function _getVaultBorrowingPower(IVault _vault) private returns (uint192 _borrowPower) {
// loop over each registed token, adding the indivuduals ltv to the total ltv of the vault
for (uint192 _i; _i < enabledTokens.length; ++_i) {
CollateralInfo memory _collate... | File: core/solidity/contracts/core/AMPHClaimer.sol
129 IERC20(_token).transfer(owner(), _amount);
| access-control | https://github.com/code-423n4/2023-07-amphora-findings/blob/main/data/hunter_w3b-G.md | 2026-01-02T18:23:49.716250+00:00 | 6ef3990ca8a4a3463e77877c13139ff36381dad1f6172c97d9fd3f1b6a4377d7 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | File: contracts/core/VaultController.sol
function _getVaultBorrowingPower(IVault _vault) private returns (uint192 _borrowPower) {
// loop over each registed token, adding the indivuduals ltv to the total ltv of the vault
for (uint192 _i; _i < enabledTokens.length; ++_i) {
CollateralInfo memory _collate... | true | File: core/solidity/contracts/core/AMPHClaimer.sol
129 IERC20(_token).transfer(owner(), _amount);
| true | true | 5 | ||||||||
c4 | 05-ajna | 0xWaitress Q | Medium | medium | 1. Modify the moveLiquidity function in Position Manager, or add a new one `moveLiquidities` such that the RewardsManager can call moveStakedLiquidity with all indexes, instead of making repeated calls.
https://github.com/code-423n4/2023-05-ajna/blob/main/ajna-core/src/RewardsManager.sol#L163-L175
```solidity
... | for (uint256 i = 0; i < fromBucketLength; ) {
fromIndex = fromBuckets_[i];
toIndex = toBuckets_[i];
// call out to position manager to move liquidity between buckets
IPositionManagerOwnerActions.MoveLiquidityParams memory moveLiquidityParams = IPositionManagerOwn... | /**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function ha... | access-control | https://github.com/code-423n4/2023-05-ajna-findings/blob/main/data/0xWaitress-Q.md | 2026-01-02T18:20:50.219470+00:00 | 6f0811aa09304d854711951b09e92e93abd604a90ad0e8759c058f0ab20eb2da | 2 | 2 | 1,192 | 2 | false | false | true | false | high | for (uint256 i = 0; i < fromBucketLength; ) {
fromIndex = fromBuckets_[i];
toIndex = toBuckets_[i];
// call out to position manager to move liquidity between buckets
IPositionManagerOwnerActions.MoveLiquidityParams memory moveLiquidityParams = IPositionManagerOwnerAction... | solidity | 549 | // Code block 1 (solidity):
for (uint256 i = 0; i < fromBucketLength; ) {
fromIndex = fromBuckets_[i];
toIndex = toBuckets_[i];
// call out to position manager to move liquidity between buckets
IPositionManagerOwnerActions.MoveLiquidityParams memory moveLiquidityParams =... | 2 | false | for (uint256 i = 0; i < fromBucketLength; ) {
fromIndex = fromBuckets_[i];
toIndex = toBuckets_[i];
// call out to position manager to move liquidity between buckets
IPositionManagerOwnerActions.MoveLiquidityParams memory moveLiquidityParams = IPositionManagerOwnerAction... | RewardsManager.sol#L163-L175, EnumerableSet.sol | RewardsManager.sol, EnumerableSet.sol | 2 | for (uint256 i = 0; i < fromBucketLength; ) {
fromIndex = fromBuckets_[i];
toIndex = toBuckets_[i];
// call out to position manager to move liquidity between buckets
IPositionManagerOwnerActions.MoveLiquidityParams memory moveLiquidityParams = IPositionManagerOwn... | true | /**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function ha... | true | true | 8 | ||
c4 | 09-ondo | petrichor G | Low | low | # gas
# summary
| | issue | instance |
|-------|-------|----------|
|[G-01]|Functions guaranteed to revert when called by normal users can be marked payable|25|
|[G-02]|Use assembly to perform efficient back-to-back calls|2|
|[G-03]|Use assembly to perform efficient back-to-back calls|2|
|[G-04]|Avoid emitting... | File: contracts/bridge/DestinationBridge.sol
210 function addApprover(address approver) external onlyOwner {
220 function removeApprover(address approver) external onlyOwner {
234 function addChainSupport(
string calldata srcChain,
string calldata srcContractAddress
) external onlyOwner {
255 fun... | File: contracts/bridge/SourceBridge.sol
121 function setDestinationChainContractAddress(
string memory destinationChain,
address contractAddress
) external onlyOwner {
136 function pause() external onlyOwner {
145 function unpause() external onlyOwner { | access-control | https://github.com/code-423n4/2023-09-ondo-findings/blob/main/data/petrichor-G.md | 2026-01-02T18:26:12.660131+00:00 | 6f2f323069830d4b8d025939588189727e2f87e537296620627f1878e78ea12b | 1 | 1 | 770 | 3 | false | false | true | false | high | File: contracts/bridge/DestinationBridge.sol
210 function addApprover(address approver) external onlyOwner {
220 function removeApprover(address approver) external onlyOwner {
234 function addChainSupport(
string calldata srcChain,
string calldata srcContractAddress
) external onlyOwner {
255 fun... | solidity | 770 | // Code block 1 (solidity):
File: contracts/bridge/DestinationBridge.sol
210 function addApprover(address approver) external onlyOwner {
220 function removeApprover(address approver) external onlyOwner {
234 function addChainSupport(
string calldata srcChain,
string calldata srcContractAddress
) exte... | 1 | false | File: contracts/bridge/DestinationBridge.sol
210 function addApprover(address approver) external onlyOwner {
220 function removeApprover(address approver) external onlyOwner {
234 function addChainSupport(
string calldata srcChain,
string calldata srcContractAddress
) external onlyOwner {
255 fun... | DestinationBridge.sol#L210, DestinationBridge.sol#L220, DestinationBridge.sol#L234 | DestinationBridge.sol | 3 | File: contracts/bridge/DestinationBridge.sol
210 function addApprover(address approver) external onlyOwner {
220 function removeApprover(address approver) external onlyOwner {
234 function addChainSupport(
string calldata srcChain,
string calldata srcContractAddress
) external onlyOwner {
255 fun... | true | File: contracts/bridge/SourceBridge.sol
121 function setDestinationChainContractAddress(
string memory destinationChain,
address contractAddress
) external onlyOwner {
136 function pause() external onlyOwner {
145 function unpause() external onlyOwner { | true | true | 7 | ||
c4 | 01-ondo | minhquanym Q | Medium | medium | # Summary
| Id | Title |
| -- | ----- |
| 1 | No Storage Gap for Upgradeable Contracts |
| 2 | Admin manager can steal funds approved to CashManager |
# 1. No Storage Gap for Upgradeable Contracts
https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/contracts/cash/kyc/KYCRegistryC... | uint256[50] private __gap; | function multiexcall(
ExCallData[] calldata exCallData
)
external
payable
override
nonReentrant
onlyRole(MANAGER_ADMIN)
whenPaused
returns (bytes[] memory results)
{
results = new bytes[](exCallData.length);
for (uint256 i = 0; i < exCallData.length; ++i) {
(bool success, bytes memory ret) = add... | reentrancy | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/minhquanym-Q.md | 2026-01-02T18:15:21.939508+00:00 | 6f4e7c633f0dadb3be70233856fc2fd2eb1c8282488916f2666c8b47d072a5ca | 1 | 1 | 26 | 2 | false | false | true | false | high | uint256[50] private __gap; | solidity | 26 | // Code block 1 (solidity):
uint256[50] private __gap; | 1 | false | uint256[50] private __gap; | KYCRegistryClient.sol#L28, CashManager.sol#L962 | CashManager.sol, KYCRegistryClient.sol | 2 | uint256[50] private __gap; | true | function multiexcall(
ExCallData[] calldata exCallData
)
external
payable
override
nonReentrant
onlyRole(MANAGER_ADMIN)
whenPaused
returns (bytes[] memory results)
{
results = new bytes[](exCallData.length);
for (uint256 i = 0; i < exCallData.length; ++i) {
(bool success, bytes memory ret) = add... | true | true | 7 | ||
c4 | 01-ondo | Rolezn Q | Critical | critical | ## Summary<a name="Summary">
### Low Risk Issues
| |Issue|Contexts|
|-|:-|:-:|
| [LOW‑1](#LOW‑1) | Init functions are susceptible to front-running | 2 |
| [LOW‑2](#LOW‑2) | Loss of precision due to rounding | 3 |
| [LOW‑3](#LOW‑3) | Missing parameter validation in `constructo... | function __KYCRegistryClientInitializable_init( | function __KYCRegistryClientInitializable_init_unchained( | reentrancy | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/Rolezn-Q.md | 2026-01-02T18:14:45.753140+00:00 | 6f568c78d857e1f0129d21159efa75e661357c65070973cafa61473b615ad06e | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | function __KYCRegistryClientInitializable_init( | true | function __KYCRegistryClientInitializable_init_unchained( | true | true | 5 | ||||||||
c4 | 01-biconomy | RaymondFam G | High | high | ## Private function with embedded modifier reduces contract size
Consider having the logic of a modifier embedded through a private function to reduce contract size if need be. A private visibility that saves more gas on function calls than the internal visibility is adopted because the modifier will only be making thi... | ## Unneeded `uint256()` cast
Casting an unsigned integer to `uint256()` is unnecessary.
For instance, the code line below may be refactored to save gas both on contract deployment and function call as follows:
[File: SmartAccount.sol#L322](https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contra... | Note: Since `1 * 65 == 65`, replacing `uint256(1) * 65` with `65` instead of `1 * 65` saves even more gas.
## Use of named returns for local variables saves gas
You can have further advantages in term of gas cost by simply using named return values as temporary local variable.
For instance, the code block below may b... | reentrancy | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/RaymondFam-G.md | 2026-01-02T18:13:15.212148+00:00 | 6f679dee671320443778d4e33d360486936f14aef339fcef5f97059ea144372a | 2 | 2 | 409 | 4 | false | false | true | false | high | + function _mixedAuth() private view {
+ require(msg.sender == owner || msg.sender == address(this),"Only owner or self");
+ }
modifier mixedAuth {
- require(msg.sender == owner || msg.sender == address(this),"Only owner or self");
+ _mixedAuth();
_;
} | diff | 293 | // Code block 1 (diff):
+ function _mixedAuth() private view {
+ require(msg.sender == owner || msg.sender == address(this),"Only owner or self");
+ }
modifier mixedAuth {
- require(msg.sender == owner || msg.sender == address(this),"Only owner or self");
+ _mixedAuth();
_;
}
/... | 2 | true | + function _mixedAuth() private view {
+ require(msg.sender == owner || msg.sender == address(this),"Only owner or self");
+ }
modifier mixedAuth {
- require(msg.sender == owner || msg.sender == address(this),"Only owner or self");
+ _mixedAuth();
_;
}
- require(ui... | SelfAuthorized.sol, SmartAccount.sol#L82-L85, SmartAccount.sol#L322, SmartAccountNoAuth.sol#L155-L159 | SmartAccount.sol, SelfAuthorized.sol, SmartAccountNoAuth.sol | 4 | ## Unneeded `uint256()` cast
Casting an unsigned integer to `uint256()` is unnecessary.
For instance, the code line below may be refactored to save gas both on contract deployment and function call as follows:
[File: SmartAccount.sol#L322](https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contra... | true | Note: Since `1 * 65 == 65`, replacing `uint256(1) * 65` with `65` instead of `1 * 65` saves even more gas.
## Use of named returns for local variables saves gas
You can have further advantages in term of gas cost by simply using named return values as temporary local variable.
For instance, the code block below may b... | true | true | 10 | ||
c4 | 02-ai-arena | 0xBinChook Q | Critical | critical | # AI Arena - QA Report
| Id | Issue |
|---------------|---------------------------------------------------------------------------------------------------------------|
| [L-1](#l-1) | Consider two-step... | ### L-4
#### `FighterFarm::_delegatedAddress` cannot be updated
Unlike the other members of `FighterFarm`, `_delegatedAddress` lacks any setter or instantiate function to update the address.
The uses for `_delegatedAddress` are setting the tokenURI and signing the messages players send in `FighterFarm::claimFighters()... | ### L-5
#### Neuron allowance spend during burn is inconsistent with OZ ERC20 being extended
In `Neuron::burn()` the allowance is always decremented by the amount burnt, while the Open Zeppelin ERC20 [spend allowance](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/96e5c0830a83b61197dd4e29df59cb56499600ef/c... | access-control | https://github.com/code-423n4/2024-02-ai-arena-findings/blob/main/data/0xBinChook-Q.md | 2026-01-02T19:02:00.173618+00:00 | 6fe3dea8f9f5b1f60001b6e60e8c2d711d6da41829ff3c1278896d95ad41d49a | 0 | 0 | 0 | 3 | false | false | false | false | medium | 0 | 0 | false | FighterFarm.sol#L184, ERC20.sol#L305-L315, Neuron.sol#L201-L203 | ERC20.sol, Neuron.sol, FighterFarm.sol | 3 | ### L-4
#### `FighterFarm::_delegatedAddress` cannot be updated
Unlike the other members of `FighterFarm`, `_delegatedAddress` lacks any setter or instantiate function to update the address.
The uses for `_delegatedAddress` are setting the tokenURI and signing the messages players send in `FighterFarm::claimFighters()... | true | ### L-5
#### Neuron allowance spend during burn is inconsistent with OZ ERC20 being extended
In `Neuron::burn()` the allowance is always decremented by the amount burnt, while the Open Zeppelin ERC20 [spend allowance](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/96e5c0830a83b61197dd4e29df59cb56499600ef/c... | true | true | 6 | ||||||
c4 | 03-asymmetry | Brenzee Q | High | high | # QA Report
## [L-01] `receive()` function allows anyone to send ETH
https://github.com/code-423n4/2023-03-asymmetry/blob/main/contracts/SafEth/SafEth.sol#L246
https://github.com/code-423n4/2023-03-asymmetry/blob/main/contracts/SafEth/derivatives/SfrxEth.sol#L126
https://github.com/code-423n4/2023-03-asymmetry/blob/ma... | receive() external payable {} | ## [L-02] No need to check balance in `deposit()` and `withdraw()` functions in `SfrxEth.sol`
https://github.com/code-423n4/2023-03-asymmetry/blob/main/contracts/SafEth/derivatives/SfrxEth.sol#L98-L104
https://github.com/code-423n4/2023-03-asymmetry/blob/main/contracts/SafEth/derivatives/SfrxEth.sol#L61-L68
https://gi... | access-control | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/Brenzee-Q.md | 2026-01-02T18:17:57.058753+00:00 | 6ffb3b55acc03b5bdc4ff41e76f67aa83c44ca18100e310fcf73e73af6204219 | 1 | 1 | 29 | 7 | false | false | true | false | high | receive() external payable {} | solidity | 29 | // Code block 1 (solidity):
receive() external payable {} | 1 | false | receive() external payable {} | SafEth.sol#L246, SfrxEth.sol#L126, WstEth.sol#L97, Reth.sol#L244, SfrxEth.sol#L98-L104, SfrxEth.sol#L61-L68, WstEth.sol#L57-L58 | SfrxEth.sol, Reth.sol, WstEth.sol, SafEth.sol | 7 | receive() external payable {} | true | ## [L-02] No need to check balance in `deposit()` and `withdraw()` functions in `SfrxEth.sol`
https://github.com/code-423n4/2023-03-asymmetry/blob/main/contracts/SafEth/derivatives/SfrxEth.sol#L98-L104
https://github.com/code-423n4/2023-03-asymmetry/blob/main/contracts/SafEth/derivatives/SfrxEth.sol#L61-L68
https://gi... | true | true | 7 | ||
c4 | 09-ondo | pontifex Q | Unknown | unknown | ### Wrong amounts at the events
The events at the `rUSDY.wrap` function emit wrong amounts due to receiving `_USDYAmount` tokens amount instead of `_USDYAmount * BPS_DENOMINATOR`. This would affect applications utilizing event logs like subgraphs.
```solidity
438 emit Transfer(address(0), msg.sender, getRUSDYByShare... | 438 emit Transfer(address(0), msg.sender, getRUSDYByShares(_USDYAmount));
439 emit TransferShares(address(0), msg.sender, _USDYAmount); | other | https://github.com/code-423n4/2023-09-ondo-findings/blob/main/data/pontifex-Q.md | 2026-01-02T18:26:13.557602+00:00 | 705529071e1e022c4acaf43220dbf6ac4f0bd070473c23871910604c357b41d9 | 1 | 1 | 141 | 1 | false | true | true | false | medium | 438 emit Transfer(address(0), msg.sender, getRUSDYByShares(_USDYAmount));
439 emit TransferShares(address(0), msg.sender, _USDYAmount); | solidity | 141 | // Code block 1 (solidity):
438 emit Transfer(address(0), msg.sender, getRUSDYByShares(_USDYAmount));
439 emit TransferShares(address(0), msg.sender, _USDYAmount); | 1 | false | 438 emit Transfer(address(0), msg.sender, getRUSDYByShares(_USDYAmount));
439 emit TransferShares(address(0), msg.sender, _USDYAmount); | rUSDY.sol#L438-L439 | rUSDY.sol | 1 | 438 emit Transfer(address(0), msg.sender, getRUSDYByShares(_USDYAmount));
439 emit TransferShares(address(0), msg.sender, _USDYAmount); | true | false | false | 4.06 | ||||
c4 | 08-dopex | QiuhaoLi Q | Critical | critical | ## [low] RdpxV2Core.sol _transfer should update reserveAsset[reservesIndex["RDPX"]] if (rdpxBurnPercentage + rdpxFeePercentage) < 1e10, or add constraints in setRdpxBurnPercentage/setRdpxFeePercentage
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/core/RdpxV2Core.sol#L657
https://github.com/code-423n4... | ISwapRouter.ExactInputSingleParams memory swap_params = ISwapRouter
.ExactInputSingleParams(
_tokenA,
_tokenB,
_fee_tier,
address(this),
2105300114, // Expiration: a long time from now @audit-issue deadline vulnerable to MEV
_amountAtoB,
_amountOutMinimu... | ISwapRouter.ExactInputSingleParams memory swap_params = ISwapRouter
.ExactInputSingleParams(
_tokenA,
_tokenB,
_fee_tier,
address(this),
2105300114, // Expiration: a long time from now @audit-issue deadline vulnerable to MEV
_amountAtoB,
_amountOutMinimu... | access-control | https://github.com/code-423n4/2023-08-dopex-findings/blob/main/data/QiuhaoLi-Q.md | 2026-01-02T18:24:56.900829+00:00 | 7082cb05455af2cae879bf1901c970dbcbbbdac30d3a02b6da800dbbe321cced | 0 | 0 | 0 | 4 | false | false | false | false | medium | 0 | 0 | false | RdpxV2Core.sol#L657, RdpxV2Core.sol#L662, RdpxV2Core.sol#L180, RdpxV2Core.sol#L193 | RdpxV2Core.sol | 4 | ISwapRouter.ExactInputSingleParams memory swap_params = ISwapRouter
.ExactInputSingleParams(
_tokenA,
_tokenB,
_fee_tier,
address(this),
2105300114, // Expiration: a long time from now @audit-issue deadline vulnerable to MEV
_amountAtoB,
_amountOutMinimu... | true | ISwapRouter.ExactInputSingleParams memory swap_params = ISwapRouter
.ExactInputSingleParams(
_tokenA,
_tokenB,
_fee_tier,
address(this),
2105300114, // Expiration: a long time from now @audit-issue deadline vulnerable to MEV
_amountAtoB,
_amountOutMinimu... | true | true | 6 | ||||||
c4 | 03-asymmetry | BlueAlder G | Low | low | ## [G-01] Unnecessary recalculation of total weights in `addDerivative`
In the `addDerivative` function, the total weight of all the
derivatives is recalculated by iterating through the `weights` storage variable
and individually adding these all up in a for loop.
https://github.com/code-423n4/2023-03-asymmetry/blob/... | totalWeight = totalWeight + _weight; | totalWeight = totalWeight - weights[_derivativeIndex] + _weight;
weights[_derivativeIndex] = _weight; | overflow | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/BlueAlder-G.md | 2026-01-02T18:17:55.718439+00:00 | 7098ab95cb4d12b52148fc26d6bff517b1856123fd9579c9f63a92375c96f6ff | 3 | 2 | 548 | 2 | false | false | true | false | high | totalWeight = totalWeight + _weight; | sol | 36 | // Code block 1 (sol):
totalWeight = totalWeight + _weight;
// Code block 2 (sol):
totalWeight = totalWeight - weights[_derivativeIndex] + _weight;
weights[_derivativeIndex] = _weight;
// Code block 3 (markdown):
## [G-03] Loop variable in for loop can be unchecked
Overflowing the loop variable in may for loops is ... | 3 | false | totalWeight = totalWeight + _weight;
totalWeight = totalWeight - weights[_derivativeIndex] + _weight;
weights[_derivativeIndex] = _weight; | SafEth.sol#L191, SafEth.sol#L165 | SafEth.sol | 2 | totalWeight = totalWeight + _weight; | true | totalWeight = totalWeight - weights[_derivativeIndex] + _weight;
weights[_derivativeIndex] = _weight; | true | true | 9 | ||
c4 | 01-ondo | chrisdior4 Q | Critical | critical | # QA report
## Low Risk
| L-N |Issue|Instances|
|:------:|:----|:-------:|
| [L‑01] | Functions that send ether with a low level `call` are missing `nonReentrant` modifier | 1 |
| [L‑02] | Ownable uses single-step ownership transfer | 1 |
| [L‑03] | Missing zero address check in constructor | ... | (bool success, bytes memory ret) = address(exCallData[i].target).call{
value: exCallData[i].value
}(exCallData[i].data); | import "contracts/cash/external/openzeppelin/contracts/access/Ownable.sol"; | reentrancy | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/chrisdior4-Q.md | 2026-01-02T18:15:01.000309+00:00 | 70d497ef5166bbc163b6d976cd68267b4543597f271ec961fceae0dfdd84f6bd | 2 | 2 | 196 | 1 | false | false | true | false | high | (bool success, bytes memory ret) = address(exCallData[i].target).call{
value: exCallData[i].value
}(exCallData[i].data); | solidity | 121 | // Code block 1 (solidity):
(bool success, bytes memory ret) = address(exCallData[i].target).call{
value: exCallData[i].value
}(exCallData[i].data);
// Code block 2 (solidity):
import "contracts/cash/external/openzeppelin/contracts/access/Ownable.sol"; | 2 | false | (bool success, bytes memory ret) = address(exCallData[i].target).call{
value: exCallData[i].value
}(exCallData[i].data);
import "contracts/cash/external/openzeppelin/contracts/access/Ownable.sol"; | CashFactory.sol#L128 | CashFactory.sol | 1 | (bool success, bytes memory ret) = address(exCallData[i].target).call{
value: exCallData[i].value
}(exCallData[i].data); | true | import "contracts/cash/external/openzeppelin/contracts/access/Ownable.sol"; | true | true | 8 | ||
c4 | 01-salty | fouzantanveer Analysis | Critical | critical | ## Conceptual Overview
As an auditor of the Salty.IO project, I present a conceptual narrative overview, highlighting the user journey, interaction points, and the features of the platform.
At the heart of the Salty.IO ecosystem are two primary tokens: `Salt` and `USDS`. A user's journey often begins with acquiring th... | contract Upkeep {
// ...
IPriceAggregator immutable public priceAggregator;
// ...
function performUpkeep() public {
// ...
uint256 btcPrice = priceAggregator.getPriceBTC();
uint256 ethPrice = priceAggregator.getPriceETH();
// ...
}
// ...
} | reentrancy | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/fouzantanveer-Analysis.md | 2026-01-02T19:01:41.256245+00:00 | 7127b51aa9e06b834be0d867c9b9c7ce111d2a5f8dfc3fb12e01f65aac12a393 | 0 | 0 | 0 | 0 | false | true | false | false | medium | 0 | 0 | false | 0 | contract Upkeep {
// ...
IPriceAggregator immutable public priceAggregator;
// ...
function performUpkeep() public {
// ...
uint256 btcPrice = priceAggregator.getPriceBTC();
uint256 ethPrice = priceAggregator.getPriceETH();
// ...
}
// ...
} | true | false | false | 4 | ||||||||||
c4 | 02-ethos | 0xSmartContract G | High | high | ### Gas Optimizations List
| Number | Optimization Details | Context |
|:--:|:-------| :-----:|
| [G-01] | Remove the `initializer` modifier | 2 |
| [G-02] |Use hardcode address instead ``address(this)``| 36 |
| [G-03] |Structs can be packed into fewer storage slots |2 |
| [G-04] |Pack state variables | 4 |
| [G-05] | ... | Ethos-Vault\contracts\ReaperStrategyGranarySupplyOnly.sol:
67: ) public initializer {
| Ethos-Vault\contracts\abstract\ReaperBaseStrategyv4.sol:
61: constructor() initializer {}
| access-control | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/0xSmartContract-G.md | 2026-01-02T18:15:46.450258+00:00 | 717a8e1adf4cbc8b3b264a6479cda58273c391116f955bf44d7baeb3c1f66c9a | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | Ethos-Vault\contracts\ReaperStrategyGranarySupplyOnly.sol:
67: ) public initializer {
| true | Ethos-Vault\contracts\abstract\ReaperBaseStrategyv4.sol:
61: constructor() initializer {}
| true | true | 5 | ||||||||
c4 | 03-revert-lend | SY_S G | High | high | ## Summary
### Gas Optimization
no |Issue |Instances||
|-|:-|:-:|:-:|
| [G-01] | Pre-increments and pre-decrements are cheaper than post-increments and post-decrements | |3|--|
| [G-02] | Can make the variable outside the loop to save gas | |2|--|
| [G-03] |Before transfer of some functions, we should check some... | file:/src/transformers/V3Utils.sol
619 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed0);
623 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed1);
627 transferDetails[state.i++] = I... | File:/src/automators/Automator.sol
112 uint256 balance = IERC20(tokens[i]).balanceOf(address(this));
| access-control | https://github.com/code-423n4/2024-03-revert-lend-findings/blob/main/data/SY_S-G.md | 2026-01-02T19:03:04.620379+00:00 | 717cdc0e8524e96cf7e01e3d77933155a5e615eb8a1e5163d8b8e55ebda43612 | 2 | 2 | 508 | 2 | false | false | true | false | high | file:/src/transformers/V3Utils.sol
619 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed0);
623 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed1);
627 transferDetails[state.i++] = I... | solidity | 397 | // Code block 1 (solidity):
file:/src/transformers/V3Utils.sol
619 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed0);
623 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed1);
627 tr... | 2 | false | file:/src/transformers/V3Utils.sol
619 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed0);
623 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed1);
627 transferDetails[state.i++] = I... | V3Utils.sol#L619, Automator.sol#L112 | Automator.sol, V3Utils.sol | 2 | file:/src/transformers/V3Utils.sol
619 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed0);
623 transferDetails[state.i++] = ISignatureTransfer.SignatureTransferDetails(address(this), state.needed1);
627 transferDetails[state.i++] = I... | true | File:/src/automators/Automator.sol
112 uint256 balance = IERC20(tokens[i]).balanceOf(address(this));
| true | true | 8 | ||
c4 | 07-amphora | hunter_w3b Q | Medium | medium | ## [L-01] Calls to `VaultController::updateRegisteredErc20()` could render vaults instantly insolvent
updateRegisteredErc20() has the ability to modify the LTV ratio of a token across the protocol to any arbitrary, potentially dangerously low value.
If this value is lowered so that the allowed loan amount for a given ... | File: contracts/core/VaultController.sol
394 if (_ltv >= (EXP_SCALE - _liquidationIncentive)) revert VaultController_LTVIncompatible();
395 if (_poolId != 0) {
396 (address _lpToken,,, address _crvRewards,,) = BOOSTER.poolInfo(_poolId);
397 if (_lpToken != _tokenAddress) revert VaultController_TokenAddr... | File: contracts/governance/GovernorCharlie.sol
559 function isWhitelisted(address _account) public view override returns (bool _isWhitelisted) {
560 return (whitelistAccountExpirations[_account] > block.timestamp);
561 } | access-control | https://github.com/code-423n4/2023-07-amphora-findings/blob/main/data/hunter_w3b-Q.md | 2026-01-02T18:23:50.155505+00:00 | 71cdd82c2bac92864947919341fa718af1ade81212242e58ff9957bc77b7405e | 1 | 1 | 705 | 1 | false | false | true | false | high | File: contracts/core/VaultController.sol
394 if (_ltv >= (EXP_SCALE - _liquidationIncentive)) revert VaultController_LTVIncompatible();
395 if (_poolId != 0) {
396 (address _lpToken,,, address _crvRewards,,) = BOOSTER.poolInfo(_poolId);
397 if (_lpToken != _tokenAddress) revert VaultController_TokenAddr... | solidity | 705 | // Code block 1 (solidity):
File: contracts/core/VaultController.sol
394 if (_ltv >= (EXP_SCALE - _liquidationIncentive)) revert VaultController_LTVIncompatible();
395 if (_poolId != 0) {
396 (address _lpToken,,, address _crvRewards,,) = BOOSTER.poolInfo(_poolId);
397 if (_lpToken != _tokenAddress) reve... | 1 | false | File: contracts/core/VaultController.sol
394 if (_ltv >= (EXP_SCALE - _liquidationIncentive)) revert VaultController_LTVIncompatible();
395 if (_poolId != 0) {
396 (address _lpToken,,, address _crvRewards,,) = BOOSTER.poolInfo(_poolId);
397 if (_lpToken != _tokenAddress) revert VaultController_TokenAddr... | VaultController.sol#L383-L412 | VaultController.sol | 1 | File: contracts/core/VaultController.sol
394 if (_ltv >= (EXP_SCALE - _liquidationIncentive)) revert VaultController_LTVIncompatible();
395 if (_poolId != 0) {
396 (address _lpToken,,, address _crvRewards,,) = BOOSTER.poolInfo(_poolId);
397 if (_lpToken != _tokenAddress) revert VaultController_TokenAddr... | true | File: contracts/governance/GovernorCharlie.sol
559 function isWhitelisted(address _account) public view override returns (bool _isWhitelisted) {
560 return (whitelistAccountExpirations[_account] > block.timestamp);
561 } | true | true | 7 | ||
c4 | 02-ethos | Bnke0x0 Q | Critical | critical |
### [L01] require() should be used instead of assert()
#### Findings:
```
2023-02-ethos-main/Ethos-Core/contracts/BorrowerOperations.sol::128 => assert(MIN_NET_DEBT > 0);
2023-02-ethos-main/Ethos-Core/contracts/BorrowerOperations.sol::197 => assert(vars.compositeDebt > 0);
2023-02-ethos-main/Ethos-Core/contracts/Bor... | 2023-02-ethos-main/Ethos-Core/contracts/BorrowerOperations.sol::128 => assert(MIN_NET_DEBT > 0);
2023-02-ethos-main/Ethos-Core/contracts/BorrowerOperations.sol::197 => assert(vars.compositeDebt > 0);
2023-02-ethos-main/Ethos-Core/contracts/BorrowerOperations.sol::301 => assert(msg.sender == _borrower || (msg.sender == ... | 2023-02-ethos-main/Ethos-Core/contracts/CollateralConfig.sol::46 => function initialize(
2023-02-ethos-main/Ethos-Vault/contracts/ReaperStrategyGranarySupplyOnly.sol::62 => function initialize(
2023-02-ethos-main/Ethos-Vault/contracts/ReaperStrategyGranarySupplyOnly.sol::67 => ) public initializer { | access-control | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/Bnke0x0-Q.md | 2026-01-02T18:15:59.925969+00:00 | 7217c016cb1d7a36a98fd85ae810dfc21930345d24b756cd704138a5baa6a2c3 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | 2023-02-ethos-main/Ethos-Core/contracts/BorrowerOperations.sol::128 => assert(MIN_NET_DEBT > 0);
2023-02-ethos-main/Ethos-Core/contracts/BorrowerOperations.sol::197 => assert(vars.compositeDebt > 0);
2023-02-ethos-main/Ethos-Core/contracts/BorrowerOperations.sol::301 => assert(msg.sender == _borrower || (msg.sender == ... | true | 2023-02-ethos-main/Ethos-Core/contracts/CollateralConfig.sol::46 => function initialize(
2023-02-ethos-main/Ethos-Vault/contracts/ReaperStrategyGranarySupplyOnly.sol::62 => function initialize(
2023-02-ethos-main/Ethos-Vault/contracts/ReaperStrategyGranarySupplyOnly.sol::67 => ) public initializer { | true | true | 5 | ||||||||
c4 | 06-lybra | MrPotatoMagic G | Gas | gas | ## [G-01] Function can be made external instead of public
There are 2 instances of this:
https://github.com/code-423n4/2023-06-lybra/blob/7b73ef2fbb542b569e182d9abf79be643ca883ee/contracts/lybra/governance/GovernanceTimelock.sol#L25
```solidity
File: contracts/lybra/governance/GovernanceTimelock.sol
25: function chec... | File: contracts/lybra/governance/GovernanceTimelock.sol
25: function checkRole(bytes32 role, address _sender) public view returns(bool){
26: return hasRole(role, _sender) || hasRole(DAO, _sender);
27: } | File: contracts/lybra/pools/base/LybraPeUSDVaultBase.sol
257: function getPoolTotalPeUSDCirculation() public view returns (uint256) { | access-control | https://github.com/code-423n4/2023-06-lybra-findings/blob/main/data/MrPotatoMagic-G.md | 2026-01-02T18:22:29.575453+00:00 | 7237df30236d824338fdf34f4a575f7ecad17223c0c2865c86cdf5f36ebc70c6 | 3 | 3 | 794 | 4 | false | false | true | false | high | File: contracts/lybra/governance/GovernanceTimelock.sol
25: function checkRole(bytes32 role, address _sender) public view returns(bool){
26: return hasRole(role, _sender) || hasRole(DAO, _sender);
27: } | solidity | 215 | // Code block 1 (solidity):
File: contracts/lybra/governance/GovernanceTimelock.sol
25: function checkRole(bytes32 role, address _sender) public view returns(bool){
26: return hasRole(role, _sender) || hasRole(DAO, _sender);
27: }
// Code block 2 (solidity):
File: contracts/lybra/pools/base/LybraPeUSDVaul... | 3 | false | File: contracts/lybra/governance/GovernanceTimelock.sol
25: function checkRole(bytes32 role, address _sender) public view returns(bool){
26: return hasRole(role, _sender) || hasRole(DAO, _sender);
27: }
File: contracts/lybra/pools/base/LybraPeUSDVaultBase.sol
257: function getPoolTotalPeUSDCirculation() p... | GovernanceTimelock.sol#L25, LybraPeUSDVaultBase.sol#L257, LybraGovernance.sol#L23, esLBRBoost.sol#L12 | GovernanceTimelock.sol, esLBRBoost.sol, LybraPeUSDVaultBase.sol, LybraGovernance.sol | 4 | File: contracts/lybra/governance/GovernanceTimelock.sol
25: function checkRole(bytes32 role, address _sender) public view returns(bool){
26: return hasRole(role, _sender) || hasRole(DAO, _sender);
27: } | true | File: contracts/lybra/pools/base/LybraPeUSDVaultBase.sol
257: function getPoolTotalPeUSDCirculation() public view returns (uint256) { | true | true | 9 | ||
c4 | 01-ondo | IllIllI G | High | high |
## Summary
### Gas Optimizations
| |Issue|Instances|Total Gas Saved|
|-|:-|:-:|:-:|
| [G‑01] | Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, where appropriate | 4 | - |
| [G‑02] | Avoid contract existence checks by using low level calls | 2 | ... | File: contracts/cash/CashManager.sol
79 mapping(uint256 => RedemptionRequests) public redemptionInfoPerEpoch;
80
81 // Mapping used for getting the exchange rate during a given epoch
82 mapping(uint256 => uint256) public epochToExchangeRate;
83
84 // Nested mapping containing mint requests ... | File: contracts/lending/OndoPriceOracle.sol
45 mapping(address => uint256) public fTokenToUnderlyingPrice;
46
47 /// @notice fToken to cToken associations for piggy backing off
48 /// of cToken oracles
49: mapping(address => address) public fTokenToCToken;
| reentrancy | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/IllIllI-G.md | 2026-01-02T18:14:38.231369+00:00 | 726c6a515798137b005521382d2f48de03d18339cd945c4225010c8f9de8b352 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | File: contracts/cash/CashManager.sol
79 mapping(uint256 => RedemptionRequests) public redemptionInfoPerEpoch;
80
81 // Mapping used for getting the exchange rate during a given epoch
82 mapping(uint256 => uint256) public epochToExchangeRate;
83
84 // Nested mapping containing mint requests ... | true | File: contracts/lending/OndoPriceOracle.sol
45 mapping(address => uint256) public fTokenToUnderlyingPrice;
46
47 /// @notice fToken to cToken associations for piggy backing off
48 /// of cToken oracles
49: mapping(address => address) public fTokenToCToken;
| true | true | 5 | ||||||||
c4 | 05-ajna | dicethedev G | Low | low | a. Use the `abi.encodeWithSelector` function instead of `abi.encode` to encode the function selector and arguments. This can reduce the gas cost of encoding the call data by up to 10%. For example, you can replace `_hashProposal(targets_, values_, calldatas_, keccak256(abi.encode(DESCRIPTION_PREFIX_HASH_EXTRAORDINARY, ... | constructor(IERC20 wrappedToken)
ERC20("Burn Wrapped AJNA", "bwAJNA")
ERC20Permit("Burn Wrapped AJNA") // enables wrapped token to also use permit functionality
ERC20Wrapper(wrappedToken)
{
require(wrappedToken == IERC20(AJNA_TOKEN_ADDRESS), "InvalidWrappedToken");
} | // SPDX-License-Identifier: MIT
//slither-disable-next-line solc-version
pragma solidity 0.8.7;
import { ERC20 } from "@oz/token/ERC20/ERC20.sol";
import { IERC20 } from "@oz/token/ERC20/IERC20.sol";
import { ERC20Burnable } from "@oz/token/ERC20/extensions/ERC20Burnable.sol";
import { ERC20Permit ... | other | https://github.com/code-423n4/2023-05-ajna-findings/blob/main/data/dicethedev-G.md | 2026-01-02T18:21:26.390146+00:00 | 728519e64c1f7e9254223654ee40048496713fd0c14ad870fa89fdb7dc25cf8e | 1 | 0 | 307 | 2 | false | false | true | false | high | constructor(IERC20 wrappedToken)
ERC20("Burn Wrapped AJNA", "bwAJNA")
ERC20Permit("Burn Wrapped AJNA") // enables wrapped token to also use permit functionality
ERC20Wrapper(wrappedToken)
{
require(wrappedToken == IERC20(AJNA_TOKEN_ADDRESS), "InvalidWrappedToken");
} | unknown | 307 | // Code block 1 (unknown):
constructor(IERC20 wrappedToken)
ERC20("Burn Wrapped AJNA", "bwAJNA")
ERC20Permit("Burn Wrapped AJNA") // enables wrapped token to also use permit functionality
ERC20Wrapper(wrappedToken)
{
require(wrappedToken == IERC20(AJNA_TOKEN_ADDRESS), "InvalidWrapped... | 1 | false | ExtraordinaryFunding.sol#L92, BurnWrapper.sol#L36-L38 | ExtraordinaryFunding.sol, BurnWrapper.sol | 2 | constructor(IERC20 wrappedToken)
ERC20("Burn Wrapped AJNA", "bwAJNA")
ERC20Permit("Burn Wrapped AJNA") // enables wrapped token to also use permit functionality
ERC20Wrapper(wrappedToken)
{
require(wrappedToken == IERC20(AJNA_TOKEN_ADDRESS), "InvalidWrappedToken");
} | true | // SPDX-License-Identifier: MIT
//slither-disable-next-line solc-version
pragma solidity 0.8.7;
import { ERC20 } from "@oz/token/ERC20/ERC20.sol";
import { IERC20 } from "@oz/token/ERC20/IERC20.sol";
import { ERC20Burnable } from "@oz/token/ERC20/extensions/ERC20Burnable.sol";
import { ERC20Permit ... | true | true | 7 | |||
c4 | 09-ondo | dev0cloo Q | Low | low | # QA Report
## Low Severity Findings
### Range Start and End times must be in Unix format to prevent errors in `RWADynamicOracle`
- The ranges set in the DynamicOracle contract must follow the Unix format since the calculations they are involved in use block.timestamp, which is also in Unix format, to prevent unexpe... | function getPrice() public view whenNotPaused returns (uint256 price) {
uint256 length = ranges.length;
for (uint256 i = 0; i < length; ++i) {
Range storage range = ranges[(length - 1) - i];
if (range.start <= block.timestamp) {
if (range.end <= block.timestamp) {... | oracle | https://github.com/code-423n4/2023-09-ondo-findings/blob/main/data/dev0cloo-Q.md | 2026-01-02T18:25:54.251463+00:00 | 728eff17bfee70fa52ba70a3e823461850161c38276408c3fe0c13c3528f02e5 | 1 | 0 | 1,091 | 0 | false | true | true | false | medium | function getPrice() public view whenNotPaused returns (uint256 price) {
uint256 length = ranges.length;
for (uint256 i = 0; i < length; ++i) {
Range storage range = ranges[(length - 1) - i];
if (range.start <= block.timestamp) {
if (range.end <= block.timestamp) {... | unknown | 1,091 | // Code block 1 (unknown):
function getPrice() public view whenNotPaused returns (uint256 price) {
uint256 length = ranges.length;
for (uint256 i = 0; i < length; ++i) {
Range storage range = ranges[(length - 1) - i];
if (range.start <= block.timestamp) {
if (rang... | 1 | false | 0 | function getPrice() public view whenNotPaused returns (uint256 price) {
uint256 length = ranges.length;
for (uint256 i = 0; i < length; ++i) {
Range storage range = ranges[(length - 1) - i];
if (range.start <= block.timestamp) {
if (range.end <= block.timestamp) {... | true | false | false | 5 | |||||||
c4 | 01-biconomy | Secureverse Q | Low | low | ### [Low-01] Multiple Solidity version used i.e some using ```^0.8.12``` and some using ```0.8.12```
Try to use Updated, stable, and most recent Solidity version to remain bug free
Below Solidity ```^0.8.12```
```solidity
File: aa-4337/interfaces/IAccount.sol
File: aa-4337/core/EntryPoint.sol
File: aa-4337/core/Sen... | Try to use Updated, stable, and most recent Solidity version to remain bug free
Below Solidity ```^0.8.12``` | Below Solidity ```0.8.12``` | access-control | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/Secureverse-Q.md | 2026-01-02T18:13:20.635585+00:00 | 72f32ca294d7c7b68c968cb9c2cfd647f9ff5f09e878af181ddc52073645510c | 4 | 0 | 317 | 1 | false | false | true | false | high | Try to use Updated, stable, and most recent Solidity version to remain bug free
Below Solidity | unknown | 96 | // Code block 1 (unknown):
Try to use Updated, stable, and most recent Solidity version to remain bug free
Below Solidity
// Code block 2 (unknown):
Below Solidity
// Code block 3 (unknown):
### [Low-2] Changing Owner should be a 2 Step-process
*Instances(1)*
// Code block 4 (unknown):
### [Low-03] ETH could remai... | 4 | false | SmartAccount.sol#L109-L114 | SmartAccount.sol | 1 | Try to use Updated, stable, and most recent Solidity version to remain bug free
Below Solidity ```^0.8.12``` | true | Below Solidity ```0.8.12``` | true | true | 10 | |||
c4 | 09-ondo | hunter_w3b G | High | high | # Gas Optimization
# Summary
| Number | Issue | Instances |
| :----: | :---------------------------------------------------------------------------------------------------------... | File: contracts/usdy/rUSDY.sol
bytes32 public constant USDY_MANAGER_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant BURNER_ROLE = keccak256("BURN_ROLE");
bytes32 public cons... | File: rwaOracles/RWADynamicOracle.sol
27 bytes32 public constant SETTER_ROLE = keccak256("SETTER_ROLE");
28 bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); | access-control | https://github.com/code-423n4/2023-09-ondo-findings/blob/main/data/hunter_w3b-G.md | 2026-01-02T18:25:59.187070+00:00 | 7328be05cd0b0b520b42b7fd5babe163ce028fed099bb9e68ba45081e20e7943 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | File: contracts/usdy/rUSDY.sol
bytes32 public constant USDY_MANAGER_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant BURNER_ROLE = keccak256("BURN_ROLE");
bytes32 public cons... | true | File: rwaOracles/RWADynamicOracle.sol
27 bytes32 public constant SETTER_ROLE = keccak256("SETTER_ROLE");
28 bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); | true | true | 5 | ||||||||
c4 | 05-ajna | Kenshin G | High | high | # Gas Optimization Report
## Summary
The benchmark used [Foundry's default optimizer setting](https://book.getfoundry.sh/reference/config/solidity-compiler#optimizer). The [`ExtraordinaryFunding.sol`](https://github.com/code-423n4/2023-05-ajna/blob/main/ajna-grants/src/grants/base/ExtraordinaryFunding.sol) contract was... | File: ajna-grants/src/grants/base/Funding.sol
115: if (targets_[i] != ajnaTokenAddress || values_[i] != 0) revert InvalidProposal(); | ```diff
run: diff -u before/2023-05-ajna/ajna-grants/src/grants/interfaces/IExtraordinaryFunding.sol after/2023-05-ajna/ajna-grants/src/grants/interfaces/IExtraordinaryFunding.sol
--- before/2023-05-ajna/ajna-grants/src/grants/interfaces/IExtraordinaryFunding.sol
+++ after/2023-05-ajna/ajna-grants/src/grants/interfaces... | reentrancy | https://github.com/code-423n4/2023-05-ajna-findings/blob/main/data/Kenshin-G.md | 2026-01-02T18:21:02.750613+00:00 | 734091386a5c2539ae7efd508d735b490d305d3f778f146d581b607980bcc36e | 0 | 0 | 0 | 3 | false | false | false | false | medium | 0 | 0 | false | ExtraordinaryFunding.sol, ExtraordinaryFunding.t.sol, StandardFunding.sol | ExtraordinaryFunding.t.sol, ExtraordinaryFunding.sol, StandardFunding.sol | 3 | File: ajna-grants/src/grants/base/Funding.sol
115: if (targets_[i] != ajnaTokenAddress || values_[i] != 0) revert InvalidProposal(); | true | ```diff
run: diff -u before/2023-05-ajna/ajna-grants/src/grants/interfaces/IExtraordinaryFunding.sol after/2023-05-ajna/ajna-grants/src/grants/interfaces/IExtraordinaryFunding.sol
--- before/2023-05-ajna/ajna-grants/src/grants/interfaces/IExtraordinaryFunding.sol
+++ after/2023-05-ajna/ajna-grants/src/grants/interfaces... | true | true | 6 | ||||||
c4 | 01-ondo | RaymondFam Q | High | high | ## Missing minter role granting
In `deployCash()` of CashFactory.sol, `cashProxied.grantRole()` did not grant `MINTER_ROLE` to `guardian` address. Similarly, in `deployCashKYCSender()` of CashKYCSenderFactory.sol, `cashKYCSenderProxied.` did not grant `MINTER_ROLE` to `guardian` address either. (Note: The same instance... | [File: CashKYCSenderFactory.sol#L98-L99](https://github.com/code-423n4/2023-01-ondo/blob/main/contracts/cash/factory/CashKYCSenderFactory.sol#L98-L99)
| [File: CashKYCSenderReceiverFactory.sol#L98-L99](https://github.com/code-423n4/2023-01-ondo/blob/main/contracts/cash/factory/CashKYCSenderReceiverFactory.sol#L98-L99)
| access-control | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/RaymondFam-Q.md | 2026-01-02T18:14:44.865624+00:00 | 738043866a6e1f7331671af78bbad335fda984be4b0ab3f651a72ef86fd196c5 | 3 | 3 | 537 | 4 | false | false | true | false | high | cashProxied.grantRole(DEFAULT_ADMIN_ROLE, guardian);
cashProxied.grantRole(PAUSER_ROLE, guardian);
+ cashProxied.grantRole(MINTER_ROLE, guardian); | diff | 153 | // Code block 1 (diff):
cashProxied.grantRole(DEFAULT_ADMIN_ROLE, guardian);
cashProxied.grantRole(PAUSER_ROLE, guardian);
+ cashProxied.grantRole(MINTER_ROLE, guardian);
// Code block 2 (diff):
cashKYCSenderProxied.grantRole(DEFAULT_ADMIN_ROLE, guardian);
cashKYCSenderProxied.grantRole(PAUSER_ROLE, guardia... | 3 | true | cashProxied.grantRole(DEFAULT_ADMIN_ROLE, guardian);
cashProxied.grantRole(PAUSER_ROLE, guardian);
+ cashProxied.grantRole(MINTER_ROLE, guardian);
cashKYCSenderProxied.grantRole(DEFAULT_ADMIN_ROLE, guardian);
cashKYCSenderProxied.grantRole(PAUSER_ROLE, guardian);
+ cashKYCSenderProxied.grantRole(MINTER_R... | CashFactory.sol#L75-L110, CashKYCSenderFactory.sol#L98-L99, CashKYCSenderReceiverFactory.sol#L98-L99, ERC20PresetMinterPauser.sol#L26 | CashFactory.sol, ERC20PresetMinterPauser.sol, CashKYCSenderFactory.sol, CashKYCSenderReceiverFactory.sol | 4 | [File: CashKYCSenderFactory.sol#L98-L99](https://github.com/code-423n4/2023-01-ondo/blob/main/contracts/cash/factory/CashKYCSenderFactory.sol#L98-L99)
| true | [File: CashKYCSenderReceiverFactory.sol#L98-L99](https://github.com/code-423n4/2023-01-ondo/blob/main/contracts/cash/factory/CashKYCSenderReceiverFactory.sol#L98-L99)
| true | true | 11 | ||
c4 | 01-biconomy | gz627 G | Medium | medium | ## Gas Optimizations
| | Issue | Instances |
| ----- |:-------------------------------------------------------------------- |:---------:|
| GAS-1 | Applying `unchecked` operations where no overflow/underflow possible | 13 |
| GAS-2 | Gas optim... | ...
uint256 length = someArray.length;
for (uint256 index; index<length;){
...do sth with someArray[index]...
unchecked { ++index; }
} | File: https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-contract-wallet/aa-4337/core/EntryPoint.sol
74: for (uint256 i = 0; i < opslen; i++) {
80: for (uint256 i = 0; i < opslen; i++) {
100: for (uint256 i = 0; i < opasLen; i++) {
107: for (uint25... | access-control | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/gz627-G.md | 2026-01-02T18:13:46.799210+00:00 | 73b7b9cf6e4c1bac603c43e3f933940ee900a6781c298b98d20d1b66a2428749 | 1 | 0 | 138 | 1 | false | false | true | false | high | ...
uint256 length = someArray.length;
for (uint256 index; index<length;){
...do sth with someArray[index]...
unchecked { ++index; }
} | unknown | 138 | // Code block 1 (unknown):
...
uint256 length = someArray.length;
for (uint256 index; index<length;){
...do sth with someArray[index]...
unchecked { ++index; }
} | 1 | false | EntryPoint.sol | EntryPoint.sol | 1 | ...
uint256 length = someArray.length;
for (uint256 index; index<length;){
...do sth with someArray[index]...
unchecked { ++index; }
} | true | File: https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-contract-wallet/aa-4337/core/EntryPoint.sol
74: for (uint256 i = 0; i < opslen; i++) {
80: for (uint256 i = 0; i < opslen; i++) {
100: for (uint256 i = 0; i < opasLen; i++) {
107: for (uint25... | true | true | 7 | |||
c4 | 03-asymmetry | P7N8ZK G | Unknown | unknown | # [G-01] State variable `derivativeCount` should not be looked up in every loop of a for-loop
There are 7 instances of this issue:
```
File: contracts/SafEth/SafEth.sol
71: for (uint i = 0; i < derivativeCount; i++)
84: for (uint i = 0; i < derivativeCount; i++) {
113: for (uint i = 0; i < deriva... | File: contracts/SafEth/SafEth.sol
71: for (uint i = 0; i < derivativeCount; i++)
84: for (uint i = 0; i < derivativeCount; i++) {
113: for (uint i = 0; i < derivativeCount; i++) {
140: for (uint i = 0; i < derivativeCount; i++) {
147: for (uint i = 0; i < derivativeCount; i++) {
171: ... | diff --git forkSrcPrefix/contracts/SafEth/SafEth.sol forkDstPrefix/contracts/SafEth/SafEth.sol
index ebadb4bbf2b55e7a28b0334c5dd3ea40aa163456..85b27ebb620f7ad1566145677d3b17ad4a2c8517 100644
--- forkSrcPrefix/contracts/SafEth/SafEth.sol
+++ forkDstPrefix/contracts/SafEth/SafEth.sol
@@ -68,7 +68,8 @@ contract SafEth is
... | access-control | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/P7N8ZK-G.md | 2026-01-02T18:18:22.952383+00:00 | 73ded607c7d5e6a75358fc6d0dc3ee69f166ab4c30cb9ddcdae3e0e70e5b479a | 1 | 0 | 420 | 7 | false | false | true | false | high | File: contracts/SafEth/SafEth.sol
71: for (uint i = 0; i < derivativeCount; i++)
84: for (uint i = 0; i < derivativeCount; i++) {
113: for (uint i = 0; i < derivativeCount; i++) {
140: for (uint i = 0; i < derivativeCount; i++) {
147: for (uint i = 0; i < derivativeCount; i++) {
171: ... | unknown | 420 | // Code block 1 (unknown):
File: contracts/SafEth/SafEth.sol
71: for (uint i = 0; i < derivativeCount; i++)
84: for (uint i = 0; i < derivativeCount; i++) {
113: for (uint i = 0; i < derivativeCount; i++) {
140: for (uint i = 0; i < derivativeCount; i++) {
147: for (uint i = 0; i < deri... | 1 | false | SafEth.sol#L71, SafEth.sol#L84, SafEth.sol#L113, SafEth.sol#L140, SafEth.sol#L147, SafEth.sol#L171, SafEth.sol#L191 | SafEth.sol | 7 | File: contracts/SafEth/SafEth.sol
71: for (uint i = 0; i < derivativeCount; i++)
84: for (uint i = 0; i < derivativeCount; i++) {
113: for (uint i = 0; i < derivativeCount; i++) {
140: for (uint i = 0; i < derivativeCount; i++) {
147: for (uint i = 0; i < derivativeCount; i++) {
171: ... | true | diff --git forkSrcPrefix/contracts/SafEth/SafEth.sol forkDstPrefix/contracts/SafEth/SafEth.sol
index ebadb4bbf2b55e7a28b0334c5dd3ea40aa163456..85b27ebb620f7ad1566145677d3b17ad4a2c8517 100644
--- forkSrcPrefix/contracts/SafEth/SafEth.sol
+++ forkDstPrefix/contracts/SafEth/SafEth.sol
@@ -68,7 +68,8 @@ contract SafEth is
... | true | true | 7 | |||
c4 | 01-biconomy | RaymondFam Q | Critical | critical | ## Modularity on import usages
For cleaner Solidity code in conjunction with the rule of modularity and modular programming, use named imports with curly braces instead of adopting the global import approach.
For instance, the import instances below could be refactored as follows:
[File: ModuleManager.sol#L4-L6](http... | ## Expression for Hashed Values
Long bytes of literal values assigned to constants may incur typo/human error. In fact, it was validated in the constructor of Proxy.sol and Singleton.sol using `assert()` to compare the hashed constant with its `bytes32()` result to avoid this error:
[File: Singleton.sol#L13](https://g... | As such, consider at least assigning these constants with their corresponding `bytes32()` expression where possible. For instance, the instance below could have its code line refactored as follows:
[File: SmartAccount.sol#L42-L48](https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-c... | reentrancy | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/RaymondFam-Q.md | 2026-01-02T18:13:15.664958+00:00 | 73f8c9d5d52b2e936c1825e2f8fe949afcef1b7a6ced24376ac1407ed178cda3 | 2 | 2 | 348 | 4 | false | false | true | false | high | - import "../common/Enum.sol";
- import "../common/SelfAuthorized.sol";
- import "./Executor.sol";
+ import {Enum} from "../common/Enum.sol";
+ import {SelfAuthorized} from "../common/SelfAuthorized.sol";
+ import {Executor} from "./Executor.sol"; | diff | 247 | // Code block 1 (diff):
- import "../common/Enum.sol";
- import "../common/SelfAuthorized.sol";
- import "./Executor.sol";
+ import {Enum} from "../common/Enum.sol";
+ import {SelfAuthorized} from "../common/SelfAuthorized.sol";
+ import {Executor} from "./Executor.sol";
// Code block 2 (solidity):
assert(_IMPLEMENTAT... | 2 | true | - import "../common/Enum.sol";
- import "../common/SelfAuthorized.sol";
- import "./Executor.sol";
+ import {Enum} from "../common/Enum.sol";
+ import {SelfAuthorized} from "../common/SelfAuthorized.sol";
+ import {Executor} from "./Executor.sol"; | assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("biconomy.scw.proxy.implementation")) - 1)); | ModuleManager.sol#L4-L6, Singleton.sol#L13, Proxy.sol#L16, SmartAccount.sol#L42-L48 | ModuleManager.sol, SmartAccount.sol, Proxy.sol, Singleton.sol | 4 | ## Expression for Hashed Values
Long bytes of literal values assigned to constants may incur typo/human error. In fact, it was validated in the constructor of Proxy.sol and Singleton.sol using `assert()` to compare the hashed constant with its `bytes32()` result to avoid this error:
[File: Singleton.sol#L13](https://g... | true | As such, consider at least assigning these constants with their corresponding `bytes32()` expression where possible. For instance, the instance below could have its code line refactored as follows:
[File: SmartAccount.sol#L42-L48](https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-c... | true | true | 10 | |
c4 | 08-dopex | COSMIC BEE REACH Q | High | high | ## Summary
### [LOW]
1. Possible unhandled underflow in PerpetualAtlanticVaultLP::redeem()
2. No validations to verify that `rdpxAmount` is not 0
3. UniV2LiquidityAmo::liquidityInPool() needs validation to check for pool existence
4. The contract `RdpxV2Core` needs to add validations before using reserve assets
5. No v... | /// @dev the pointer to the lattest funding payment timestamp
/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
/// @return Documents the return variables of a contract’s function state variable
/// @inheritdoc IPerpetualAtlanticVault | return
supply == 0 ? assets : assets.mulDivDown(supply, totalVaultCollateral); | access-control | https://github.com/code-423n4/2023-08-dopex-findings/blob/main/data/COSMIC-BEE-REACH-Q.md | 2026-01-02T18:24:33.075570+00:00 | 741b71aeb011eeba3ed35f5d183ef1d9c90b15ffd2bbb88e616e0e5f9d5c1b4c | 1 | 0 | 292 | 2 | false | false | true | false | high | /// @dev the pointer to the lattest funding payment timestamp
/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
/// @return Documents the return variables of a contract’s function state variable
/// @inheritdoc IPerpetualAtlanticVault | unknown | 292 | // Code block 1 (unknown):
/// @dev the pointer to the lattest funding payment timestamp
/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
/// @return Documents the return variables of a contract’s function state variable
/// @inheritdoc IPerpetualAtlanticVault | 1 | false | PerpetualAtlanticVault.sol#L84-L88, PerpetualAtlanticVault.sol#L270 | PerpetualAtlanticVault.sol | 2 | /// @dev the pointer to the lattest funding payment timestamp
/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
/// @return Documents the return variables of a contract’s function state variable
/// @inheritdoc IPerpetualAtlanticVault | true | return
supply == 0 ? assets : assets.mulDivDown(supply, totalVaultCollateral); | true | true | 7 | |||
c4 | 08-dopex | Bauchibred Q | High | high | # DopeX QA Report
| | Issue |
| ----- | -------------------------------------------------------------------------------------------------------------------------------------- |
| QA-01... | function addToDelegate(
uint256 _amount,
uint256 _fee
) external returns (uint256) {
_whenNotPaused();
// fee less than 100%
_validate(_fee < 100e8, 8);
// amount greater than 0.01 WETH
_validate(_amount > 1e16, 4);
// fee greater than 1%
//@audit
_validate(_fee >= 1e8, 8);
... | _validate(_fee >= 1e8, 20); | access-control | https://github.com/code-423n4/2023-08-dopex-findings/blob/main/data/Bauchibred-Q.md | 2026-01-02T18:24:32.174169+00:00 | 7431049eff63f3ac5b464dcbc0d61939cf78191adf76fea56c9b5e2c2aa910d9 | 0 | 0 | 0 | 1 | false | false | false | false | medium | 0 | 0 | false | RdpxV2Core.sol#L941-L969 | RdpxV2Core.sol | 1 | function addToDelegate(
uint256 _amount,
uint256 _fee
) external returns (uint256) {
_whenNotPaused();
// fee less than 100%
_validate(_fee < 100e8, 8);
// amount greater than 0.01 WETH
_validate(_amount > 1e16, 4);
// fee greater than 1%
//@audit
_validate(_fee >= 1e8, 8);
... | true | _validate(_fee >= 1e8, 20); | true | true | 6 | ||||||
c4 | 08-dopex | RED LOTUS REACH Q | Critical | critical | # Low Risk and Non-Critical Issues
# Some values cannot be amended without deploying the contract
Critical values may be set to nonsense values during deployment.
https://github.com/code-423n4/2023-08-dopex/blob/eb4d4a201b3a75dd4bddc74a34e9c42c71d0d12f/contracts/core/RdpxV2Core.sol#L67
```
address public weth;
```
... | address public weth; | constructor(address _weth) {
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
weth = _weth; | access-control | https://github.com/code-423n4/2023-08-dopex-findings/blob/main/data/RED-LOTUS-REACH-Q.md | 2026-01-02T18:24:57.795131+00:00 | 743890902d160ecde8b6772e026f47b0aad460b2b693dc83bb7ac35a9699f756 | 2 | 0 | 114 | 3 | false | false | true | false | high | address public weth; | unknown | 20 | // Code block 1 (unknown):
address public weth;
// Code block 2 (unknown):
constructor(address _weth) {
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
weth = _weth; | 2 | false | RdpxV2Core.sol#L67, RdpxV2Core.sol#L124-L126, RdpxDecayingBonds.sol#L120 | RdpxV2Core.sol, RdpxDecayingBonds.sol | 3 | address public weth; | true | constructor(address _weth) {
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
weth = _weth; | true | true | 8 | |||
c4 | 07-amphora | halden Q | Low | low | # Low/NC issues
## [L-01] quorumVotes can be setted to 0
### Impact
It is possible for `quorumVotes` to be set to zero by the government.
```solidity
function setQuorumVotes(uint256 _newQuorumVotes) external override onlyGov {
//@audit _newQuorumVotes != 0
uint256 _oldQuorumVotes = quorumVotes;
quorumVot... | function setQuorumVotes(uint256 _newQuorumVotes) external override onlyGov {
//@audit _newQuorumVotes != 0
uint256 _oldQuorumVotes = quorumVotes;
quorumVotes = _newQuorumVotes;
emit NewQuorum(_oldQuorumVotes, quorumVotes);
} | // Reject proposals before initiating as Governor
if (quorumVotes == 0) revert GovernorCharlie_NotActive(); | access-control | https://github.com/code-423n4/2023-07-amphora-findings/blob/main/data/halden-Q.md | 2026-01-02T18:23:49.272372+00:00 | 749a3688e75abe0d434ad79e2477faf1504ea4224a2b85c434c5b2adfe0bbd37 | 4 | 4 | 785 | 0 | false | false | true | false | high | function setQuorumVotes(uint256 _newQuorumVotes) external override onlyGov {
//@audit _newQuorumVotes != 0
uint256 _oldQuorumVotes = quorumVotes;
quorumVotes = _newQuorumVotes;
emit NewQuorum(_oldQuorumVotes, quorumVotes);
} | solidity | 243 | // Code block 1 (solidity):
function setQuorumVotes(uint256 _newQuorumVotes) external override onlyGov {
//@audit _newQuorumVotes != 0
uint256 _oldQuorumVotes = quorumVotes;
quorumVotes = _newQuorumVotes;
emit NewQuorum(_oldQuorumVotes, quorumVotes);
}
// Code block 2 (solidity):
// Reject proposals... | 4 | false | function setQuorumVotes(uint256 _newQuorumVotes) external override onlyGov {
//@audit _newQuorumVotes != 0
uint256 _oldQuorumVotes = quorumVotes;
quorumVotes = _newQuorumVotes;
emit NewQuorum(_oldQuorumVotes, quorumVotes);
}
// Reject proposals before initiating as Governor
if (quorumVotes == 0)... | 0 | function setQuorumVotes(uint256 _newQuorumVotes) external override onlyGov {
//@audit _newQuorumVotes != 0
uint256 _oldQuorumVotes = quorumVotes;
quorumVotes = _newQuorumVotes;
emit NewQuorum(_oldQuorumVotes, quorumVotes);
} | true | // Reject proposals before initiating as Governor
if (quorumVotes == 0) revert GovernorCharlie_NotActive(); | true | true | 9 | ||||
c4 | 05-ajna | spark Q | Gas | gas | In the PositionManager.sol, the function `memorializePositions` is trying to update `positions` inside the for loop based on the length of `params_.indexes`.
```solidity
uint256 indexesLength = params_.indexes.length;
uint256 index;
for (uint256 i = 0; i < indexesLength; ) {...}
```
However,... | uint256 indexesLength = params_.indexes.length;
uint256 index;
for (uint256 i = 0; i < indexesLength; ) {...}
| other | https://github.com/code-423n4/2023-05-ajna-findings/blob/main/data/spark-Q.md | 2026-01-02T18:21:48.327526+00:00 | 74cd3e2882d4f4300577ec0403811a9610db53ab100686e5cfecb409acdcf6aa | 1 | 1 | 126 | 0 | false | true | true | false | medium | uint256 indexesLength = params_.indexes.length;
uint256 index;
for (uint256 i = 0; i < indexesLength; ) {...} | solidity | 126 | // Code block 1 (solidity):
uint256 indexesLength = params_.indexes.length;
uint256 index;
for (uint256 i = 0; i < indexesLength; ) {...} | 1 | false | uint256 indexesLength = params_.indexes.length;
uint256 index;
for (uint256 i = 0; i < indexesLength; ) {...} | 0 | uint256 indexesLength = params_.indexes.length;
uint256 index;
for (uint256 i = 0; i < indexesLength; ) {...}
| true | false | false | 2.9 | ||||||
c4 | 02-ethos | IceBear Q | Critical | critical | ## Non Critical Issues
### [N-1] Use of block.timestamp
Block timestamps have historically been used for a variety of applications, such as entropy for random numbers (see the Entropy Illusion for further details), locking funds for periods of time, and various state-changing conditional statements that are time-depe... | File: Ethos-Core/contracts/LQTY/CommunityIssuance.sol
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
93: lastIssuanc... | File: Ethos-Core/contracts/LUSDToken.sol
128: deploymentStartTime = block.timestamp;
| access-control | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/IceBear-Q.md | 2026-01-02T18:16:14.816456+00:00 | 750db159cd7a46a1af2f3a5df236ea0e02bc3fa441a36b450ebf8fc73226a28d | 1 | 1 | 482 | 1 | false | false | true | false | high | File: Ethos-Core/contracts/LQTY/CommunityIssuance.sol
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
93: lastIssuanc... | solidity | 482 | // Code block 1 (solidity):
File: Ethos-Core/contracts/LQTY/CommunityIssuance.sol
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timesta... | 1 | false | File: Ethos-Core/contracts/LQTY/CommunityIssuance.sol
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
93: lastIssuanc... | CommunityIssuance.sol | CommunityIssuance.sol | 1 | File: Ethos-Core/contracts/LQTY/CommunityIssuance.sol
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
87: uint256 endTimestamp = block.timestamp > lastDistributionTime ? lastDistributionTime : block.timestamp;
93: lastIssuanc... | true | File: Ethos-Core/contracts/LUSDToken.sol
128: deploymentStartTime = block.timestamp;
| true | true | 7 | ||
c4 | 03-asymmetry | hl_ Q | High | high | # Table of contents
- [L-01] Unable to remove derivative
- [L-02] Unstaking should not be paused
- [L-03] Function `RebalanceToWeight` may revert
- [L-04] Functions `stake` and `unstake` may revert
- [L-05] Include check to ensure sufficient funds for unstaking
- [N-01] Insufficient test coverage
- [N-02] Import decl... | File: 2023-03-asymmetry/contracts/SafEth/SafEth.sol
108: function unstake(uint256 _safEthAmount) external {
109: require(pauseUnstaking == false, "unstaking is paused"); | File: 2023-03-asymmetry/contracts/SafEth/SafEth.sol (L138-155)
function rebalanceToWeights() external onlyOwner {
uint256 ethAmountBefore = address(this).balance;
for (uint i = 0; i < derivativeCount; i++) {
if (derivatives[i].balance() > 0)
derivatives[i].withdraw(derivati... | access-control | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/hl_-Q.md | 2026-01-02T18:19:11.549660+00:00 | 752417b8fd81f2314ca053f0bada75eb8ded10f1a017f136da8f18312d2045dc | 1 | 0 | 178 | 1 | false | false | true | false | high | File: 2023-03-asymmetry/contracts/SafEth/SafEth.sol
108: function unstake(uint256 _safEthAmount) external {
109: require(pauseUnstaking == false, "unstaking is paused"); | unknown | 178 | // Code block 1 (unknown):
File: 2023-03-asymmetry/contracts/SafEth/SafEth.sol
108: function unstake(uint256 _safEthAmount) external {
109: require(pauseUnstaking == false, "unstaking is paused"); | 1 | false | SafEth.sol#L109 | SafEth.sol | 1 | File: 2023-03-asymmetry/contracts/SafEth/SafEth.sol
108: function unstake(uint256 _safEthAmount) external {
109: require(pauseUnstaking == false, "unstaking is paused"); | true | File: 2023-03-asymmetry/contracts/SafEth/SafEth.sol (L138-155)
function rebalanceToWeights() external onlyOwner {
uint256 ethAmountBefore = address(this).balance;
for (uint i = 0; i < derivativeCount; i++) {
if (derivatives[i].balance() > 0)
derivatives[i].withdraw(derivati... | true | true | 7 | |||
c4 | 03-asymmetry | Bason G | High | high | ## Gas Optimization Findings
| Number |Issues Details |
|:--:|:-------|
|[GAS-01]| Use if statements instead of require and revert with custom errors instead of using strings
|[GAS-02]| Make some constants private
|[GAS-03]| Use calldata type instead of memory
|[GAS-04]| Compute off-chain and use directly the hashes of... | Reth.sol
require(sent, "Failed to send Ether");
require(rethBalance2 > rethBalance1, "No rETH was minted");
| WstEth.sol
require(sent, "Failed to send Ether");
| upgrade | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/Bason-G.md | 2026-01-02T18:17:53.472437+00:00 | 7542d35919e49c5aca23300b553b60cdaddd36407cc1195dc8bd167f639fbe68 | 2 | 0 | 156 | 0 | false | false | true | false | high | Reth.sol
require(sent, "Failed to send Ether");
require(rethBalance2 > rethBalance1, "No rETH was minted"); | unknown | 107 | // Code block 1 (unknown):
Reth.sol
require(sent, "Failed to send Ether");
require(rethBalance2 > rethBalance1, "No rETH was minted");
// Code block 2 (unknown):
WstEth.sol
require(sent, "Failed to send Ether"); | 2 | false | 0 | Reth.sol
require(sent, "Failed to send Ether");
require(rethBalance2 > rethBalance1, "No rETH was minted");
| true | WstEth.sol
require(sent, "Failed to send Ether");
| true | true | 7 | |||||
c4 | 01-salty | 0xSmartContractSamurai Q | Critical | critical | 0. `Proposals::proposeSendSALT()` - L202: Whenever salt balance of DAO.sol is `0 < DAO salt balance < 20`, `maxSendable` will round down to zero, therefore 0 salt will be sent even when salt balance is `19.99`.
https://github.com/code-423n4/2024-01-salty/blob/ce719503b43ebf086f5147c0f6efc3c0890bf0f9/src/dao/Proposals.... | if ( exchangeConfig.salt().balanceOf(address(this)) >= ballot.number1 ) | if ( exchangeConfig.salt().balanceOf(address(this)) * 5 / 100 >= ballot.number1 ) | access-control | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/0xSmartContractSamurai-Q.md | 2026-01-02T19:01:07.510563+00:00 | 7553562202c74a77fb52ca4c2ab0bc0afda09d6111dc04b76f259461595e0bff | 1 | 1 | 71 | 3 | false | false | true | false | high | if ( exchangeConfig.salt().balanceOf(address(this)) >= ballot.number1 ) | solidity | 71 | // Code block 1 (solidity):
if ( exchangeConfig.salt().balanceOf(address(this)) >= ballot.number1 ) | 1 | false | if ( exchangeConfig.salt().balanceOf(address(this)) >= ballot.number1 ) | Proposals.sol#L202, Proposals.sol#L203, DAO.sol#L170 | Proposals.sol, DAO.sol | 3 | if ( exchangeConfig.salt().balanceOf(address(this)) >= ballot.number1 ) | true | if ( exchangeConfig.salt().balanceOf(address(this)) * 5 / 100 >= ballot.number1 ) | true | true | 7 | ||
c4 | 09-ondo | sandy Q | Critical | critical | # Summary
## Low Risk Issues
|Id|Title|
|:--:|:-------|
|L-01| Manually approve allowance to 0 to reduce chance of approval front-running |
## [L-01] Manually approve allowance to 0 to reduce chance of approval front-running.
### Instance:
1. https://github.com/code-423n4/2023-09-ondo/blob/47d34d6d4a5303af5f46e907... | function _approve(
address _owner,
address _spender,
uint256 _amount
) internal whenNotPaused {
require(_owner != address(0), "APPROVE_FROM_ZERO_ADDRESS");
require(_spender != address(0), "APPROVE_TO_ZERO_ADDRESS");
allowances[_owner][_spender] = _amount;
emit Approval(_owner, _spender,... | access-control | https://github.com/code-423n4/2023-09-ondo-findings/blob/main/data/sandy-Q.md | 2026-01-02T18:26:17.112085+00:00 | 75e467a4a5338dd6b8e4816825f20a9227c6f862c5168c638ce55935eb50da22 | 2 | 1 | 726 | 1 | false | true | true | false | high | function _approve(
address _owner,
address _spender,
uint256 _amount
) internal whenNotPaused {
require(_owner != address(0), "APPROVE_FROM_ZERO_ADDRESS");
require(_spender != address(0), "APPROVE_TO_ZERO_ADDRESS");
allowances[_owner][_spender] = _amount;
emit Approval(_owner, _spender, _... | unknown | 332 | // Code block 1 (unknown):
function _approve(
address _owner,
address _spender,
uint256 _amount
) internal whenNotPaused {
require(_owner != address(0), "APPROVE_FROM_ZERO_ADDRESS");
require(_spender != address(0), "APPROVE_TO_ZERO_ADDRESS");
allowances[_owner][_spender] = _amount;
emit A... | 2 | true | function _approve(
address _owner,
address _spender,
uint256 _amount
) internal whenNotPaused {
require(_owner != address(0), "APPROVE_FROM_ZERO_ADDRESS");
require(_spender != address(0), "APPROVE_TO_ZERO_ADDRESS");
+ allowances[_owner][_spender] = 0; //manually approve to 0
allowances[_own... | rUSDY.sol#L485-L495 | rUSDY.sol | 1 | function _approve(
address _owner,
address _spender,
uint256 _amount
) internal whenNotPaused {
require(_owner != address(0), "APPROVE_FROM_ZERO_ADDRESS");
require(_spender != address(0), "APPROVE_TO_ZERO_ADDRESS");
allowances[_owner][_spender] = _amount;
emit Approval(_owner, _spender,... | true | false | false | 9 | ||||
c4 | 10-badger | 0xhex G | Low | low | ## [G-01] Splitting require() statements that use && saves gas
```solidity
File: contracts/contracts/BorrowerOperations.sol
734 require(
735 recoveredAddress != address(0) && recoveredAddress == _borrower,
736 "BorrowerOperations: Invalid signature"
737 );
```
https://github.com/co... | File: contracts/contracts/BorrowerOperations.sol
734 require(
735 recoveredAddress != address(0) && recoveredAddress == _borrower,
736 "BorrowerOperations: Invalid signature"
737 ); | File: contracts/contracts/CdpManager.sol
762 require(
763 _maxFeePercentage >= redemptionFeeFloor && _maxFeePercentage <= DECIMAL_PRECISION,
764 "Max fee percentage must be between redemption fee floor and 100%"
765 ); | access-control | https://github.com/code-423n4/2023-10-badger-findings/blob/main/data/0xhex-G.md | 2026-01-02T18:26:27.256442+00:00 | 75ed507bb9e1dc77450b4f3e8d05aec031e6e894fd250eccd122cc5f99cb0c53 | 4 | 4 | 1,515 | 3 | false | false | true | false | high | File: contracts/contracts/BorrowerOperations.sol
734 require(
735 recoveredAddress != address(0) && recoveredAddress == _borrower,
736 "BorrowerOperations: Invalid signature"
737 ); | solidity | 217 | // Code block 1 (solidity):
File: contracts/contracts/BorrowerOperations.sol
734 require(
735 recoveredAddress != address(0) && recoveredAddress == _borrower,
736 "BorrowerOperations: Invalid signature"
737 );
// Code block 2 (solidity):
File: contracts/contracts/CdpManager.sol
762... | 4 | false | File: contracts/contracts/BorrowerOperations.sol
734 require(
735 recoveredAddress != address(0) && recoveredAddress == _borrower,
736 "BorrowerOperations: Invalid signature"
737 );
File: contracts/contracts/CdpManager.sol
762 require(
763 _maxFeePercentage >= red... | BorrowerOperations.sol#L734-L737, CdpManager.sol#L762, CdpManagerStorage.sol#L261 | BorrowerOperations.sol, CdpManager.sol, CdpManagerStorage.sol | 3 | File: contracts/contracts/BorrowerOperations.sol
734 require(
735 recoveredAddress != address(0) && recoveredAddress == _borrower,
736 "BorrowerOperations: Invalid signature"
737 ); | true | File: contracts/contracts/CdpManager.sol
762 require(
763 _maxFeePercentage >= redemptionFeeFloor && _maxFeePercentage <= DECIMAL_PRECISION,
764 "Max fee percentage must be between redemption fee floor and 100%"
765 ); | true | true | 10 | ||
c4 | 01-ondo | 0x1f8b Q | Critical | critical | - [Low](#low)
- [**1. Integer overflow by unsafe casting**](#1-integer-overflow-by-unsafe-casting)
- [**2. Mixing and Outdated compiler**](#2-mixing-and-outdated-compiler)
- [Non critical](#non-critical)
- [**3. Wong naming**](#3-wong-naming)
- [**4. Lack of checks supportsInterface**](#4-lack-of-checks... | return uint256(answer) * chainlinkInfo.scaleFactor; | pragma solidity ^0.5.12;
pragma solidity ^0.5.16;
pragma solidity 0.8.16; | oracle | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/0x1f8b-Q.md | 2026-01-02T18:14:19.381529+00:00 | 760fdf06c42db0a96773b6fd9d7d8dbf0c98e55a878bb44540452b3b6f274009 | 2 | 0 | 124 | 1 | false | false | true | false | high | return uint256(answer) * chainlinkInfo.scaleFactor; | javascript | 51 | // Code block 1 (javascript):
return uint256(answer) * chainlinkInfo.scaleFactor;
// Code block 2 (unknown):
pragma solidity ^0.5.12;
pragma solidity ^0.5.16;
pragma solidity 0.8.16; | 2 | false | OndoPriceOracleV2.sol#L300 | OndoPriceOracleV2.sol | 1 | return uint256(answer) * chainlinkInfo.scaleFactor; | true | pragma solidity ^0.5.12;
pragma solidity ^0.5.16;
pragma solidity 0.8.16; | true | true | 8 | |||
c4 | 01-ondo | c3phas G | High | high | ### Table of contents
- [FINDINGS](#findings)
- [Using immutable on variables that are only set in the constructor and never after (2.1k gas per var)](#using-immutable-on-variables-that-are-only-set-in-the-constructor-and-never-after--21k-gas-per-var)
- [Tighly pack storage variables/optimize the order of variable dec... | File: /contracts/lending/JumpRateModelV2.sol
24: address public owner; | ## Tighly pack storage variables/optimize the order of variable declaration(Gas Savings: 6k in total)
Here, the storage variables can be tightly packed to save some slots
https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/contracts/lending/tokens/cCash/CTokenInterfacesModifiedCash... | reentrancy | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/c3phas-G.md | 2026-01-02T18:14:57.838686+00:00 | 7653c8472a27a2473fdebd6fc484e734a08b41c8276f32988e62a2bc9b04fcef | 0 | 0 | 0 | 1 | false | false | false | false | medium | 0 | 0 | false | CTokenInterfacesModifiedCash.sol#L13-L48 | CTokenInterfacesModifiedCash.sol | 1 | File: /contracts/lending/JumpRateModelV2.sol
24: address public owner; | true | ## Tighly pack storage variables/optimize the order of variable declaration(Gas Savings: 6k in total)
Here, the storage variables can be tightly packed to save some slots
https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/contracts/lending/tokens/cCash/CTokenInterfacesModifiedCash... | true | true | 6 | ||||||
c4 | 01-biconomy | SaharDevep G | High | high | # c4udit Report
### Summery
[G001] Don't Initialize Variables with Default Value
[G002] Cache Array Length Outside of Loop
[G003] Use != 0 instead of > 0 for Unsigned Integer Comparison
[G004] Use immutable for OpenZeppelin AccessControl's Roles Declarations
[G005] Long Revert Strings
[G006] Use Shift Right/Left inst... | scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::234 => uint256 payment = 0;
scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::310 => uint256 i = 0;
scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::468 => for (uint i = 0; i < dest.length;) {
scw-contracts\contracts\smart-cont... | scw-contracts\contracts\smart-contract-wallet\BaseSmartAccount.sol::64 => if (userOp.initCode.length == 0) {
scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::199 => // ~= 21k + calldata.length * [1/3 * 16 + 2/3 * 4]
scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::200 => uint256... | reentrancy | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/SaharDevep-G.md | 2026-01-02T18:13:17.932824+00:00 | 7707d77f503045c44a54c21f46451e185b86c3d52c21f60fde00caed92c2aa70 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::234 => uint256 payment = 0;
scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::310 => uint256 i = 0;
scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::468 => for (uint i = 0; i < dest.length;) {
scw-contracts\contracts\smart-cont... | true | scw-contracts\contracts\smart-contract-wallet\BaseSmartAccount.sol::64 => if (userOp.initCode.length == 0) {
scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::199 => // ~= 21k + calldata.length * [1/3 * 16 + 2/3 * 4]
scw-contracts\contracts\smart-contract-wallet\SmartAccount.sol::200 => uint256... | true | true | 5 | ||||||||
c4 | 05-ajna | hunter_w3b G | Medium | medium | ## Summary
### Gas Optimizations
| | Issue | Instances | Total Gas Saved |
| ------------- | :-----------------------------------------------------------------------------------------------------------... | File: /ajna-core/src/PositionManager.sol
/// @audit updateInterest()
274 IPool(params_.pool).updateInterest();
/// @audit bucketInfo()
282 ) = IPool(params_.pool).bucketInfo(params_.fromIndex);
/// @audit moveQuoteToken()
310 ) = IPool(params_.pool).moveQuoteToken(
/// @audit colla... | File: /ajna-core/src/RewardsManager.sol
/// @audit currentBurnEpoch()
150 = IPool(ajnaPool).currentBurnEpoch();
/// @audit bucketExchangeRate()
180 = uint128(IPool(ajnaPool).bucketExchangeRate(toIndex));
/// @audit ownerOf()
213 if (IERC721(address(positionManager)).ownerOf(tok... | reentrancy | https://github.com/code-423n4/2023-05-ajna-findings/blob/main/data/hunter_w3b-G.md | 2026-01-02T18:21:29.845261+00:00 | 773358cf29347603a0fcbf1b7627f9ae0915ba3b063b01250114f645152ef656 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | File: /ajna-core/src/PositionManager.sol
/// @audit updateInterest()
274 IPool(params_.pool).updateInterest();
/// @audit bucketInfo()
282 ) = IPool(params_.pool).bucketInfo(params_.fromIndex);
/// @audit moveQuoteToken()
310 ) = IPool(params_.pool).moveQuoteToken(
/// @audit colla... | true | File: /ajna-core/src/RewardsManager.sol
/// @audit currentBurnEpoch()
150 = IPool(ajnaPool).currentBurnEpoch();
/// @audit bucketExchangeRate()
180 = uint128(IPool(ajnaPool).bucketExchangeRate(toIndex));
/// @audit ownerOf()
213 if (IERC721(address(positionManager)).ownerOf(tok... | true | true | 5 | ||||||||
c4 | 04-caviar | LewisBroadhurst G | High | high | ## Gas Optimisations
### [G-01]
If statements are made throughout the code base to perform important checks. Instead of using if statements, we can make use of the `require` function to perform the same checks. Modest gas saving that adds up over time.
```
// Example
- if (initialized) revert AlreadyInitialized();
... | // Example
- if (initialized) revert AlreadyInitialized();
+ require(!initialized, AlreadyInitialized()); | flash-loan | https://github.com/code-423n4/2023-04-caviar-findings/blob/main/data/LewisBroadhurst-G.md | 2026-01-02T18:19:48.922309+00:00 | 774d5538c612476895dc510dc6c5ddc9f66dab8bb534b5ec2292081e3e952a6a | 1 | 0 | 107 | 0 | false | true | true | false | medium | // Example
- if (initialized) revert AlreadyInitialized();
+ require(!initialized, AlreadyInitialized()); | unknown | 107 | // Code block 1 (unknown):
// Example
- if (initialized) revert AlreadyInitialized();
+ require(!initialized, AlreadyInitialized()); | 1 | false | 0 | // Example
- if (initialized) revert AlreadyInitialized();
+ require(!initialized, AlreadyInitialized()); | true | false | false | 5 | |||||||
c4 | 01-biconomy | MalfurionWhitehat Q | High | high | # 1. Use `block.chainid` on `SmartAccount.getChainId`
The use of inline assembly is unnecessary here:
```diff
diff --git a/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol b/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
index c4f69a8..928c16a 100644
--- a/scw-contracts/contracts/smart-c... | # 2. Do not use `tx.origin` for testing purposes on `SmartAccount._validateSignature`. Instead, create a mock implementation that overrides this method and bypasses any necessary signature validation.
Mixing testing and deployment code will unnecessarily introduce dead code on production contracts and will make hinder... | # 3. Emit events on important state variable changing operations: `VerifyingSingletonPaymaster.setSigner`
| access-control | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/MalfurionWhitehat-Q.md | 2026-01-02T18:13:11.176839+00:00 | 7769407c0fb25f5e955360be8d8a0a737c27a4b55ffe3ef62b77e799f1da90dc | 2 | 2 | 1,526 | 0 | false | false | true | false | high | diff --git a/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol b/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
index c4f69a8..928c16a 100644
--- a/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
+++ b/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
@@ -138,12 ... | diff | 731 | // Code block 1 (diff):
diff --git a/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol b/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
index c4f69a8..928c16a 100644
--- a/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
+++ b/scw-contracts/contracts/smart-contract-wallet/Smar... | 2 | true | diff --git a/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol b/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
index c4f69a8..928c16a 100644
--- a/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
+++ b/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol
@@ -138,12 ... | 0 | # 2. Do not use `tx.origin` for testing purposes on `SmartAccount._validateSignature`. Instead, create a mock implementation that overrides this method and bypasses any necessary signature validation.
Mixing testing and deployment code will unnecessarily introduce dead code on production contracts and will make hinder... | true | # 3. Emit events on important state variable changing operations: `VerifyingSingletonPaymaster.setSigner`
| true | true | 9 | ||||
c4 | 02-ai-arena | Daniel526 Q | Unknown | unknown | A. Inconsistent State Update in pickWinner Function
[#L118-L132](https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/MergingPool.sol#L118-L132)
- The `pickWinner` function is designed to select winners for the current round based on the provided list of token IDs (winners ar... | function pickWinner(uint256[] calldata winners) external {
require(isAdmin[msg.sender]);
require(winners.length == winnersPerPeriod, "Incorrect number of winners");
require(!isSelectionComplete[roundId], "Winners are already selected");
require(winners.length > 0, "Winners array cannot be empty"); // Va... | access-control | https://github.com/code-423n4/2024-02-ai-arena-findings/blob/main/data/Daniel526-Q.md | 2026-01-02T19:02:21.697810+00:00 | 77731b93c36c8c25b4b3e9c2638bf768a5ea83855eac4e5d7b13eecfffe8c2b6 | 1 | 1 | 427 | 1 | false | true | true | false | medium | function pickWinner(uint256[] calldata winners) external {
require(isAdmin[msg.sender]);
require(winners.length == winnersPerPeriod, "Incorrect number of winners");
require(!isSelectionComplete[roundId], "Winners are already selected");
require(winners.length > 0, "Winners array cannot be empty"); // Va... | solidity | 427 | // Code block 1 (solidity):
function pickWinner(uint256[] calldata winners) external {
require(isAdmin[msg.sender]);
require(winners.length == winnersPerPeriod, "Incorrect number of winners");
require(!isSelectionComplete[roundId], "Winners are already selected");
require(winners.length > 0, "Winners ar... | 1 | false | function pickWinner(uint256[] calldata winners) external {
require(isAdmin[msg.sender]);
require(winners.length == winnersPerPeriod, "Incorrect number of winners");
require(!isSelectionComplete[roundId], "Winners are already selected");
require(winners.length > 0, "Winners array cannot be empty"); // Va... | MergingPool.sol#L118-L132 | MergingPool.sol | 1 | function pickWinner(uint256[] calldata winners) external {
require(isAdmin[msg.sender]);
require(winners.length == winnersPerPeriod, "Incorrect number of winners");
require(!isSelectionComplete[roundId], "Winners are already selected");
require(winners.length > 0, "Winners array cannot be empty"); // Va... | true | false | false | 6 | ||||
c4 | 01-biconomy | cryptostellar5 G | High | high |
### G-01 ++I or I++ SHOULD BE UNCHECKED{++I} or UNCHECKED{I++} WHEN IT IS NOT POSSIBLE FOR THEM TO OVERFLOW, AS IS THE CASE WHEN USED IN FOR- AND WHILE-LOOPS
*Number of Instances Identified: 5*
The `unchecked` keyword is new in solidity version 0.8.0, so this only applies to that version or higher, which these insta... | 100: for (uint256 i = 0; i < opasLen; i++)
107: for (uint256 a = 0; a < opasLen; a++)
112: for (uint256 i = 0; i < opslen; i++)
128: for (uint256 a = 0; a < opasLen; a++)
134: for (uint256 i = 0; i < opslen; i++) | 34: require(module != address(0) && module != SENTINEL_MODULES, "BSA101");
49: require(module != address(0) && module != SENTINEL_MODULES, "BSA101");
68: require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), "BSA104"); | access-control | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/cryptostellar5-G.md | 2026-01-02T18:13:38.232714+00:00 | 7778d89eb8ab728fd4d3865ec4491bf41d74ba971b6c4da9431aae18c27754a1 | 2 | 0 | 453 | 2 | false | false | true | false | high | 100: for (uint256 i = 0; i < opasLen; i++)
107: for (uint256 a = 0; a < opasLen; a++)
112: for (uint256 i = 0; i < opslen; i++)
128: for (uint256 a = 0; a < opasLen; a++)
134: for (uint256 i = 0; i < opslen; i++) | unknown | 212 | // Code block 1 (unknown):
100: for (uint256 i = 0; i < opasLen; i++)
107: for (uint256 a = 0; a < opasLen; a++)
112: for (uint256 i = 0; i < opslen; i++)
128: for (uint256 a = 0; a < opasLen; a++)
134: for (uint256 i = 0; i < opslen; i++)
// Code block 2 (unknown):
34: require(module != address(0) && module != SENTIN... | 2 | false | EntryPoint.sol, ModuleManager.sol | ModuleManager.sol, EntryPoint.sol | 2 | 100: for (uint256 i = 0; i < opasLen; i++)
107: for (uint256 a = 0; a < opasLen; a++)
112: for (uint256 i = 0; i < opslen; i++)
128: for (uint256 a = 0; a < opasLen; a++)
134: for (uint256 i = 0; i < opslen; i++) | true | 34: require(module != address(0) && module != SENTINEL_MODULES, "BSA101");
49: require(module != address(0) && module != SENTINEL_MODULES, "BSA101");
68: require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), "BSA104"); | true | true | 8 | |||
c4 | 03-asymmetry | hunter_w3b G | Medium | medium | # Gas Optimization
# Summary
| Number | Optimization Details | Context |
| :----: | :---------------------------------------------------------------------------------- | :-----: |
| [G-01] | FUNCTIONS GUARANTEED TO REVERT WHEN CALLED BY NORMAL USERS CAN B... | File: /SafEth/derivatives/WstEth.sol
48 function setMaxSlippage(uint256 _slippage) external onlyOwner {
56 function withdraw(uint256 _amount) external onlyOwner { | File: /SafEth/derivatives/SfrxEth.sol
51 function setMaxSlippage(uint256 _slippage) external onlyOwner {
60 function withdraw(uint256 _amount) external onlyOwner { | access-control | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/hunter_w3b-G.md | 2026-01-02T18:19:12.004443+00:00 | 778b0772843eb02d590e6e1a3e45f32439c059884e6033e647e2e45787973a1f | 2 | 2 | 342 | 2 | false | false | true | false | high | File: /SafEth/derivatives/WstEth.sol
48 function setMaxSlippage(uint256 _slippage) external onlyOwner {
56 function withdraw(uint256 _amount) external onlyOwner { | solidity | 171 | // Code block 1 (solidity):
File: /SafEth/derivatives/WstEth.sol
48 function setMaxSlippage(uint256 _slippage) external onlyOwner {
56 function withdraw(uint256 _amount) external onlyOwner {
// Code block 2 (solidity):
File: /SafEth/derivatives/SfrxEth.sol
51 function setMaxSlippage(uint256 _slippage) ext... | 2 | false | File: /SafEth/derivatives/WstEth.sol
48 function setMaxSlippage(uint256 _slippage) external onlyOwner {
56 function withdraw(uint256 _amount) external onlyOwner {
File: /SafEth/derivatives/SfrxEth.sol
51 function setMaxSlippage(uint256 _slippage) external onlyOwner {
60 function withdraw(uint256 _amou... | WstEth.sol, SfrxEth.sol | SfrxEth.sol, WstEth.sol | 2 | File: /SafEth/derivatives/WstEth.sol
48 function setMaxSlippage(uint256 _slippage) external onlyOwner {
56 function withdraw(uint256 _amount) external onlyOwner { | true | File: /SafEth/derivatives/SfrxEth.sol
51 function setMaxSlippage(uint256 _slippage) external onlyOwner {
60 function withdraw(uint256 _amount) external onlyOwner { | true | true | 8 | ||
c4 | 02-ai-arena | 7ashraf Q | Low | low | # Quality Assurance Report
## Summary
The QA report flags important issues and offers fixes for better project performance and security. It advises against accidentally adding new fighter types and stresses the importance of checking for existing stakeholders. It also notes potential security risks like unbounded loop... | function incrementGeneration(uint8 fighterType) external returns (uint8) {
require(msg.sender == _ownerAddress);
generation[fighterType] += 1;
maxRerollsAllowed[fighterType] += 1;
return generation[fighterType];
} | function addStaker(address newStaker) external {
require(msg.sender == _ownerAddress);
hasStakerRole[newStaker] = true;
} | reentrancy | https://github.com/code-423n4/2024-02-ai-arena-findings/blob/main/data/7ashraf-Q.md | 2026-01-02T19:02:12.447536+00:00 | 77a0de6cbb896b2b0645017fa640633872446c04f985ab532fd3fb162c14d8c2 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | function incrementGeneration(uint8 fighterType) external returns (uint8) {
require(msg.sender == _ownerAddress);
generation[fighterType] += 1;
maxRerollsAllowed[fighterType] += 1;
return generation[fighterType];
} | true | function addStaker(address newStaker) external {
require(msg.sender == _ownerAddress);
hasStakerRole[newStaker] = true;
} | true | true | 5 | ||||||||
c4 | 07-amphora | 0xWaitress Q | Low | low | ### [L-1] _withdraw in USDA does not follow the check effect interaction patterns:
it's better to _burn the _susdAmount first before calling sUSD.transfer which is an external call. If sUSD becomes a token that has beforeTokenTransfer then it has the potential to be subject to re-entrency.
```solidity
function _wit... | function _withdraw(uint256 _susdAmount, address _target) internal paysInterest whenNotPaused {
if (reserveAmount == 0) revert USDA_EmptyReserve();
if (_susdAmount == 0) revert USDA_ZeroAmount();
if (_susdAmount > this.balanceOf(_msgSender())) revert USDA_InsufficientFunds();
// Account for the susd wi... | function _withdraw(uint256 _susdAmount, address _target) internal paysInterest whenNotPaused {
if (reserveAmount == 0) revert USDA_EmptyReserve();
if (_susdAmount == 0) revert USDA_ZeroAmount();
if (_susdAmount > this.balanceOf(_msgSender())) revert USDA_InsufficientFunds();
// Account for the susd wi... | access-control | https://github.com/code-423n4/2023-07-amphora-findings/blob/main/data/0xWaitress-Q.md | 2026-01-02T18:23:20.581923+00:00 | 77e9e253af4e44208534531d9dae24426f847186c05a740d5e7b9ad321c0bbe9 | 3 | 3 | 1,114 | 0 | false | false | true | false | high | function _withdraw(uint256 _susdAmount, address _target) internal paysInterest whenNotPaused {
if (reserveAmount == 0) revert USDA_EmptyReserve();
if (_susdAmount == 0) revert USDA_ZeroAmount();
if (_susdAmount > this.balanceOf(_msgSender())) revert USDA_InsufficientFunds();
// Account for the susd with... | solidity | 484 | // Code block 1 (solidity):
function _withdraw(uint256 _susdAmount, address _target) internal paysInterest whenNotPaused {
if (reserveAmount == 0) revert USDA_EmptyReserve();
if (_susdAmount == 0) revert USDA_ZeroAmount();
if (_susdAmount > this.balanceOf(_msgSender())) revert USDA_InsufficientFunds();
... | 3 | false | function _withdraw(uint256 _susdAmount, address _target) internal paysInterest whenNotPaused {
if (reserveAmount == 0) revert USDA_EmptyReserve();
if (_susdAmount == 0) revert USDA_ZeroAmount();
if (_susdAmount > this.balanceOf(_msgSender())) revert USDA_InsufficientFunds();
// Account for the susd with... | 0 | function _withdraw(uint256 _susdAmount, address _target) internal paysInterest whenNotPaused {
if (reserveAmount == 0) revert USDA_EmptyReserve();
if (_susdAmount == 0) revert USDA_ZeroAmount();
if (_susdAmount > this.balanceOf(_msgSender())) revert USDA_InsufficientFunds();
// Account for the susd wi... | true | function _withdraw(uint256 _susdAmount, address _target) internal paysInterest whenNotPaused {
if (reserveAmount == 0) revert USDA_EmptyReserve();
if (_susdAmount == 0) revert USDA_ZeroAmount();
if (_susdAmount > this.balanceOf(_msgSender())) revert USDA_InsufficientFunds();
// Account for the susd wi... | true | true | 8 | ||||
c4 | 02-ai-arena | Ignite Q | Medium | medium | # [Low-01] - Unsigned Integer Overflow
## Impact
This function calculates the total number of fighters to mint by summing up the quantities of two types of fighters specified in the `numToMint` array at line 207.
```solidity=191
function claimFighters(
uint8[2] calldata numToMint,
bytes calldata signature,
... | https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/FighterFarm.sol#L191-L222
However, if `numToMint[0]` and `numToMint[1]` are summed up to a value greater than 255, this function will revert due to overflow.
| https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/FighterFarm.sol#L207
This line will sum up `numToMint[0]` and `numToMint[1]` before converting to `uint16`. Since both `numToMint[0]` and `numToMint[1]` are of type uint8, and the maximum value for a uint8 is 255, an overflow will occur if their sum exceeds ... | overflow | https://github.com/code-423n4/2024-02-ai-arena-findings/blob/main/data/Ignite-Q.md | 2026-01-02T19:02:25.994884+00:00 | 782433c8de35482f0f0ef22edd77e5fcc43569ab419751a8dce67e2e559aa0ee | 1 | 0 | 219 | 2 | false | false | true | false | high | https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/FighterFarm.sol#L191-L222
However, if `numToMint[0]` and `numToMint[1]` are summed up to a value greater than 255, this function will revert due to overflow. | unknown | 219 | // Code block 1 (unknown):
https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/FighterFarm.sol#L191-L222
However, if `numToMint[0]` and `numToMint[1]` are summed up to a value greater than 255, this function will revert due to overflow. | 1 | false | FighterFarm.sol#L191-L222, FighterFarm.sol#L207 | FighterFarm.sol | 2 | https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/FighterFarm.sol#L191-L222
However, if `numToMint[0]` and `numToMint[1]` are summed up to a value greater than 255, this function will revert due to overflow.
| true | https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/FighterFarm.sol#L207
This line will sum up `numToMint[0]` and `numToMint[1]` before converting to `uint16`. Since both `numToMint[0]` and `numToMint[1]` are of type uint8, and the maximum value for a uint8 is 255, an overflow will occur if their sum exceeds ... | true | true | 7 | |||
c4 | 03-asymmetry | 0xepley G | Low | low | # 1.Use StETHPerToken() function in ethPerDerivative() function in WstEth.sol
## Summary
wstEth contract have another function `stEthPerToken()` that returns the price for exactly 1 ether instead of manually passing the amount in the `getStEthByWstEth(_amount)`
## Vulnerability Details
Here we can see that both the fu... | pragma solidity ^0.8.0;
contract test{
uint amount = 10;
function test1(uint _amount) public returns(uint)
{
return amount;
}
function test2() public returns(uint)
{
return amount;
}
} | upgrade | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/0xepley-G.md | 2026-01-02T18:17:40.934645+00:00 | 782e2982d750cc8cf344fd11b59483d21cd7833b8e64c2427f6d050e2dedbb52 | 1 | 1 | 229 | 3 | false | true | true | false | high | pragma solidity ^0.8.0;
contract test{
uint amount = 10;
function test1(uint _amount) public returns(uint)
{
return amount;
}
function test2() public returns(uint)
{
return amount;
}
} | solidity | 229 | // Code block 1 (solidity):
pragma solidity ^0.8.0;
contract test{
uint amount = 10;
function test1(uint _amount) public returns(uint)
{
return amount;
}
function test2() public returns(uint)
{
return amount;
}
} | 1 | false | pragma solidity ^0.8.0;
contract test{
uint amount = 10;
function test1(uint _amount) public returns(uint)
{
return amount;
}
function test2() public returns(uint)
{
return amount;
}
} | WstETH.sol#L107, WstETH.sol#L99, Reth.sol#L215 | Reth.sol, WstETH.sol | 3 | pragma solidity ^0.8.0;
contract test{
uint amount = 10;
function test1(uint _amount) public returns(uint)
{
return amount;
}
function test2() public returns(uint)
{
return amount;
}
} | true | false | false | 6 | ||||
c4 | 02-ethos | CodeFoxInc G | Gas | gas | # Gas Optimization
## Gas-01 Not necessary to reinitiate the default value in struct
In the function `addStrategy()`. It is not necessary to initiate the value as 0. So we can remove this part to save gas.
[https://github.com/code-423n4/2023-02-ethos/blob/73687f32b934c9d697b97745356cdf8a1f264955/Ethos-Vault/contract... | ### Proof of Concept
Before:
| After:
| access-control | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/CodeFoxInc-G.md | 2026-01-02T18:16:03.995547+00:00 | 78374c2426513477450be36212c0cb6b80e38fb6ed82c4c7def511e300fcc789 | 3 | 1 | 1,334 | 1 | false | false | true | false | high | - strategies[_strategy] = StrategyParams({
- activation: block.timestamp,
- feeBPS: _feeBPS,
- allocBPS: _allocBPS,
- allocated: 0,
- gains: 0,
- losses: 0,
- lastReport: block.timestamp
- });
+ strategies[_strategy].activation = block.... | diff | 490 | // Code block 1 (diff):
- strategies[_strategy] = StrategyParams({
- activation: block.timestamp,
- feeBPS: _feeBPS,
- allocBPS: _allocBPS,
- allocated: 0,
- gains: 0,
- losses: 0,
- lastReport: block.timestamp
- });
+ strategies[_strat... | 3 | true | - strategies[_strategy] = StrategyParams({
- activation: block.timestamp,
- feeBPS: _feeBPS,
- allocBPS: _allocBPS,
- allocated: 0,
- gains: 0,
- losses: 0,
- lastReport: block.timestamp
- });
+ strategies[_strategy].activation = block.... | ReaperVaultV2.sol#L158-L166 | ReaperVaultV2.sol | 1 | ### Proof of Concept
Before:
| true | After:
| true | true | 11 | ||
c4 | 07-amphora | SAQ G | Low | low | ## Summary
### Gas Optimization
no | Issue |Instances||
|-|:-|:-:|:-:|
| [G-01] | Expressions for constant values such as a call to keccak256(), should use immutable rather than constant | 4 | - |
| [G-02] | Should use arguments instead of state variable | 7 | - |
| [G-03] | State variable can be packed into fewer st... | file: /contracts/governance/GovernorCharlie.sol
19 bytes32 public constant DOMAIN_TYPEHASH =
20 keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');
23 bytes32 public constant BALLOT_TYPEHASH = keccak256('Ballot(uint256 proposalId,uint8 support)');
| File: /contracts/utils/UFragments.sol
88 keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');
89 bytes32 public constant PERMIT_TYPEHASH =
90 keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)');
| access-control | https://github.com/code-423n4/2023-07-amphora-findings/blob/main/data/SAQ-G.md | 2026-01-02T18:23:34.501074+00:00 | 78424278d789fae28ebd8256a9fa86c81b143e400d43567e96b02e6b7bc35dda | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | file: /contracts/governance/GovernorCharlie.sol
19 bytes32 public constant DOMAIN_TYPEHASH =
20 keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');
23 bytes32 public constant BALLOT_TYPEHASH = keccak256('Ballot(uint256 proposalId,uint8 support)');
| true | File: /contracts/utils/UFragments.sol
88 keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');
89 bytes32 public constant PERMIT_TYPEHASH =
90 keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)');
| true | true | 5 | ||||||||
c4 | 01-biconomy | 0xAgro Q | High | high | # QA Report
## Finding Summary
||Issue|Instances|
|-|-|-|
|[NC-01]|Long Lines (> 120 Characters)|85|
|[NC-02]|Contracts Missing `@title` NatSpec Tag|25|
|[NC-03]|`TODO` Left In Production Code|11|
|[NC-04]|Order of Functions Not Compliant With Solidity Docs|8|
|[NC-05]|Contract Layout Voids Solidity Docs|7|
|[NC-06]|Co... | 20: * In case there is a paymaster in the request (or the current deposit is high enough), this value will be zero.
24: function validateUserOp(UserOperation calldata userOp, bytes32 userOpHash, address aggregator, uint256 missingAccountFunds) | 39: * subclass should return a nonce value that is used both by _validateAndUpdateNonce, and by the external provider (to read the current nonce)
45: * subclass should return a nonce value that is used both by _validateAndUpdateNonce, and by the external provider (to read the current nonce)
57: * subclass d... | access-control | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/0xAgro-Q.md | 2026-01-02T18:12:46.777688+00:00 | 78458f5b09587741c736d4b158079e5b16dd7ece338626b278ef5f9ce39501fe | 0 | 0 | 0 | 2 | false | false | false | false | medium | 0 | 0 | false | IAccount.sol#L20, IAccount.sol#L24 | IAccount.sol | 2 | 20: * In case there is a paymaster in the request (or the current deposit is high enough), this value will be zero.
24: function validateUserOp(UserOperation calldata userOp, bytes32 userOpHash, address aggregator, uint256 missingAccountFunds) | true | 39: * subclass should return a nonce value that is used both by _validateAndUpdateNonce, and by the external provider (to read the current nonce)
45: * subclass should return a nonce value that is used both by _validateAndUpdateNonce, and by the external provider (to read the current nonce)
57: * subclass d... | true | true | 6 | ||||||
c4 | 06-lybra | j4ld1na Q | Low | low | | | Issues | Instances |
| :-- | :---------------------------------------------------------------------------------------------------------------------- | --------: |
| 01 | Return values of `approve()`... | - [contracts/lybra/pools/LybraWstETHVault.sol#L35](https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/pools/LybraWstETHVault.sol#L35)
| Recommended Mitigation Steps:
- It is recommend to use safeApprove().
- Consider using safeIncreaseAllowance instead of approve function. (Approve race condition)
## 02 - `SafeMath` is generally not needed starting with `Solidity 0.8`, since the compiler now has built in overflow checking.
_All 3(ver cuantos?) i... | overflow | https://github.com/code-423n4/2023-06-lybra-findings/blob/main/data/j4ld1na-Q.md | 2026-01-02T18:23:02.429265+00:00 | 78f58872476602ba45abbc181ecc153a601926150ba7baaea3de96409c9c05f4 | 2 | 0 | 92 | 4 | false | false | true | false | high | EUSD.approve(address(curvePool), balance); | ts | 42 | // Code block 1 (ts):
EUSD.approve(address(curvePool), balance);
// Code block 2 (ts):
lido.approve(address(collateralAsset), msg.value); | 2 | false | LybraConfigurator.sol#L302, LybraWstETHVault.sol#L35, EUSD.sol, EUSDMiningIncentives.sol#L216 | EUSDMiningIncentives.sol, LybraConfigurator.sol, LybraWstETHVault.sol, EUSD.sol | 4 | - [contracts/lybra/pools/LybraWstETHVault.sol#L35](https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/pools/LybraWstETHVault.sol#L35)
| true | Recommended Mitigation Steps:
- It is recommend to use safeApprove().
- Consider using safeIncreaseAllowance instead of approve function. (Approve race condition)
## 02 - `SafeMath` is generally not needed starting with `Solidity 0.8`, since the compiler now has built in overflow checking.
_All 3(ver cuantos?) i... | true | true | 8 | |||
c4 | 01-biconomy | Rolezn Q | Critical | critical | ## Summary<a name="Summary">
### Low Risk Issues
| |Issue|Contexts|
|-|:-|:-:|
| [LOW‑1](#LOW‑1) | Avoid using `tx.origin` | 3 |
| [LOW‑2](#LOW‑2) | Use of `ecrecover` is susceptible to signature malleability | 2 |
| [LOW‑3](#LOW‑3) | Init functions are susceptible to front-ru... | 257: address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver; | 281: address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver; | reentrancy | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/Rolezn-Q.md | 2026-01-02T18:13:17.486457+00:00 | 78f844fd9daa59bf50a78907cffb19e5fe87794d40e4145ec7c715eeb939c015 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | 257: address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver; | true | 281: address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver; | true | true | 5 | ||||||||
c4 | 11-kelp | 0xepley Analysis | Critical | critical | Upon thorough examination of the presented smart contracts constituting the decentralized finance (DeFi) project, I discerned an intricately designed system that adeptly manages assets, incorporates oracle functionalities for price feeds, and implements a secure access control mechanism. The adoption of OpenZeppelin li... | import { ERC20Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
```
2. **Security Considerations:**
- Conducting a meticulous review of access control mechanisms, leveraging OpenZeppelin's AccessControlUpgradeable for fine-grained control over contract access.
- Rec... | 2. **Utilization of OpenZeppelin Libraries:**
- Leveraging OpenZeppelin libraries, such as ERC20Upgradeable and AccessControlUpgradeable, demonstrates a commitment to industry best practices and significantly enhances the security of the codebase.
| access-control | https://github.com/code-423n4/2023-11-kelp-findings/blob/main/data/0xepley-Analysis.md | 2026-01-02T18:27:14.120026+00:00 | 79270a656801681fefe2f4e353eda2d6dbae2bf09a9eec4a3043f42fbe9cd8a9 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | import { ERC20Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
```
2. **Security Considerations:**
- Conducting a meticulous review of access control mechanisms, leveraging OpenZeppelin's AccessControlUpgradeable for fine-grained control over contract access.
- Rec... | true | 2. **Utilization of OpenZeppelin Libraries:**
- Leveraging OpenZeppelin libraries, such as ERC20Upgradeable and AccessControlUpgradeable, demonstrates a commitment to industry best practices and significantly enhances the security of the codebase.
| true | true | 5 | ||||||||
c4 | 07-amphora | jeffy G | High | high | ### unchecked arithmetics
in which cases where arithmetic operations can’t overflow (mostly incrementing loop counters after comparing them with array lengths in loops), we can mark then unchecked to save gas
there were 5 found instances of this optimizations:
```jsx
868:for (uint192 _i; _i < enabledTokens.length; ... | [[868](https://github.com/code-423n4/2023-07-amphora/blob/daae020331404647c661ab534d20093c875483e1/core/solidity/contracts/core/VaultController.sol#L868),[896](https://github.com/code-423n4/2023-07-amphora/blob/daae020331404647c661ab534d20093c875483e1/core/solidity/contracts/core/VaultController.sol#L896),[259](https:/... | ### caching variables on the stack
- array.length
mostly array lengths in for loops, instead of reading them using `array.length` every time, one could declare a `uint` variable to the stack, and then set it to the array length.
the following instances were found:
| access-control | https://github.com/code-423n4/2023-07-amphora-findings/blob/main/data/jeffy-G.md | 2026-01-02T18:23:50.609414+00:00 | 792c6a7f287148f853ddf139a42210a75e48b30f564f2cfd708f0a0fe799403c | 1 | 0 | 294 | 6 | false | false | true | false | high | 868:for (uint192 _i; _i < enabledTokens.length; ++_i)
896:for (uint192 _i; _i < enabledTokens.length; ++_i)
259:for (uint256 _i = 0; _i < _proposal.targets.length; _i++)
313:for (uint256 _i = 0; _i < _proposal.targets.length; _i++)
382:for (uint256 _i = 0; _i < _proposal.targets.length; _i++) | jsx | 294 | // Code block 1 (jsx):
868:for (uint192 _i; _i < enabledTokens.length; ++_i)
896:for (uint192 _i; _i < enabledTokens.length; ++_i)
259:for (uint256 _i = 0; _i < _proposal.targets.length; _i++)
313:for (uint256 _i = 0; _i < _proposal.targets.length; _i++)
382:for (uint256 _i = 0; _i < _proposal.targets.length; _i++) | 1 | false | VaultController.sol#L868, VaultController.sol#L896, GovernorCharlie.sol#L259, GovernorCharlie.sol#L313, GovernorCharlie.sol#L382-L1, GovernanceStructs.sol#L4-L8 | GovernorCharlie.sol, VaultController.sol, GovernanceStructs.sol | 6 | [[868](https://github.com/code-423n4/2023-07-amphora/blob/daae020331404647c661ab534d20093c875483e1/core/solidity/contracts/core/VaultController.sol#L868),[896](https://github.com/code-423n4/2023-07-amphora/blob/daae020331404647c661ab534d20093c875483e1/core/solidity/contracts/core/VaultController.sol#L896),[259](https:/... | true | ### caching variables on the stack
- array.length
mostly array lengths in for loops, instead of reading them using `array.length` every time, one could declare a `uint` variable to the stack, and then set it to the array length.
the following instances were found:
| true | true | 7 | |||
c4 | 01-salty | falconhoof Analysis | Critical | critical | # LOW
## L-01 typo in Pools::removeLiquidity()
Link: https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/pools/Pools.sol#L170-L200
There is a typo in `removeLiquidity()` which allows the `reserve1` token (tokenB) to drop below the `DUST` value which can have negative consequ... | function removeLiquidity( IERC20 tokenA, IERC20 tokenB, uint256 liquidityToRemove, uint256 minReclaimedA, uint256 minReclaimedB, uint256 totalLiquidity ) external nonReentrant returns (uint256 reclaimedA, uint256 reclaimedB)
{
// SOME CODE
>>> require((reserves.reserve0 >= PoolUtils.DUST) && (reserves.r... | function test_Reserve1BelowDUST() public
{
vm.startPrank(address(collateralAndLiquidity));
IERC20 tokenA = new TestERC20("newToken", 18);
IERC20 tokenB = new TestERC20("newToken", 18);
vm.stopPrank();
vm.prank(address(dao));
poolsConfig.whitelistPool( pools, tokenA, tokenB);
uint256 transf... | reentrancy | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/falconhoof-Analysis.md | 2026-01-02T19:01:40.362291+00:00 | 792fc3afa909765ff6932fa84efa0ad5b885a5f9936966274d01c00f45c17e67 | 1 | 0 | 422 | 1 | false | false | true | false | high | function removeLiquidity( IERC20 tokenA, IERC20 tokenB, uint256 liquidityToRemove, uint256 minReclaimedA, uint256 minReclaimedB, uint256 totalLiquidity ) external nonReentrant returns (uint256 reclaimedA, uint256 reclaimedB)
{
// SOME CODE
>>> require((reserves.reserve0 >= PoolUtils.DUST) && (reserves.re... | unknown | 422 | // Code block 1 (unknown):
function removeLiquidity( IERC20 tokenA, IERC20 tokenB, uint256 liquidityToRemove, uint256 minReclaimedA, uint256 minReclaimedB, uint256 totalLiquidity ) external nonReentrant returns (uint256 reclaimedA, uint256 reclaimedB)
{
// SOME CODE
>>> require((reserves.reserve0 >= Pool... | 1 | false | Pools.sol#L170-L200 | Pools.sol | 1 | function removeLiquidity( IERC20 tokenA, IERC20 tokenB, uint256 liquidityToRemove, uint256 minReclaimedA, uint256 minReclaimedB, uint256 totalLiquidity ) external nonReentrant returns (uint256 reclaimedA, uint256 reclaimedB)
{
// SOME CODE
>>> require((reserves.reserve0 >= PoolUtils.DUST) && (reserves.r... | true | function test_Reserve1BelowDUST() public
{
vm.startPrank(address(collateralAndLiquidity));
IERC20 tokenA = new TestERC20("newToken", 18);
IERC20 tokenB = new TestERC20("newToken", 18);
vm.stopPrank();
vm.prank(address(dao));
poolsConfig.whitelistPool( pools, tokenA, tokenB);
uint256 transf... | true | true | 7 | |||
c4 | 01-biconomy | Awesome Q | Low | low | # 1. Improve the Readability by following modularity principles
To make your Solidity code more modern and readable, it is recommended to update your import statements to only include the specific contracts or objects that you need.
This practice, known as modular programming, helps to keep the code cleaner and more ... | import {contract1, contract2} from "filename.sol"; | Line 52: delete modules[module]; | dos | https://github.com/code-423n4/2023-01-biconomy-findings/blob/main/data/Awesome-Q.md | 2026-01-02T18:12:54.461241+00:00 | 794779527930289a805c8690760fe6c4b5fed04649d2d2d9d956ceb5a63a6927 | 2 | 2 | 85 | 3 | false | false | true | false | high | import {contract1, contract2} from "filename.sol"; | solidity | 50 | // Code block 1 (solidity):
import {contract1, contract2} from "filename.sol";
// Code block 2 (solidity):
Line 52: delete modules[module]; | 2 | false | import {contract1, contract2} from "filename.sol";
Line 52: delete modules[module]; | ModuleManager.sol#L4-L6, ModuleManager.sol#L52, EntryPoint.sol#L255 | ModuleManager.sol, EntryPoint.sol | 3 | import {contract1, contract2} from "filename.sol"; | true | Line 52: delete modules[module]; | true | true | 8 | ||
c4 | 03-asymmetry | Wander Q | Low | low | ## 1. Reduce repetition of code
https://github.com/code-423n4/2023-03-asymmetry/blob/44b5cd94ebedc187a08884a7f685e950e987261c/contracts/SafEth/SafEth.sol#L170-L173
https://github.com/code-423n4/2023-03-asymmetry/blob/44b5cd94ebedc187a08884a7f685e950e987261c/contracts/SafEth/SafEth.sol#L190-L193
The mentioned code fragm... | function recalculateTotalWeight() private {
uint256 localTotalWeight = 0;
for (uint256 i; i < derivativeCount; ++i)
localTotalWeight += weights[i];
totalWeight = localTotalWeight;
} | function addDerivative(
address _contractAddress,
uint256 _weight
) external onlyOwner {
derivatives[derivativeCount] = IDerivative(_contractAddress);
weights[derivativeCount] = _weight;
derivativeCount++;
recalculateTotalWeight(); // <<--------- Call the function --... | access-control | https://github.com/code-423n4/2023-03-asymmetry-findings/blob/main/data/Wander-Q.md | 2026-01-02T18:18:40.064282+00:00 | 796a3e04b9fdd4e4211c78524fd2ff80b875031d80eb6beaa97883f62bf134f0 | 3 | 0 | 934 | 2 | false | false | true | false | high | function recalculateTotalWeight() private {
uint256 localTotalWeight = 0;
for (uint256 i; i < derivativeCount; ++i)
localTotalWeight += weights[i];
totalWeight = localTotalWeight;
} | unknown | 217 | // Code block 1 (unknown):
function recalculateTotalWeight() private {
uint256 localTotalWeight = 0;
for (uint256 i; i < derivativeCount; ++i)
localTotalWeight += weights[i];
totalWeight = localTotalWeight;
}
// Code block 2 (unknown):
function addDerivative(
address _contra... | 3 | false | SafEth.sol#L170-L173, SafEth.sol#L190-L193 | SafEth.sol | 2 | function recalculateTotalWeight() private {
uint256 localTotalWeight = 0;
for (uint256 i; i < derivativeCount; ++i)
localTotalWeight += weights[i];
totalWeight = localTotalWeight;
} | true | function addDerivative(
address _contractAddress,
uint256 _weight
) external onlyOwner {
derivatives[derivativeCount] = IDerivative(_contractAddress);
weights[derivativeCount] = _weight;
derivativeCount++;
recalculateTotalWeight(); // <<--------- Call the function --... | true | true | 9 | |||
c4 | 01-salty | lsaudit Q | High | high | # [1] Percentage of rewards sent to the initial team is hardcoded in the contract, thus it's not possible to change it in the future
[File: DAO.sol](https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/dao/DAO.sol#L340)
```
// Send 10% of the rewards to the initial team
uin... | // Send 10% of the rewards to the initial team
uint256 amountToSendToTeam = claimedSALT / 10; | require( msg.sender == address(bootstrapBallot), "InitialDistribution.distributionApproved can only be called from the BootstrapBallot contract" ); // @audit: 4 whitespaces + tab
require( salt.balanceOf(address(this)) == 100 * MILLION_ETHER, "SALT has already been sent from the contract" ); // // @audit: 2 tabs | access-control | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/lsaudit-Q.md | 2026-01-02T19:01:52.068269+00:00 | 796ab229d1920204ef53c6cee9fddef49b8eed01d8036cbdba7e35fc3228cfdd | 3 | 0 | 506 | 4 | false | false | true | false | high | // Send 10% of the rewards to the initial team
uint256 amountToSendToTeam = claimedSALT / 10; | unknown | 95 | // Code block 1 (unknown):
// Send 10% of the rewards to the initial team
uint256 amountToSendToTeam = claimedSALT / 10;
// Code block 2 (unknown):
require( msg.sender == address(bootstrapBallot), "InitialDistribution.distributionApproved can only be called from the BootstrapBallot contract" ); // @audit: 4 whitesp... | 3 | false | DAO.sol#L340, InitialDistribution.sol#L52-L53, USDS.sol#L22-L25, CollateralAndLiquidity.sol#L30-L36 | USDS.sol, CollateralAndLiquidity.sol, InitialDistribution.sol, DAO.sol | 4 | // Send 10% of the rewards to the initial team
uint256 amountToSendToTeam = claimedSALT / 10; | true | require( msg.sender == address(bootstrapBallot), "InitialDistribution.distributionApproved can only be called from the BootstrapBallot contract" ); // @audit: 4 whitespaces + tab
require( salt.balanceOf(address(this)) == 100 * MILLION_ETHER, "SALT has already been sent from the contract" ); // // @audit: 2 tabs | true | true | 9 | |||
c4 | 01-salty | Topmark Q | High | high | ### Report 1:
#### Missing Validation check for PoolIds in PoolStats contract.
When a pool Id is invalid it returns INVALID_POOL_ID which represents type(uint64).max, however this return value was not checked at L88-L91 in the updateArbitrageIndicies() function. This would allow invalid pool during Arbitrage and could... | function _poolIndex( IERC20 tokenA, IERC20 tokenB, bytes32[] memory poolIDs ) internal pure returns (uint64 index)
{
bytes32 poolID = PoolUtils._poolID( tokenA, tokenB );
for( uint256 i = 0; i < poolIDs.length; i++ )
{
if (poolID == poolIDs[i])
return uint64(i);
}
>>> return INVALID_POOL_ID;
} | function updateArbitrageIndicies() public
{
bytes32[] memory poolIDs = poolsConfig.whitelistedPools();
for( uint256 i = 0; i < poolIDs.length; i++ )
{
bytes32 poolID = poolIDs[i];
(IERC20 arbToken2, IERC20 arbToken3) = poolsConfig.underlyingTokenPair(poolID);
// The middle two tokens can never be WETH in a val... | upgrade | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/Topmark-Q.md | 2026-01-02T19:01:31.356426+00:00 | 79b4411b8a9afc2c60e2ab8bc05516984b5c77df2dcdd578970910d0be8b5252 | 2 | 2 | 1,102 | 2 | false | false | true | false | high | function _poolIndex( IERC20 tokenA, IERC20 tokenB, bytes32[] memory poolIDs ) internal pure returns (uint64 index)
{
bytes32 poolID = PoolUtils._poolID( tokenA, tokenB );
for( uint256 i = 0; i < poolIDs.length; i++ )
{
if (poolID == poolIDs[i])
return uint64(i);
}
>>> return INVALID_POOL_ID;
} | solidity | 309 | // Code block 1 (solidity):
function _poolIndex( IERC20 tokenA, IERC20 tokenB, bytes32[] memory poolIDs ) internal pure returns (uint64 index)
{
bytes32 poolID = PoolUtils._poolID( tokenA, tokenB );
for( uint256 i = 0; i < poolIDs.length; i++ )
{
if (poolID == poolIDs[i])
return uint64(i);
}
>>> return IN... | 2 | false | function _poolIndex( IERC20 tokenA, IERC20 tokenB, bytes32[] memory poolIDs ) internal pure returns (uint64 index)
{
bytes32 poolID = PoolUtils._poolID( tokenA, tokenB );
for( uint256 i = 0; i < poolIDs.length; i++ )
{
if (poolID == poolIDs[i])
return uint64(i);
}
>>> return INVALID_POOL_ID;
}
function ... | PoolStats.sol#L89-L91, PoolStats.sol#L71 | PoolStats.sol | 2 | function _poolIndex( IERC20 tokenA, IERC20 tokenB, bytes32[] memory poolIDs ) internal pure returns (uint64 index)
{
bytes32 poolID = PoolUtils._poolID( tokenA, tokenB );
for( uint256 i = 0; i < poolIDs.length; i++ )
{
if (poolID == poolIDs[i])
return uint64(i);
}
>>> return INVALID_POOL_ID;
} | true | function updateArbitrageIndicies() public
{
bytes32[] memory poolIDs = poolsConfig.whitelistedPools();
for( uint256 i = 0; i < poolIDs.length; i++ )
{
bytes32 poolID = poolIDs[i];
(IERC20 arbToken2, IERC20 arbToken3) = poolsConfig.underlyingTokenPair(poolID);
// The middle two tokens can never be WETH in a val... | true | true | 8 | ||
c4 | 06-lybra | koo G | Low | low | From the implementation of EUSD.transferFrom.
https://github.com/code-423n4/2023-06-lybra/blob/7b73ef2fbb542b569e182d9abf79be643ca883ee/contracts/lybra/token/EUSD.sol#L226
```solidity
function transferFrom(address from, address to, uint256 amount) public returns (bool) {
address spender = _msgSender();
... | function transferFrom(address from, address to, uint256 amount) public returns (bool) {
address spender = _msgSender();
if (!configurator.mintVault(spender)) {
_spendAllowance(from, spender, amount);
}
_transfer(from, to, amount);
return true;
} | upgrade | https://github.com/code-423n4/2023-06-lybra-findings/blob/main/data/koo-G.md | 2026-01-02T18:23:04.209972+00:00 | 79ddad3937cbe15dae242aa118226b69a20d32e3afb926036d701458440468e8 | 1 | 1 | 301 | 6 | false | true | true | false | high | function transferFrom(address from, address to, uint256 amount) public returns (bool) {
address spender = _msgSender();
if (!configurator.mintVault(spender)) {
_spendAllowance(from, spender, amount);
}
_transfer(from, to, amount);
return true;
} | solidity | 301 | // Code block 1 (solidity):
function transferFrom(address from, address to, uint256 amount) public returns (bool) {
address spender = _msgSender();
if (!configurator.mintVault(spender)) {
_spendAllowance(from, spender, amount);
}
_transfer(from, to, amount);
return tr... | 1 | false | function transferFrom(address from, address to, uint256 amount) public returns (bool) {
address spender = _msgSender();
if (!configurator.mintVault(spender)) {
_spendAllowance(from, spender, amount);
}
_transfer(from, to, amount);
return true;
} | EUSD.sol#L226, EUSDMiningIncentives.sol#L215, LybraStETHVault.sol#L70, LybraStETHVault.sol#L85, PeUSDMainnetStableVision.sol#L82, PeUSDMainnetStableVision.sol#L133 | EUSDMiningIncentives.sol, LybraStETHVault.sol, EUSD.sol, PeUSDMainnetStableVision.sol | 6 | function transferFrom(address from, address to, uint256 amount) public returns (bool) {
address spender = _msgSender();
if (!configurator.mintVault(spender)) {
_spendAllowance(from, spender, amount);
}
_transfer(from, to, amount);
return true;
} | true | false | false | 5.67 | ||||
c4 | 01-ondo | Diana G | Medium | medium |
## G-01 Increments can be unchecked
In Solidity 0.8+, there’s a default overflow check on unsigned integers. It’s possible to uncheck this in for-loops and save some gas at each iteration, but at the cost of some code readability, as this uncheck cannot be made inline
Prior to Solidity 0.8.0, arithmetic operations w... | File: contracts/cash/CashManager.sol
750: for (uint256 i = 0; i < size; ++i) {
786: for (uint256 i = 0; i < size; ++i) {
933: for (uint256 i = 0; i < size; ++i) {
961: for (uint256 i = 0; i < exCallData.length; ++i) { | File: contracts/cash/factory/CashFactory.sol
127: for (uint256 i = 0; i < exCallData.length; ++i) { | access-control | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/Diana-G.md | 2026-01-02T18:14:35.124808+00:00 | 79ef42f06a47669cb078d8cf52fea7157dc118f7da59c375ab40cb7fe46dbbf5 | 5 | 0 | 673 | 5 | false | false | true | false | high | File: contracts/cash/CashManager.sol
750: for (uint256 i = 0; i < size; ++i) {
786: for (uint256 i = 0; i < size; ++i) {
933: for (uint256 i = 0; i < size; ++i) {
961: for (uint256 i = 0; i < exCallData.length; ++i) { | unknown | 218 | // Code block 1 (unknown):
File: contracts/cash/CashManager.sol
750: for (uint256 i = 0; i < size; ++i) {
786: for (uint256 i = 0; i < size; ++i) {
933: for (uint256 i = 0; i < size; ++i) {
961: for (uint256 i = 0; i < exCallData.length; ++i) {
// Code block 2 (unknown):
File: contracts/cash/factory/CashFactory.sol
... | 5 | false | CashManager.sol, CashFactory.sol, CashKYCSenderFactory.sol, CashKYCSenderReceiverFactory.sol, KYCRegistry.sol | CashManager.sol, CashKYCSenderFactory.sol, CashFactory.sol, KYCRegistry.sol, CashKYCSenderReceiverFactory.sol | 5 | File: contracts/cash/CashManager.sol
750: for (uint256 i = 0; i < size; ++i) {
786: for (uint256 i = 0; i < size; ++i) {
933: for (uint256 i = 0; i < size; ++i) {
961: for (uint256 i = 0; i < exCallData.length; ++i) { | true | File: contracts/cash/factory/CashFactory.sol
127: for (uint256 i = 0; i < exCallData.length; ++i) { | true | true | 11 | |||
c4 | 04-caviar | Sathish9098 Q | Critical | critical | ## LOW FINDINGS
| Low Count | Issues | Instances |
| -------- | --------| -------- |
| [L-1] | Lack of address(0) check when assigning address to state variables | 4 |
| [L-2] | A single point of failure | 8 |
| [L-3] | Front running attacks by the onlyOwner | 8 |
| [L-4] | Prevent division by 0 | 5 |
| [L-... | FILE: 2023-04-caviar/src/EthRouter.sol
constructor(address _royaltyRegistry) {
royaltyRegistry = _royaltyRegistry;
} | FILE: 2023-04-caviar/src/PrivatePool.sol
143: constructor(address _factory, address _royaltyRegistry, address _stolenNftOracle) {
144: factory = payable(_factory);
145: royaltyRegistry = _royaltyRegistry;
146: stolenNftOracle = _stolenNftOracle;
147: }
| access-control | https://github.com/code-423n4/2023-04-caviar-findings/blob/main/data/Sathish9098-Q.md | 2026-01-02T18:20:06.615827+00:00 | 7a03e96bbd1d66f5598ea5e430eaf59dce4843a787925bf68266e06536194453 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | FILE: 2023-04-caviar/src/EthRouter.sol
constructor(address _royaltyRegistry) {
royaltyRegistry = _royaltyRegistry;
} | true | FILE: 2023-04-caviar/src/PrivatePool.sol
143: constructor(address _factory, address _royaltyRegistry, address _stolenNftOracle) {
144: factory = payable(_factory);
145: royaltyRegistry = _royaltyRegistry;
146: stolenNftOracle = _stolenNftOracle;
147: }
| true | true | 5 | ||||||||
c4 | 06-lybra | Pechenite G | Low | low | ### [G‑01] Use calldata instead of memory for arrays
**Summary**
You can indeed use `calldata` instead of `memory` for the `_pools` array argument, because the function is marked as `external`.
Using `calldata` instead of `memory` can reduce the gas cost of this function, particularly for larger arrays.
**There is 1 i... | File: contracts/lybra/miner/EUSDMiningIncentives.sol
function setPools(address[] memory _pools) external onlyOwner {
for (uint i = 0; i < _pools.length; i++) {
require(configurator.mintVault(_pools[i]), "NOT_VAULT");
}
pools = _pools;
}
| File: contracts/lybra/configuration/LybraConfigurator.sol
modifier onlyRole(bytes32 role) {
GovernanceTimelock.checkOnlyRole(role, msg.sender);
_;
}
// https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/configuration/LybraConfigurator.sol#L85-L88 | access-control | https://github.com/code-423n4/2023-06-lybra-findings/blob/main/data/Pechenite-G.md | 2026-01-02T18:22:34.616640+00:00 | 7a4b97f33e435e12526d7058efdce8b86f8bcc438c4291e296f07fb1f7826174 | 2 | 2 | 573 | 3 | false | false | true | false | high | File: contracts/lybra/miner/EUSDMiningIncentives.sol
function setPools(address[] memory _pools) external onlyOwner {
for (uint i = 0; i < _pools.length; i++) {
require(configurator.mintVault(_pools[i]), "NOT_VAULT");
}
pools = _pools;
} | solidity | 281 | // Code block 1 (solidity):
File: contracts/lybra/miner/EUSDMiningIncentives.sol
function setPools(address[] memory _pools) external onlyOwner {
for (uint i = 0; i < _pools.length; i++) {
require(configurator.mintVault(_pools[i]), "NOT_VAULT");
}
pools = _pools;
}
// Code b... | 2 | false | File: contracts/lybra/miner/EUSDMiningIncentives.sol
function setPools(address[] memory _pools) external onlyOwner {
for (uint i = 0; i < _pools.length; i++) {
require(configurator.mintVault(_pools[i]), "NOT_VAULT");
}
pools = _pools;
}
File: contracts/lybra/configuration/L... | EUSDMiningIncentives.sol#L93-L98, LybraConfigurator.sol#L85-L88, LybraConfigurator.sol | EUSDMiningIncentives.sol, LybraConfigurator.sol | 3 | File: contracts/lybra/miner/EUSDMiningIncentives.sol
function setPools(address[] memory _pools) external onlyOwner {
for (uint i = 0; i < _pools.length; i++) {
require(configurator.mintVault(_pools[i]), "NOT_VAULT");
}
pools = _pools;
}
| true | File: contracts/lybra/configuration/LybraConfigurator.sol
modifier onlyRole(bytes32 role) {
GovernanceTimelock.checkOnlyRole(role, msg.sender);
_;
}
// https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/configuration/LybraConfigurator.sol#L85-L88 | true | true | 8 | ||
c4 | 02-ai-arena | Aamir Q | Critical | critical | # Summary
| Severity | Issue | Instance |
| ------------------------ | ------------------------------------------------------------------------------------------------... | File: 2024-02-ai-arena/src/FighterFarm.sol
243 require(
244 mintpassIdsToBurn.length == mintPassDnas.length &&
245 mintPassDnas.length == fighterTypes.length &&
246 fighterTypes.length == modelHashes.length &&
248 modelHashes.length == modelTypes.length
249 ); | File: 2024-02-ai-arena/src/FighterFarm.sol
function _createFighterBase(
uint256 dna,
uint8 fighterType
)
private
view
returns (uint256, uint256, uint256)
{
@> uint256 element = dna % numElements[generation[fighterType]];
@> uint256 weight = dna % 31 + 6... | access-control | https://github.com/code-423n4/2024-02-ai-arena-findings/blob/main/data/Aamir-Q.md | 2026-01-02T19:02:13.362065+00:00 | 7a68fdebfaa534af6364c88ff47b03570f0ef586a78c4d991f69ec8223feaa24 | 0 | 0 | 0 | 0 | false | false | false | false | medium | 0 | 0 | false | 0 | File: 2024-02-ai-arena/src/FighterFarm.sol
243 require(
244 mintpassIdsToBurn.length == mintPassDnas.length &&
245 mintPassDnas.length == fighterTypes.length &&
246 fighterTypes.length == modelHashes.length &&
248 modelHashes.length == modelTypes.length
249 ); | true | File: 2024-02-ai-arena/src/FighterFarm.sol
function _createFighterBase(
uint256 dna,
uint8 fighterType
)
private
view
returns (uint256, uint256, uint256)
{
@> uint256 element = dna % numElements[generation[fighterType]];
@> uint256 weight = dna % 31 + 6... | true | true | 5 | ||||||||
c4 | 02-ethos | Dinesh11G G | Low | low | ### 1st BUG
Don't Initialize Variables with Default Value
#### Impact
Issue Information:
Uninitialized variables are assigned with the types default value.
Explicitly initializing a variable with it's default value costs unnecessary gas.
Example
🤦 Bad:
uint256 x = 0;
bool y = false;
🚀 Good:
uint256 x;
bool y;
... | 2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::72 => for (uint idx = 0; idx < _startIdx; ++idx) {
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::78 => for (uint idx = 0; idx < _count; ++idx) {
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::101 => for (uint idx = 0; idx < _startIdx; ++idx) ... | 2023-02-ethos/Ethos-Core/contracts/ActivePool.sol::106 => uint256 numCollaterals = collaterals.length;
2023-02-ethos/Ethos-Core/contracts/ActivePool.sol::107 => require(numCollaterals == _erc4626vaults.length, "Vaults array length must match number of collaterals");
2023-02-ethos/Ethos-Core/contracts/CollateralConfig.s... | reentrancy | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/Dinesh11G-G.md | 2026-01-02T18:16:10.731086+00:00 | 7a69cecf617130284e19bc84ffe76907d86129c138c52e482953239b309c6cf0 | 1 | 0 | 531 | 0 | false | false | true | false | high | 2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::72 => for (uint idx = 0; idx < _startIdx; ++idx) {
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::78 => for (uint idx = 0; idx < _count; ++idx) {
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::101 => for (uint idx = 0; idx < _startIdx; ++idx) ... | unknown | 531 | // Code block 1 (unknown):
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::72 => for (uint idx = 0; idx < _startIdx; ++idx) {
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::78 => for (uint idx = 0; idx < _count; ++idx) {
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::101 => for (uint idx = ... | 1 | false | 0 | 2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::72 => for (uint idx = 0; idx < _startIdx; ++idx) {
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::78 => for (uint idx = 0; idx < _count; ++idx) {
2023-02-ethos/Ethos-Core/contracts/MultiTroveGetter.sol::101 => for (uint idx = 0; idx < _startIdx; ++idx) ... | true | 2023-02-ethos/Ethos-Core/contracts/ActivePool.sol::106 => uint256 numCollaterals = collaterals.length;
2023-02-ethos/Ethos-Core/contracts/ActivePool.sol::107 => require(numCollaterals == _erc4626vaults.length, "Vaults array length must match number of collaterals");
2023-02-ethos/Ethos-Core/contracts/CollateralConfig.s... | true | true | 6 | |||||
c4 | 01-ondo | nicobevi Q | High | high | # [QA] - OpenZeppelin's library used is too old. An upgrade is recommended.
The OZ's contracts library used on `contracts/cash` is the version `v4.4.1`. However, the newest version available is `v4.7.0`. The recommendation is to upgrade the library and install it through forge as an external library instead of copy th... | 2. Remove the files from `/contracts/cash/external/openzeppelin`
3. Add this line to your `remappings.txt` file: | 4. Change all the references to the installed version. (Fix the breaking changes that could popup with this change) | access-control | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/nicobevi-Q.md | 2026-01-02T18:15:23.285386+00:00 | 7ab942723e6c3baea0cd9c9dd63c6529590576b007c8696fea8a3b675d4d437a | 3 | 1 | 604 | 1 | false | false | true | false | high | forge install Openzeppelin/openzeppelin-contracts --no-commit
forge install Openzeppelin/openzeppelin-contracts-upgradeable --no-commit | sh | 137 | // Code block 1 (sh):
forge install Openzeppelin/openzeppelin-contracts --no-commit
forge install Openzeppelin/openzeppelin-contracts-upgradeable --no-commit
// Code block 2 (txt):
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgrade... | 3 | true | - import "contracts/cash/external/openzeppelin/contracts/...";
+ import "@openzeppelin/contracts/...";
- import "contracts/cash/external/openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol";
+ import "@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol"; | Proxy.sol#L25 | Proxy.sol | 1 | 2. Remove the files from `/contracts/cash/external/openzeppelin`
3. Add this line to your `remappings.txt` file: | true | 4. Change all the references to the installed version. (Fix the breaking changes that could popup with this change) | true | true | 11 | ||
c4 | 04-caviar | GT_Blockchain Q | High | high | --- PrivatePool.sol ---
A. Fee structure is inconsistent for buys/changes. In `buy()` and `sell()` function protocolFee is based on a percentage of the input/output amount but in `change()` the fee is based on the pool fee not the input amount. It should be based on the input/output amount for consistency
B. Several ... | try ERC20(baseToken).decimals() returns (uint8 decimals) {
exponent = 36 - decimals;
} catch {
// handle the exception here, e.g. set a default value
exponent = 18; | reentrancy | https://github.com/code-423n4/2023-04-caviar-findings/blob/main/data/GT_Blockchain-Q.md | 2026-01-02T18:19:40.787253+00:00 | 7ac9264762ef2447773e7babddafc56f251efa6bd88ef41ad794d94e23044bfb | 1 | 0 | 182 | 0 | false | true | true | false | medium | try ERC20(baseToken).decimals() returns (uint8 decimals) {
exponent = 36 - decimals;
} catch {
// handle the exception here, e.g. set a default value
exponent = 18; | unknown | 182 | // Code block 1 (unknown):
try ERC20(baseToken).decimals() returns (uint8 decimals) {
exponent = 36 - decimals;
} catch {
// handle the exception here, e.g. set a default value
exponent = 18; | 1 | false | 0 | try ERC20(baseToken).decimals() returns (uint8 decimals) {
exponent = 36 - decimals;
} catch {
// handle the exception here, e.g. set a default value
exponent = 18; | true | false | false | 4.97 | |||||||
c4 | 02-ethos | Morraez G | Medium | medium | # Gas Optimizations - (Total Optimizations 326)
## Mark storage variables as `immutable` if they never change after contract initialization.
State variables can be declared as constant or immutable. In both cases, the variables cannot be modified after the contract has been constructed. For constant variables, the va... | contract GasTest is DSTest {
Contract0 c0;
Contract1 c1;
Contract2 c2;
function setUp() public {
c0 = new Contract0();
c1 = new Contract1();
c2 = new Contract2();
}
function testGas() public view {
c0.addValue();
c1.addImmutableValue();
c2.addConstantValue();
}
}
contract Contract0 {
uint256 val;... | ╭────────────────────┬─────────────────┬──────┬────────┬──────┬─────────╮
│ Contract0 contract ┆ ┆ ┆ ┆ ┆ │
╞════════════════════╪═════════════════╪══════╪════════╪══════╪═════════╡
│ Deployment Cost ┆ Deployment Size ┆ ┆ ┆ ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌... | access-control | https://github.com/code-423n4/2023-02-ethos-findings/blob/main/data/Morraez-G.md | 2026-01-02T18:16:22.978659+00:00 | 7af87f20be9fb58bfc4cead043f363935b2d69455302ad5ea592690ca944dc79 | 1 | 0 | 714 | 0 | false | false | true | false | high | contract GasTest is DSTest {
Contract0 c0;
Contract1 c1;
Contract2 c2;
function setUp() public {
c0 = new Contract0();
c1 = new Contract1();
c2 = new Contract2();
}
function testGas() public view {
c0.addValue();
c1.addImmutableValue();
c2.addConstantValue();
}
}
contract Contract0 {
uint256 val;... | js | 714 | // Code block 1 (js):
contract GasTest is DSTest {
Contract0 c0;
Contract1 c1;
Contract2 c2;
function setUp() public {
c0 = new Contract0();
c1 = new Contract1();
c2 = new Contract2();
}
function testGas() public view {
c0.addValue();
c1.addImmutableValue();
c2.addConstantValue();
}
}
contract Co... | 1 | false | 0 | contract GasTest is DSTest {
Contract0 c0;
Contract1 c1;
Contract2 c2;
function setUp() public {
c0 = new Contract0();
c1 = new Contract1();
c2 = new Contract2();
}
function testGas() public view {
c0.addValue();
c1.addImmutableValue();
c2.addConstantValue();
}
}
contract Contract0 {
uint256 val;... | true | ╭────────────────────┬─────────────────┬──────┬────────┬──────┬─────────╮
│ Contract0 contract ┆ ┆ ┆ ┆ ┆ │
╞════════════════════╪═════════════════╪══════╪════════╪══════╪═════════╡
│ Deployment Cost ┆ Deployment Size ┆ ┆ ┆ ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌... | true | true | 6 | |||||
c4 | 05-ajna | j4ld1na Q | Medium | medium | | | Issues | Instances |
| :-- | :--------------------------------------------------------------------------------------------------- | --------: |
| 01 | Constants in comparisons should appear on the left side. ... | But, the following is just as valid:
| There are 28 instances:
[ajna-grants/src/grants/GrantFund.sol#L39-L40](https://github.com/code-423n4/2023-05-ajna/blob/main/ajna-grants/src/grants/GrantFund.sol#L39-L40)
| other | https://github.com/code-423n4/2023-05-ajna-findings/blob/main/data/j4ld1na-Q.md | 2026-01-02T18:21:31.792188+00:00 | 7b0f4d443d720b8b8b9ff9f10008e0661d4b9d65d739e6f7d763f32628b6543f | 5 | 0 | 405 | 3 | false | false | true | false | high | if (currentValue == 5)
{
// do work
} | java | 41 | // Code block 1 (java):
if (currentValue == 5)
{
// do work
}
// Code block 2 (java):
if (5 == currentValue)
{
// do work
}
// Code block 3 (java):
if (_standardFundingProposals[proposalId_].proposalId != 0) return FundingMechanism.Standard;
else if (_extraordinaryFundingProposals[proposalId_].proposa... | 5 | false | GrantFund.sol#L39-L40, PositionManager.sol#L146, PositionManager.sol#L193 | GrantFund.sol, PositionManager.sol | 3 | But, the following is just as valid:
| true | There are 28 instances:
[ajna-grants/src/grants/GrantFund.sol#L39-L40](https://github.com/code-423n4/2023-05-ajna/blob/main/ajna-grants/src/grants/GrantFund.sol#L39-L40)
| true | true | 11 | |||
c4 | 06-lybra | ayden Q | Gas | gas |
1.The result of function getPreUnlockableAmount should be cached into local variable instead of double calculate.
https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/miner/ProtocolRewardsPool.sol#128#L144
```solidity
function unlockPrematurely() external {
require(
block.time... | function unlockPrematurely() external {
require(
block.timestamp + exitCycle - 3 days >
time2fullRedemption[msg.sender],
"ENW"
);
+ uint256 preUnlockableAmount = getPreUnlockableAmount(msg.sender);
- uint256 burnAmount = getReservedLBRForVesting(ms... | function testGrabEsLBR() public {
vm.startPrank(Alice);
assertEq(lbr.balanceOf(Alice), 1e18);
for (uint256 i = 0; i < 10_000; i++) {
pool.grabEsLBR(3);
}
assertEq(lbr.balanceOf(Alice), 1e18);
assertEq(eslbr.balanceOf(Alice), 30_000);
} | rounding | https://github.com/code-423n4/2023-06-lybra-findings/blob/main/data/ayden-Q.md | 2026-01-02T18:22:51.212727+00:00 | 7b66be650a6e1e6e5a9fb4f7f9ee5573fb11ea1168ddb410e8d973316b29e14a | 2 | 2 | 1,150 | 4 | false | false | true | false | high | function unlockPrematurely() external {
require(
block.timestamp + exitCycle - 3 days >
time2fullRedemption[msg.sender],
"ENW"
);
+ uint256 preUnlockableAmount = getPreUnlockableAmount(msg.sender);
- uint256 burnAmount = getReservedLBRForVesting(msg.se... | solidity | 849 | // Code block 1 (solidity):
function unlockPrematurely() external {
require(
block.timestamp + exitCycle - 3 days >
time2fullRedemption[msg.sender],
"ENW"
);
+ uint256 preUnlockableAmount = getPreUnlockableAmount(msg.sender);
- uint256 burnAmount = get... | 2 | false | function unlockPrematurely() external {
require(
block.timestamp + exitCycle - 3 days >
time2fullRedemption[msg.sender],
"ENW"
);
+ uint256 preUnlockableAmount = getPreUnlockableAmount(msg.sender);
- uint256 burnAmount = getReservedLBRForVesting(msg.se... | ProtocolRewardsPool.sol, ProtocolRewardsPool.sol#L156, stakerewardV2pool.sol#L147, ProtocolRewardsPool.sol#L129 | ProtocolRewardsPool.sol, stakerewardV2pool.sol | 4 | function unlockPrematurely() external {
require(
block.timestamp + exitCycle - 3 days >
time2fullRedemption[msg.sender],
"ENW"
);
+ uint256 preUnlockableAmount = getPreUnlockableAmount(msg.sender);
- uint256 burnAmount = getReservedLBRForVesting(ms... | true | function testGrabEsLBR() public {
vm.startPrank(Alice);
assertEq(lbr.balanceOf(Alice), 1e18);
for (uint256 i = 0; i < 10_000; i++) {
pool.grabEsLBR(3);
}
assertEq(lbr.balanceOf(Alice), 1e18);
assertEq(eslbr.balanceOf(Alice), 30_000);
} | true | true | 8 | ||
c4 | 06-lybra | 0xnacho Q | High | high | # [L-01]: LybraWBETHVault: Misleading WBETH address specified in the comments
The WBETH address specified in the [LybraWBETHVault comments](https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/pools/LybraWbETHVault.sol#L16-L17) is misleading. The displayed address is actually the `rETH` mainnet addres... | IRkPool rkPool = IRkPool(0xDD3f50F8A6CafbE9b31a427582963f465E745AF8); | require(PeUSD.allowance(provider, address(this)) > 0, "provider should authorize to provide liquidation EUSD"); | access-control | https://github.com/code-423n4/2023-06-lybra-findings/blob/main/data/0xnacho-Q.md | 2026-01-02T18:22:05.463395+00:00 | 7b6928653b888ee1f06789d88cd8d6356f87a1b0b3d873f6f6de1bcf47843f79 | 3 | 0 | 295 | 5 | false | false | true | false | high | IRkPool rkPool = IRkPool(0xDD3f50F8A6CafbE9b31a427582963f465E745AF8); | unknown | 69 | // Code block 1 (unknown):
IRkPool rkPool = IRkPool(0xDD3f50F8A6CafbE9b31a427582963f465E745AF8);
// Code block 2 (unknown):
require(PeUSD.allowance(provider, address(this)) > 0, "provider should authorize to provide liquidation EUSD");
// Code block 3 (unknown):
event WithdrawAsset(address sponsor, address indexed on... | 3 | false | LybraWbETHVault.sol#L16-L17, LybraRETHVault.sol#L18, LybraPeUSDVaultBase.sol#L131, LybraPeUSDVaultBase.sol#L197-L204, LybraPeUSDVaultBase.sol#L219 | LybraPeUSDVaultBase.sol, LybraWbETHVault.sol, LybraRETHVault.sol | 5 | IRkPool rkPool = IRkPool(0xDD3f50F8A6CafbE9b31a427582963f465E745AF8); | true | require(PeUSD.allowance(provider, address(this)) > 0, "provider should authorize to provide liquidation EUSD"); | true | true | 9 | |||
c4 | 08-dopex | Matin Q | Critical | critical | ## Summary
### Low-Risk Issues
| | Issue | Instances |
| --- | --- | --- |
| [L‑01] | Early users can modify the underlying assets' unit share price | 1 |
| [L‑02] | Multiple roles needed to invoke the function settle() | 1 |
Total: 2 instances over 2 issues
### Non-critical Issues
| | Issue | Instances |
| --- ... | function convertToShares(
uint256 assets
) public view returns (uint256 shares) {
uint256 supply = totalSupply;
uint256 rdpxPriceInAlphaToken = perpetualAtlanticVault.getUnderlyingPrice();
uint256 totalVaultCollateral = totalCollateral() +
((_rdpxCollateral * rdpxPriceInAlphaToken) / 1e8);
... | function convertToShares(
uint256 assets
) public view returns (uint256 shares) {
uint256 supply = totalSupply;
uint256 rdpxPriceInAlphaToken = perpetualAtlanticVault.getUnderlyingPrice();
uint256 totalVaultCollateral = totalCollateral() +
((_rdpxCollateral * rdpxPriceInAlphaToken) / 1e8);
... | reentrancy | https://github.com/code-423n4/2023-08-dopex-findings/blob/main/data/Matin-Q.md | 2026-01-02T18:24:52.004647+00:00 | 7b7d26c01e4ba2eb2dea8affb34828e0df9a5387e06d2b2538ea745f48f07514 | 1 | 0 | 408 | 0 | false | false | true | false | high | function convertToShares(
uint256 assets
) public view returns (uint256 shares) {
uint256 supply = totalSupply;
uint256 rdpxPriceInAlphaToken = perpetualAtlanticVault.getUnderlyingPrice();
uint256 totalVaultCollateral = totalCollateral() +
((_rdpxCollateral * rdpxPriceInAlphaToken) / 1e8);
... | Solidity | 408 | // Code block 1 (Solidity):
function convertToShares(
uint256 assets
) public view returns (uint256 shares) {
uint256 supply = totalSupply;
uint256 rdpxPriceInAlphaToken = perpetualAtlanticVault.getUnderlyingPrice();
uint256 totalVaultCollateral = totalCollateral() +
((_rdpxCollateral * rdpxPri... | 1 | false | function convertToShares(
uint256 assets
) public view returns (uint256 shares) {
uint256 supply = totalSupply;
uint256 rdpxPriceInAlphaToken = perpetualAtlanticVault.getUnderlyingPrice();
uint256 totalVaultCollateral = totalCollateral() +
((_rdpxCollateral * rdpxPriceInAlphaToken) / 1e8);
... | 0 | function convertToShares(
uint256 assets
) public view returns (uint256 shares) {
uint256 supply = totalSupply;
uint256 rdpxPriceInAlphaToken = perpetualAtlanticVault.getUnderlyingPrice();
uint256 totalVaultCollateral = totalCollateral() +
((_rdpxCollateral * rdpxPriceInAlphaToken) / 1e8);
... | true | function convertToShares(
uint256 assets
) public view returns (uint256 shares) {
uint256 supply = totalSupply;
uint256 rdpxPriceInAlphaToken = perpetualAtlanticVault.getUnderlyingPrice();
uint256 totalVaultCollateral = totalCollateral() +
((_rdpxCollateral * rdpxPriceInAlphaToken) / 1e8);
... | true | true | 6 | ||||
c4 | 09-ondo | turvy_fuzz G | Gas | gas | ## the costly _attachThreshold() function can be adjusted to save gas
this:
```solidity
function _attachThreshold(
uint256 amount,
bytes32 txnHash,
string memory srcChain
) internal {
Threshold[] memory thresholds = chainToThresholds[srcChain];
for (uint256 i = 0; i < thresholds.length; ++i) {
... | function _attachThreshold(
uint256 amount,
bytes32 txnHash,
string memory srcChain
) internal {
Threshold[] memory thresholds = chainToThresholds[srcChain];
for (uint256 i = 0; i < thresholds.length; ++i) {
Threshold memory t = thresholds[i];
if (amount <= t.amount) {
txnToThre... | function _attachThreshold(
uint256 amount,
bytes32 txnHash,
string memory srcChain
) internal {
Threshold[] memory thresholds = chainToThresholds[srcChain];
TxnThreshold memory txnThreshold;
for (uint256 i = 0; i < thresholds.length; ++i) {
Threshold memory t = thresholds[i];
if (a... | other | https://github.com/code-423n4/2023-09-ondo-findings/blob/main/data/turvy_fuzz-G.md | 2026-01-02T18:26:18.928767+00:00 | 7ba23a93df5a967a50b30d6f3f29ad54dac80422b665c3f7d9f42bb2363e71a3 | 2 | 2 | 1,182 | 0 | false | false | true | false | high | function _attachThreshold(
uint256 amount,
bytes32 txnHash,
string memory srcChain
) internal {
Threshold[] memory thresholds = chainToThresholds[srcChain];
for (uint256 i = 0; i < thresholds.length; ++i) {
Threshold memory t = thresholds[i];
if (amount <= t.amount) {
txnToThre... | solidity | 567 | // Code block 1 (solidity):
function _attachThreshold(
uint256 amount,
bytes32 txnHash,
string memory srcChain
) internal {
Threshold[] memory thresholds = chainToThresholds[srcChain];
for (uint256 i = 0; i < thresholds.length; ++i) {
Threshold memory t = thresholds[i];
if (amount <= t... | 2 | false | function _attachThreshold(
uint256 amount,
bytes32 txnHash,
string memory srcChain
) internal {
Threshold[] memory thresholds = chainToThresholds[srcChain];
for (uint256 i = 0; i < thresholds.length; ++i) {
Threshold memory t = thresholds[i];
if (amount <= t.amount) {
txnToThre... | 0 | function _attachThreshold(
uint256 amount,
bytes32 txnHash,
string memory srcChain
) internal {
Threshold[] memory thresholds = chainToThresholds[srcChain];
for (uint256 i = 0; i < thresholds.length; ++i) {
Threshold memory t = thresholds[i];
if (amount <= t.amount) {
txnToThre... | true | function _attachThreshold(
uint256 amount,
bytes32 txnHash,
string memory srcChain
) internal {
Threshold[] memory thresholds = chainToThresholds[srcChain];
TxnThreshold memory txnThreshold;
for (uint256 i = 0; i < thresholds.length; ++i) {
Threshold memory t = thresholds[i];
if (a... | true | true | 6.63 | ||||
c4 | 01-salty | Tigerfrake Q | High | high | # [01] Improper Indentation:
### Description:
The indentation in the following instances is inconsistent, making it harder to read and understand the code.
Example:
```Solidity
if ( address(swapTokenIn) == address(wbtc))
if ( address(swapTokenOut) == address(weth))
... | if ( address(swapTokenIn) == address(wbtc))
if ( address(swapTokenOut) == address(weth))
return (wbtc, salt); | if (block.timestamp < ballot.ballotMinimumEndTime ) | access-control | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/Tigerfrake-Q.md | 2026-01-02T19:01:30.918901+00:00 | 7bc4347034828c0fea94da6333a10ebdd72b01b0c026ac8c4b4e2e821d403b73 | 2 | 0 | 200 | 3 | false | false | true | false | high | if ( address(swapTokenIn) == address(wbtc))
if ( address(swapTokenOut) == address(weth))
return (wbtc, salt); | Solidity | 149 | // Code block 1 (Solidity):
if ( address(swapTokenIn) == address(wbtc))
if ( address(swapTokenOut) == address(weth))
return (wbtc, salt);
// Code block 2 (Solidity):
if (block.timestamp < ballot.ballotMinimumEndTime ) | 2 | false | if ( address(swapTokenIn) == address(wbtc))
if ( address(swapTokenOut) == address(weth))
return (wbtc, salt);
if (block.timestamp < ballot.ballotMinimumEndTime ) | src%2Farbitrage%2FArbitrageSearch.sol#L35-L37, src%2Farbitrage%2FArbitrageSearch.sol#L41-L43, src%2Fdao%2FProposals.sol#L392 | src%2Farbitrage%2FArbitrageSearch.sol, src%2Fdao%2FProposals.sol | 3 | if ( address(swapTokenIn) == address(wbtc))
if ( address(swapTokenOut) == address(weth))
return (wbtc, salt); | true | if (block.timestamp < ballot.ballotMinimumEndTime ) | true | true | 8 | ||
c4 | 01-ondo | SleepingBugs Q | Low | low |
## Upgradeable contract is missing a __gap[50] storage variable to allow for new storage variables in later versions
### Impact
For upgradeable contracts, there must be storage gap to "allow developers to freely add new state variables in the future without compromising the storage compatibility with existing deploym... | ## Missing checks for address(0x0) when assigning values to `address` state or `immutable` variables
`NOTE`: None of these findings where found by [Picodes. NC-1](https://gist.github.com/iFrostizz/bbbadb3d93229f60c94f01b6626c056d)
### Summary
Zero address should be checked for state variables, immutable variables.
... | validation | https://github.com/code-423n4/2023-01-ondo-findings/blob/main/data/SleepingBugs-Q.md | 2026-01-02T18:14:48.904909+00:00 | 7c7e977064bd364c1a677e1f9edefdec5e34bf6a4f85ce68383d9acc509aa466 | 0 | 0 | 0 | 4 | false | true | false | false | medium | 0 | 0 | false | KYCRegistry.sol#L57, JumpRateModelV2.sol#L66, CashKYCSenderFactory.sol#L54, CashKYCSenderReceiverFactory.sol#L54 | JumpRateModelV2.sol, KYCRegistry.sol, CashKYCSenderReceiverFactory.sol, CashKYCSenderFactory.sol | 4 | ## Missing checks for address(0x0) when assigning values to `address` state or `immutable` variables
`NOTE`: None of these findings where found by [Picodes. NC-1](https://gist.github.com/iFrostizz/bbbadb3d93229f60c94f01b6626c056d)
### Summary
Zero address should be checked for state variables, immutable variables.
... | true | false | false | 5 | ||||||||
c4 | 06-lybra | Rickard Q | High | high | # [N-01] Move IF/validation statements to the top of the function when validating input parameters
````solidity
File: contracts/lybra/pools/LybraRETHVault.sol
27 function depositEtherToMint(uint256 mintAmount) external payable override {
28 require(msg.value >= 1 ether, "DNL");
29 uint256 preB... | File: contracts/lybra/pools/LybraRETHVault.sol
27 function depositEtherToMint(uint256 mintAmount) external payable override {
28 require(msg.value >= 1 ether, "DNL");
29 uint256 preBalance = collateralAsset.balanceOf(address(this));
30 rkPool.deposit{value: msg.value}();
31 ... | File: contracts/lybra/pools/base/LybraPeUSDVaultBase.sol
212 function _withdraw(address _provider, address _onBehalfOf, uint256 _amount) internal {
213 require(depositedAsset[_provider] >= _amount, "Withdraw amount exceeds deposited amount.");
214 depositedAsset[_provider] -= _amount;
215 ... | overflow | https://github.com/code-423n4/2023-06-lybra-findings/blob/main/data/Rickard-Q.md | 2026-01-02T18:22:39.540122+00:00 | 7d04de045b9310b4f6a123125996f3d9e229d7fa5afe87f861b380ad32a53fde | 1 | 1 | 590 | 6 | false | false | true | false | high | File: contracts/lybra/pools/LybraRETHVault.sol
27 function depositEtherToMint(uint256 mintAmount) external payable override {
28 require(msg.value >= 1 ether, "DNL");
29 uint256 preBalance = collateralAsset.balanceOf(address(this));
30 rkPool.deposit{value: msg.value}();
31 ... | solidity | 590 | // Code block 1 (solidity):
File: contracts/lybra/pools/LybraRETHVault.sol
27 function depositEtherToMint(uint256 mintAmount) external payable override {
28 require(msg.value >= 1 ether, "DNL");
29 uint256 preBalance = collateralAsset.balanceOf(address(this));
30 rkPool.deposit{valu... | 1 | false | File: contracts/lybra/pools/LybraRETHVault.sol
27 function depositEtherToMint(uint256 mintAmount) external payable override {
28 require(msg.value >= 1 ether, "DNL");
29 uint256 preBalance = collateralAsset.balanceOf(address(this));
30 rkPool.deposit{value: msg.value}();
31 ... | LybraRETHVault.sol#L27-L39, LybraStETHVault.sol#L47-L49, LybraWbETHVault.sol#L27-L29, LybraWstETHVault.sol#L41-L43, LybraEUSDVaultBase.sol#L82-L84, LybraPeUSDVaultBase.sol#L65-L68 | LybraEUSDVaultBase.sol, LybraWstETHVault.sol, LybraRETHVault.sol, LybraStETHVault.sol, LybraWbETHVault.sol, LybraPeUSDVaultBase.sol | 6 | File: contracts/lybra/pools/LybraRETHVault.sol
27 function depositEtherToMint(uint256 mintAmount) external payable override {
28 require(msg.value >= 1 ether, "DNL");
29 uint256 preBalance = collateralAsset.balanceOf(address(this));
30 rkPool.deposit{value: msg.value}();
31 ... | true | File: contracts/lybra/pools/base/LybraPeUSDVaultBase.sol
212 function _withdraw(address _provider, address _onBehalfOf, uint256 _amount) internal {
213 require(depositedAsset[_provider] >= _amount, "Withdraw amount exceeds deposited amount.");
214 depositedAsset[_provider] -= _amount;
215 ... | true | true | 7 | ||
c4 | 01-salty | b0g0 Q | Medium | medium | ## [L-01] Signature verification function does not prevent signature malleability
## Issue Description
https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/SigningTools.sol#L11
A common attack vector when it comes to using signatures is their malleability. In simple terms this... | function _verifySignature(
bytes32 messageHash,
bytes memory signature
) internal pure returns (bool) {
require(signature.length == 65, "Invalid signature length");
bytes32 r;
bytes32 s;
uint8 v;
//@audit [L] -> does not check for upper/lower value of the si... | function finalizeBallot() external nonReentrant {
require(!ballotFinalized, "Ballot has already been finalized");
require(
block.timestamp >= completionTimestamp,
"Ballot is not yet complete"
);
if (startExchangeYes > startExchangeNo) {
exchangeConfig... | reentrancy | https://github.com/code-423n4/2024-01-salty-findings/blob/main/data/b0g0-Q.md | 2026-01-02T19:01:33.152976+00:00 | 7d35e40769e0e1db5249935ea1eaaaf88f07d7e587ae188a0c927ce0bc51e143 | 1 | 0 | 622 | 2 | false | false | true | false | high | function _verifySignature(
bytes32 messageHash,
bytes memory signature
) internal pure returns (bool) {
require(signature.length == 65, "Invalid signature length");
bytes32 r;
bytes32 s;
uint8 v;
//@audit [L] -> does not check for upper/lower value of the si... | unknown | 622 | // Code block 1 (unknown):
function _verifySignature(
bytes32 messageHash,
bytes memory signature
) internal pure returns (bool) {
require(signature.length == 65, "Invalid signature length");
bytes32 r;
bytes32 s;
uint8 v;
//@audit [L] -> does not check for ... | 1 | false | SigningTools.sol#L11, BootstrapBallot.sol#L48 | SigningTools.sol, BootstrapBallot.sol | 2 | function _verifySignature(
bytes32 messageHash,
bytes memory signature
) internal pure returns (bool) {
require(signature.length == 65, "Invalid signature length");
bytes32 r;
bytes32 s;
uint8 v;
//@audit [L] -> does not check for upper/lower value of the si... | true | function finalizeBallot() external nonReentrant {
require(!ballotFinalized, "Ballot has already been finalized");
require(
block.timestamp >= completionTimestamp,
"Ballot is not yet complete"
);
if (startExchangeYes > startExchangeNo) {
exchangeConfig... | true | true | 7 | |||
c4 | 11-kelp | Shawon G | Gas | gas | # Don't store data in a variable if it is used only once.
``` solidity
file: utils/LRTDeposit.sol
81 uint256 ndcsCount = nodeDelegatorQueue.length;
for (uint256 i; i < ndcsCount;) {
assetLyingInNDCs += IERC20(asset).balanceOf(nodeDelegatorQueue[i]);
assetStakedInEigenLayer += INodeDel... | The value of `nodeDelegatorQueue.length` is used only once and caching it inside a uint256 variable would only use memory storage hence,
increasing the gas price.
Insdead, do this:
| other | https://github.com/code-423n4/2023-11-kelp-findings/blob/main/data/Shawon-G.md | 2026-01-02T18:27:40.305174+00:00 | 7db1af1485da90c475684033ebae2c95c311a54df7f479645cc09c2c14e9cd9b | 1 | 0 | 181 | 0 | false | true | true | false | medium | The value of `nodeDelegatorQueue.length` is used only once and caching it inside a uint256 variable would only use memory storage hence,
increasing the gas price.
Insdead, do this: | unknown | 181 | // Code block 1 (unknown):
The value of `nodeDelegatorQueue.length` is used only once and caching it inside a uint256 variable would only use memory storage hence,
increasing the gas price.
Insdead, do this: | 1 | false | 0 | The value of `nodeDelegatorQueue.length` is used only once and caching it inside a uint256 variable would only use memory storage hence,
increasing the gas price.
Insdead, do this:
| true | false | false | 3.92 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.