Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/03/19 12:0 a.m.14 views

Default accounts cannot pay transaction fees due to DefaultAccount not calling MsgValueSimulator

Lines of code Vulnerability details Impact Default accounts cannot pay the transaction fees to the bootloader. It's not clear whether the attempts to do so will silently succeed or revert because the behaviour of the CALL opcode in the zkSync Era virtual machine isn't explained in the description...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.7 views

Unsafe safeTransfer function

Lines of code Vulnerability details Impact The safeTransfer function of the SafeERC20.sol contract check that the target is actually a contract before calling it, this is to avoid calls to address with no code that will always return succes = true. For exemple if you use token.safeTransfer and...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.10 views

L2EthToken.sol balance[address(this)] COULD UNDERFLOW

Lines of code Vulnerability details Impact The ethereum balance of the L2EthToken.sol contract can underflow thus breaking the accounting of the protocol for L2-L1 fund transfers. Proof of Concept L2EthToken.sol contract has the withdraw function to transfer funds to L1 for withdrawal. In the...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.11 views

NonceHolder.setValueUnderNonce does not increase the minNonce when using sequential account nonce ordering

Lines of code Vulnerability details Impact The current available nonce can't be synchronized to the client and rpc resp in real time. As a result, the client can't use the correct nonce to signature transaction. Proof of Concept If the nonceOrdering type of the account is...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.6 views

Underflow if enough amount is sent to the contract

Lines of code Vulnerability details Impact In function withdraw function withdrawaddress l1Receiver external payable override uint256 amount = msg.value; // Silent burning of the ether unchecked balanceaddressthis -= amount; totalSupply -= amount; they are using unchecked to decrease balances. Th...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.10 views

User transactions can call system contracts directly

Lines of code Vulnerability details Impact User transaction can call system contracts directly, which shouldn't be allowed to not invoke potentially dangerous operations. Proof of Concept The DefaultAccount.executeTransaction executes a user transaction after it was validated. The function calls...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/03/19 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.22 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.5 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.5 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2023/03/18 12:0 a.m.14 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
Exploits0
Code423n4
Code423n4
added 2023/03/17 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/03/17 12:0 a.m.6 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
Exploits0
Code423n4
Code423n4
added 2023/03/17 12:0 a.m.11 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
Exploits0
Code423n4
Code423n4
added 2023/03/17 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2023/03/16 12:0 a.m.6 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.11 views

Flawed calculation in getPoolReward leads to permanent loss of rewards

Lines of code Vulnerability details In NeoTokyoStaker.getPoolReward, a users reward is calculated as follows: 1388: uint256 share = points PRECISION / pool.totalPoints totalReward; 1390: share /= PRECISION; points represents the users total points in the pool over a specific potentially long time...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.7 views

Vault staked along with "Hands of the Citadel" does not have any effect but still be locked

Lines of code Vulnerability details Impact In function stakeS1Citizen, when the S1 citizen has class Hands of Citadel, it will ignore the vault staked but still transfer the vault into Staking contract. It will effectively lock the vault for timelockDuration but does not have any effect on...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.16 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.10 views

BYTES2.getReward: no check for input

Lines of code Vulnerability details Impact the function getReward should validate that to is not an empty address 0x0 to prevent accidental loss of BYTES. Impact: mint reward BYTES to address0 will be lost Proof of Concept function getReward address to external uint256 reward, uint256 daoCommisio...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.11 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.11 views

Attacker can abuse rounding down to get reward without depositing anything in LP pool

Lines of code Vulnerability details Impact In function withdrawLP, it calculates the amount of points from the amount input parameter. unchecked uint256 points = amount 100 / 1e18 lpPosition.multiplier / DIVISOR; // Update the caller's LP token stake. lpPosition.amount -= amount; lpPosition.point...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.6 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.9 views

User Rewards will be lost in case of Withdraw

Lines of code Vulnerability details Impact User loses his unclaimed rewards If user withdraw all of his staked tokens he won't be able to claim rewards Proof of Concept the point is used to calculate user rewards and when a user withdraw all of its staked tokens the point will be set to zero and...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.9 views

Newly staked LP tokens' end time can overwrite previously staked LP tokens' end time

Lines of code Vulnerability details Impact When the following NeoTokyoStaker.stakeLP function is called for the first time to stake some LP tokens, stakerLPPositionmsg.sender.timelockEndTime = block.timestamp + timelockDuration is executed. Then, calling this function for a second time to stake...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.11 views

Total reward is miscalculating

Lines of code Vulnerability details Impact In the getPoolReward the calcul of totalReward is wrong because the rewardRate is not updated. When block.timestamp is less or equal to windows.startTime the reward rate should equal to the current window rate not the previous one. Proof of Concept...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.10 views

User can cause the points of their LP stake position to underflow

Lines of code Vulnerability details Impact This vulnerability allows a user to cause their LP position points to underflow which will then allow a user to receive a massively disproportionate amount of the emission rewards relative to their stake because they now practically have an infinite amou...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.6 views

LP tokens without 18 decimals are not supported

Lines of code Vulnerability details Impact If the LP token used does not have 18 decimals, staking rewards for LP tokens will be much more or much less than intended. Vulnerability Details In stakeLP and withdrawLP, the formulas for calculating points are as shown: NeoTokyoStaker.solL1155 uint256...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.11 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.7 views

BYTES can be used to increase points by staking them immediately before withdrawing them

Lines of code Vulnerability details Impact When staking BYTES, users don't need to lock them for any specific time. BYTES are locked in a Citizen, and they are withdrawn together with the Citizen. Users can stake all the BYTES they own before withdrawing the citizen, increasing their points in th...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.17 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
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.14 views

Unvalidated input in setManagerRight function

Lines of code Vulnerability details Impact The setManagerRight function takes managedRight and managerRight as inputs without validating them This could potentially lead to unexpected results if the input values are not what the function expects. Tools Used Recommended Mitigation Steps Provide...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/03/15 12:0 a.m.18 views

An malicious user can mint a huge amount of BYTES 2.0 tokens for himself

Lines of code Vulnerability details Impact An attacker can mint a huge amount of BYTES 2.0 tokens for himself. Additionally, the rewards system can be permanently damaged by making the pool.totalPoints a huge number, not reflecting the actual state of the system. Proof of Concept There are two co...

6.7AI score
Exploits0
Total number of security vulnerabilities10190