Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/03/19 12:00 a.m.•15 views

Here are some potential security vulnerabilities that I have identified in this particular contract (BytecodeCompressor.sol)

Lines of code Vulnerability details Impact 1. Integer overflow: In the publishCompressedBytecode function, the check dictionary.length = 2 16 8 is intended to ensure that the dictionary does not become too large, but it is not sufficient to prevent an integer overflow. If dictionary.length exceed...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/19 12:00 a.m.•13 views

Incorrect usage of EIP-150

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. Tools Used Recommended Mitigation Steps --- The...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/19 12:00 a.m.•20 views

NonceHolder.setValueUnderNonce does not check if the nonce has been used before

Lines of code Vulnerability details Impact Already used nonces or the nonces less than the specified minimal nonce can be used by the NonceHolder.setValueUnderNonce function. It can lead to some unique conflicts and even replay attacks on some of dapps which are based on the values under nonces...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/19 12:00 a.m.•19 views

Users pay excessive gas cost for sending bytecode hashes to L1

Lines of code Vulnerability details Impact When deploying new contracts, users are forced to pay more gas than is required to publish the bytecode hash to the L1. Proof of Concept When users deploy new smart contracts, the protocol marks the hashes of the bytecodes of the contracts as known and...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/19 12:00 a.m.•17 views

Unchecked return values in setValueForNextCall

Lines of code Vulnerability details Title: Description: When creating a contract, if there is value to be transferred the constructContract function of ContractDeployer will use the SystemContractsHelper.setValueForNextFarCall Method: However in constructContract function doesn't verify that the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/19 12:00 a.m.•17 views

[bootloader] A bytecode hash without the bytecode (preimage) can be marked as known, breaking the prover

Lines of code Vulnerability details This is a report of a finding in bootloader.yul. While the file is out of scope of the contest, the sponsor stated that they would still accept findings in the file and would judge them separately from the contest. Impact A bytecode hash for which the bytecode...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/19 12:00 a.m.•14 views

Incorrect argument passed to "Utils.characterToUnicodeBytes" in "Namespace.fuse"

Lines of code Vulnerability details Impact The function Namespace.fuse uses Utils.characterToUnicodeBytes to get the unicode bytevalue for a given Tile. The first argument of characterToUnicodeBytes is an uint8 value representing the font class. Instead of passing the font class in the tile data,...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•25 views

Sending L2 ---> L1 message without paying gas for published data due to uint256 overflow

Lines of code Vulnerability details Impact Due to this bug, a user can send arbitrarily long messages greater than a certain length from L2 to L1 without paying for the gas that is required for publishing data on L1. Proof of Concept Below is a PoC contract called "Test" that illustrates the bug...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•14 views

Attacker could potentially burn the token balance of totalSupply and L2EthContract

Lines of code Vulnerability details Impact Attacker potentially can burn all L2EthContract and totalSupply tokens Proof of Concept function withdrawaddress l1Receiver external payable override uint256 amount = msg.value; // Silent burning of the ether unchecked balanceaddressthis -= amount;...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•12 views

Operator can cause funds to be stolen by manipulating gas fee refund

Lines of code Vulnerability details Impact An operator can manipulate the refund of gas fee mechanism to steal from the bootloader balance. Inside refundCurrentL2Transaction function in the bootloader where the refund is happening for the refund recipient at L1097, the operator provides a value f...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•19 views

The price fee for fusion characters is incorrect.

Lines of code Vulnerability details Vulnerability details Price fee for fusion characters is incorrect. According to the docs Fusing To fuse a namespace NFT, the user specifies the trays and the tiles offsets within the trays to use. Note that the whole tray is always burned, even if you only use...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•17 views

Adding Multiple Blocks with the Same Timestamp Can Create Ambiguity in the Order of Blocks in the Blockchain Network

Lines of code Vulnerability details Impact Multiple blocks at the same timestamp creates ambiguity about the order in which these blocks should be added to the chain. This can cause inconsistencies in the state of the network and make it vulnerable to attacks such as double-spending. Proof of...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•15 views

User can fuse an NFT with minimal cost

Lines of code Vulnerability details Impact User can fuse an NFT with minimal cost Proof of Concept The fuse is used to fuse a new Namespace NFT with the referenced tiles,if it is called, the protocol will transfer fusing costs from msg.sender to revenue address. The fusing costs is calculated...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•20 views

Users can fuse an NFT without burning a tray NFT

Lines of code Vulnerability details Impact Users can fuse an NFT without burning a tray NFT Proof of Concept The Namespace protocol allows user to fuse a new Namespace NFT with the referenced tiles. Inside the fuse function, the protocol first transfer fusing costs from msg.sender to revenue...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•12 views

Missing check for NFT contract, a bad actor can mint a PFP NFT without having a CID NFT

Lines of code Vulnerability details Impact Missing check for NFT contract, a bad actor can mint a PFP NFT without having a CID NFT. Proof of Concept The ProfilePicture.mint is used to mint a new PFP NFT. function mintaddress nftContract, uint256 nftID external uint256 tokenId = ++numMinted; if...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•13 views

_l1Receiver may lose the token amount

Lines of code Vulnerability details Impact l1Receiver lose the token amount Proof of Concept function withdrawaddress l1Receiver external payable override uint256 amount = msg.value; // Silent burning of the ether unchecked balanceaddressthis -= amount; totalSupply -= amount; // Send the L2 log, ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•26 views

The Risk of Adding an Incorrect Previous Block Hash Value in a Blockchain Network

Lines of code Vulnerability details Impact There is a risk of adding an incorrect previous block hash value to a block, either intentionally or unintentionally. If the previous block hash value is incorrect, it means that the data in the previous block has been tampered with, and the current bloc...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•21 views

Possible loss of funds when withdrawing from L2 to L1

Lines of code Vulnerability details Impact Context To initiate a withdrawal from L2 to L1, a user can call L2EthToken.withdraw method, then funds will be available to calim on L1 via finalizeEthWithdrawal method of MailboxFacet. function withdrawaddress l1Receiver external payable override The...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/18 12:00 a.m.•20 views

Reentrancy in ProfilePicture.mint()

Lines of code Vulnerability details Impact Reentrancy in ProfilePicture.mint Proof of Concept The protocol allows user to mint a PFP NFT. Inside the mint function ,there is a check that ERC721nftContract.ownerOfnftID != msg.sender, as the code below the nftContract and nftID is specified by the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/17 12:00 a.m.•12 views

Bytecode Compressor Contract Replay Attack.

Lines of code Vulnerability details Impact Injection of duplicate code. Proof of Concept In the markBytecodeAsPublished function, the contract does not check whether a particular hash has already been added to the storage. The contract only checks the current marker value of the hash, which is se...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/17 12:00 a.m.•15 views

getBlockHashEVM() function vulnerability leads to DoS attack

Lines of code Vulnerability details Impact By using the getBlockHashEVM function with erroneous input, an attacker can take advantage of this vulnerability to deprive the contract of gas and launch a denial of service DoS attack against the network, contracts and valid transactions will therefore...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/17 12:00 a.m.•13 views

Reentrancy in validateTransaction function

Lines of code Vulnerability details Impact The contract can be called by an attacker several times until the money are depleted. The contract owner may suffer financial damages as a result of this vulnerability. Description The validateTransaction function in line 66-71 accepts external calls and...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/17 12:00 a.m.•21 views

An attacker can manipulate the call stack of the transaction to impersonate another address and set a different value for the origin variable.

Lines of code Vulnerability details Impact By changing the transaction's call stack, an attacker can use the origin variable to pretend to be another address, as a result, the attacker can be able to enter the system without authorization and carry out evil deeds. Proof of Concept The vulnerabili...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/16 12:00 a.m.•11 views

Upgraded Q -> 3 from #197 [1678982150949]

Judge has assessed an item in Issue 197 as 3 risk. The relevant finding follows: L-02 Instant reward calculation --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•10 views

Misconfiguration of LP token contract

Lines of code Vulnerability details Impact If the LP token contract is set to a non-contract address or a no-revert-on-transfer token, users will be able to: 1. Mint huge amounts of BYTES 2.0 tokens. 2. Drain the contract of all its LP tokens. Vulnerability Details Throughout the contract, it is...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•16 views

Lack of a contract existence check may lead to undesired behavior

Lines of code Vulnerability details Impact The functions NeoTokyoStaker.assetTransferFrom and NeoTokyoStaker.assetTransfer are both used as helper functions to perform low level calls, both functions revert if the low-level call fails, but no checks are made if the contract that's being called...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•14 views

Updating a pool's total points doesn't affect existing stake positions for rewards calculation

Lines of code Vulnerability details Impact Staking rewards are calculated based on the user's share of total points in the corresponding asset pool, this is the sum of the points associated to the staker's positions divided by the total points from all positions in the pool. We can see this...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•14 views

Rewards calculation is unfair and leads to stakers losing rewards

Lines of code Vulnerability details User rewards are updated upon staking actions ie stake or withdraw: File: contracts/staking/NeoTokyoStaker.sol 1225: // Grant the caller their total rewards with each staking action. 1226: IByteContractBYTES.getRewardmsg.sender; Which are computed as follows:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•14 views

upgradeBytes() functon doesn't allows user to upgrade their entire bytes1 token to bytes2 token

Lines of code Vulnerability details Impact The users can't upgrade all of its bytes1 token to bytes due to logic error in upgradeBytes functon. The user can only upgrade the token if he choose the less amount then what they already have. They cannot upgrade all tokens. Proof of Concept The...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•14 views

Error in the calculation of daoShare value in the getPoolReward function

Lines of code Vulnerability details Impact In the getPoolReward function inside the NeoTokyoStaker contract there is an error in the calculation of the daoShare value which represents the part of rewards sent to the treasury, this means that the treasury will receive less rewards that what it is...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•10 views

Users cant stake into S1 or S2 Citizen if they dont have a timelockEndTime

Lines of code Vulnerability details Impact function stakeBytes if citizenStatus.timelockEndTime == 0 revert CannotStakeIntoUnownedCitizencitizenId, seasonId; A user will not be able to successfully stake their Bytes into a Season 1 or Season 2 Citizen if they do not have a timelockEndTime set. Th...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•12 views

Some Amount of tokens will be left behind in BYTES 1.0

Lines of code Vulnerability details Impact If user wants to upgrade all its token he won't be able to do that. Proof of Concept Let's see what is happening function upgradeBytes uint256 amount external if IERC20BYTES1.balanceOfmsg.sender amount revert DoNotHaveEnoughOldBytesamount; During the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•11 views

Incorrect validation of the result of the transfer * transferFrom method call. Failure to comply with the ERC20 standard

Lines of code Vulnerability details Impact Inability to use ERC20 standard tokens. As an example of the future LP token Proof of Concept According to the ERC-20 standard, the transfer and transferFrom methods return true or false, but looking at the code we see that:...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•11 views

# configureLP function should check LP stakers present before changing LP address.

Lines of code Vulnerability details configureLP function should check LP stakers existence before changing LP address. Permitted users are allowed to change LP address when lpLocked is false. So this does not follow the comments above. Proof of concept 1701 This function allows a permitted user t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•11 views

Users cant withdraw S1 or S2 Citizens if no timelockEndTime is associated with it

Lines of code Vulnerability details Impact Users cant withdraw S1 or S2 Citizens if no timelockEndTime is associated with it. As the same logic is applied in the withdrawLP function, this is not intended behavior. Currently, there are no allowances for a S1 or S2 Citizen to withdraw their asset i...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•14 views

Permit authorized callers can burn any amount of BYTES 2.0 tokens from an arbitrary address

Lines of code Vulnerability details Impact Using the burn function of BYTES 2.0, an authorized caller can burn an arbitrary amount of tokens from any address. I'm aware that it was mentioned in README.md of the project that this type of finding is out of the scope. but I believe it is still...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•13 views

User can claim high rewards than he eligible

Lines of code Vulnerability details Impact User will receive rewards more than he should receive calculation of rewards for user can be continued even after withdraw Proof of Concept when a user claim rewards, the lastRewardTime will be set to block.timestamp , now consider a scenario that user...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•7 views

Audit Findings for BYTES Token Contract - Burn Function Vulnerabilities

Lines of code Vulnerability details Impact BYTES2.burn: The function burn allows authorized callers to burn BYTES tokens from a specific address and mint DAO taxes. However, the function does not check if the from address actually has enough BYTES tokens to burn. This means that an attacker could...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•11 views

Executing getCreditYield(citizenId, citizenVaultId) in NeoTokyoStaker._stakeS1Citizen function can cause identityPoints to be lower than it should be when corresponding S1 Citizen to be staked does not have a component vault but an optional vault is provided

Lines of code Vulnerability details Impact Calling the following NeoTokyoStaker.stakeS1Citizen function executes string memory citizenCreditYield = getCreditYieldcitizenId, citizenVaultId and uint256 identityPoints = identityCreditPointscitizenCreditYield. When the S1 Citizen to be staked does no...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•20 views

NeoTokyoStaker.getPoolReward function can be frontrun, which can cause staker and DAO to lose reward shares that they are entitled to

Lines of code Vulnerability details Impact When calling the following NeoTokyoStaker.stakeBytes and NeoTokyoStaker.stakeLP functions, the higher the specified amount to be staked is, the higher the pool.totalPoints is increased by. function stakeBytes uint256 private uint256 amount; uint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•10 views

Huge over calculating user rewards

Lines of code Vulnerability details Impact Huge over calculating user rewards When user claim rewards for the first time rewards over calculated Proof of Concept getPoolReward function uses ''uint256 timeSinceReward = block.timestamp - lastRewardTime'' formula to calculate period of time that...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•19 views

_withdrawLP is not re-setting the lpPosition.points when lpPosition.amount

Lines of code Vulnerability details Impact User can withdraw their LP tokens without affecting their lpPosition.points. Since the lpPosition.points could not deducted then and there whenever the LP token is drawn out, user can use the old lpPosition.points and new lpPosition.points value to...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•14 views

ZERO TRUNCATION COULD LEAD TO UNEXPECTED RESULTS

Lines of code Vulnerability details Impact Precision issue leading to zero truncation due to numerator smaller than denominator in a ratio or a division happens readily in Solidity if extra cares have not been given to it. Arithmetic operations running into this incident are typically associated...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•14 views

Use the _assetTransferFrom function instead of _assetTransfer. This is because the tokens are held in the escrow contract, rather than being in the destination BYTES address, and thus require a transfer from the escrow contract to the recipient's address

Lines of code Vulnerability details Impact The msg.sender lose his stakedBytes From BYTES address not possible to send stakedBytes to msg.sender. The stakedBytes only help in escrow contract not in BYTES address. Proof of Concept function assetTransfer address asset, address to, uint256 amount...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•16 views

Unclaimed rewards will be stuck unrecoverable

Lines of code Vulnerability details Impact The vulnerability relies in: unchecked uint256 share = points PRECISION / pool.totalPoints totalReward; uint256 daoShare = share pool.daoTax / 100 DIVISOR; share /= PRECISION; daoShare /= PRECISION; return share - daoShare, daoShare; The problem is that ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•22 views

Malicious users can claim BYTES rewards after withdrawing all of their LP stake

Lines of code Vulnerability details Impact Users are able to continue claiming BYTES rewards indefinitely on their initials points after withdrawing all of their LP stake. Proof of Concept A user can withdraw all of their LP staked tokens in multiple steps with an amount 1e16. If the amount is...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•14 views

the S1 Citizen and S2 Citizen loops in the second getStakerPositions are not working properly

Lines of code Vulnerability details Impact This can result in the second loop not running correctly and resulting in an error in the logic, in case if the length of the stakerS1Positionstaker or stakerS2Positionstaker arrays is very large, the operation of adding or subtracting the index on...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•11 views

share underflow in getPoolReward()

Lines of code Vulnerability details Impact It is important to draw attention to an issue that, while out of scope, can lead to a complete loss of funds on the contract and, therefore, seems significant. The configurePools function allows setting an arbitrary, unrestricted daoTax, which can result...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•17 views

Use safeTransferFrom() instead of transferFrom() in function NeoTokyoStaker._assetTransferFrom()

Lines of code Vulnerability details Impact Some ERC-20 tokens do not revert on failure such as ZRX. Instead, they would just return a boolean false. In function NeoTokyoStaker.assetTransferFrom, the check success is only checking whether the low-level call is successful or not. If the ERC-20 toke...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:00 a.m.•12 views

Staker can withdraw a staked LP token amount that is small enough to ensure that lpPosition.points does not change when calling NeoTokyoStaker._withdrawLP function and cause extra reward shares, which the staker is not entitled to, to be minted to the staker when calling lpPosition.getPoolReward function later

Lines of code Vulnerability details Impact When withdrawing the staked LP tokens, the staker can divide the total staked token amount into smaller amounts and call the NeoTokyoStaker.withdraw function, which further calls the following NeoTokyoStaker.withdrawLP function, to withdraw each of such...

6.5AI score
SaveExploits0
Total number of security vulnerabilities10190