Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
•added 2022/04/07 12:00 a.m.•23 views

Code credits fee-on-transfer tokens for amount stated, not amount transferred

Lines of code Vulnerability details Some ERC20 tokens, such as Tether USDT, allow for charging a fee any time transfer or transferFrom is called. Impact The code miscalculates whether the loan has been fully paid or bought out because it relies on the value of amounts passed in rather than the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/06 12:00 a.m.•23 views

Unauthorized ERC20 changes

Lines of code Vulnerability details Impact It's possible by anyone to change the name and symbol of CToken. Proof of Concept The require was made in reverse condition, it checks that the sender must be different than admin in order to be able to change the name and symbol requiremsg.sender !=...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/06 12:00 a.m.•23 views

Dangerous of one-step change of privileged roles

Lines of code Vulnerability details Impact Setting a new minter by old minter is happened in one step, and there is no way to correct it if old minter set a wrong address as new minter. Impact= high , likelihood= low -- Severity Risk = Medium owasp table Tools Used : manual analysis Recommended...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/06 12:00 a.m.•23 views

Faulty logic at _setBufferCap() function

Lines of code Vulnerability details Impact setBufferCap function sets the bufferCap. It first calls the updateBufferStored function which updates the bufferStored variable. However, calculation of bufferStored depends on bufferCap value: Math.minbufferStored + rateLimitPerSecond elapsed, bufferCa...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/06 12:00 a.m.•23 views

NonCustodialPSM can become insolvent as CPI index rises

Lines of code Vulnerability details Impact NonCustodialPSM mints and redeems VOLT to a chosen stablecoin at the current market rate minus a fixed fee. It is assumed that the difference to be covered with pcvDeposit funds. That assumption is similar to one used in FEI protocol, but there no rate...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/04 12:00 a.m.•23 views

Royalties do Not Support Fee-On-Transfer Tokens

Lines of code Vulnerability details Impact The RoyaltyVault.sol contract interacts with the Splitter.sol to send accumulated royalties to the collection's respective recipients. The sendToSplitter function will query the balance of the royalty asset and send the amount after fee deductions to the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/02 12:00 a.m.•23 views

Past state query results are susceptible to manipulation due to multiple states with same block number

Lines of code https://github.com/code-423n4/2022-0...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/02 12:00 a.m.•23 views

Staking cooldown can be avoided for a part of the funds

Lines of code Vulnerability details Impact Part of the stake can be withdrawn immediately at any time. Proof of Concept Ratio between COOLDOWNPERIOD and UNSTAKEPERIOD = 2 only and should be much higher ex 5 or 10 l.28 COOLDOWNPERIOD = 864000; // 10 days ... UNSTAKEPERIOD = 432000; // 5 days Vario...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/02 12:00 a.m.•23 views

Whole balance self transfer set user's cooldown to zero

Lines of code Vulnerability details Impact If a user transfers to self the whole balance, then user’s cooldown resets to zero. A user will have to reset its cooldown manually to current timestamp via cooldown call to be able to unstake in the future. As a transfer to self can happen by mistake an...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/02 12:00 a.m.•23 views

PaladinRewardReserve.sol may have potential bugs if it uses new tokens as rewards

Lines of code Vulnerability details Impact PaladinRewardReserve.sol may have potential bugs if it uses new tokens as rewards. Proof of Concept Currently, PaladinRewardReserve.sol has following behaviors: mappingaddress = bool public approvedSpenders does not store the info regarding which token i...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/02 12:00 a.m.•23 views

Cooldown tricking possible

Lines of code Vulnerability details Impact Due to an approach that upon a transfer the weighted average is calculated for the cooldown, it is possible to trick it in a way that ready funds can "thrive" in the allowed window, ready to payout. Anytime it is ending, those funds can be "mixed" with...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/01 12:00 a.m.•23 views

Non unique token ID might lead to collusion

Lines of code Vulnerability details Impact Token IDs are defined as concatenation of points, total supply + 1. The total supply can decrease when split process in progress. This means that the contract might try to mint a token with an ID which already exists. Proof of Concept 1. Navigate to the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/01 12:00 a.m.•23 views

QA Report

Paladin Contest March 31, 2022 @securerodd Non-Critical 1. Inconsistent Removal of Bonus Multiplier The bonus multipliers userCurrentBonusRatiouser and userBonusRatioDecreaseuser are zeroed out in the kickaddress user, address kicker and unlockaddress user functions where an empty lock is set...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/31 12:00 a.m.•23 views

createProject can be frontrun

Lines of code Vulnerability details Impact This is dangerous in scam senario because the malicious user can frontrun and become the owner of the collection. As owner, one can withdraw paymentToken. note that collections.isForSale can be change by frontrunner Proof of Concept 1. Anyone can call...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/31 12:00 a.m.•23 views

[WP-H3] Proxy admin of the upgradeable proxy contracts can steal _borrowAsset and collateralAsset from the contracts and users' wallet

Lines of code Vulnerability details Both LenderPool and PooledCreditLine are upgradeable contract that holds users' allowances, and in certain periods, LendingPool will be holding users' funds. Use of Upgradeable Proxy Contract Structure allows the logic of the contract to be arbitrarily changed...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/30 12:00 a.m.•23 views

Borrower funds can get stuck

Lines of code Vulnerability details Impact If request status is expired then full borrower collateral amount will get stuck as withdrawableCollateral will always be 0 even though borrower has repaid 90% of the amount Proof of Concept 1. User A deposit collateral against his request using...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/30 12:00 a.m.•23 views

[WP-H7] Infinite approval to an arbitrary address can be used to steal all the funds from the contract

Lines of code Vulnerability details function startBridgeAnyswapData memory anyswapData internal // Check chain id requireblock.chainid != anyswapData.toChainId, "Cannot bridge to the same network."; address underlyingToken = IAnyswapTokenanyswapData.token.underlying; if underlyingToken ==...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/29 12:00 a.m.•23 views

Incorrect number of seconds in ONE_YEAR variable

Lines of code Vulnerability details Impact In HolyPaladinToken.sol the ONEYEAR variable claims that there are 31557600 seconds in a year when this is incorrect. The ONEYEAR variable is used in the getCurrentVotes function as well as the getPastVotes function so it is vital that the correct time i...

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

Withdrawal Requests Can Be Bypassed

Lines of code Vulnerability details Impact Withdrawals can be initiated by accounts by calling the initiateWithdrawal function. A block delay is enforced with an expiration to prevent flash loan attacks on the protocol. However, because withdrawal requests are conducted on the account's token...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/19 12:00 a.m.•23 views

getSharesForAmount returns wrong value when totalAssets == 0

Lines of code Vulnerability details Impact The getSharesForAmount function returns 0 if totalAssets == 0. However, if totalSupply == 0, the actual shares that are minted in a deposit are amount even if totalAssets == 0. Contracts / frontends that use this function to estimate their deposit when...

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

[WP-M10] Wrong formula of getSharesForAmount() can potentially cause fund loss when being used to calculate the shares to be used in withdraw()

Lines of code Vulnerability details In Collateral, the getter functions getAmountForShares and getSharesForAmount is using totalAssets instead of strategyController.totalValue, making the results can be different than the actual shares amount needed to withdraw a certain amount of baseToken and t...

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

Inflate collateral token and partial bypass minting fee by directly transferring to _strategyController

Lines of code Vulnerability details Impact This bug enables partial bypass of fee while minting Collateral tokens through Collateral.deposit. Attackers can also utilize this bug to inflate prices of Collateral tokens, creating "unfair advantages" for early minters of Collateral tokens. Proof of...

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

Manipulating PreCT Mint Logic with Direct Base Token Transfer

Lines of code Vulnerability details Impact A bad actor can steal funds from future depositors by sending the base token directly to the Strategy or StrategyController contracts. This exploit is more effective the less shares that have already been distributed, perhaps early into the launch of the...

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

DDOS - Omik

Duplicate of 119 --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/06 12:00 a.m.•23 views

Borrowers can get back collateral without repaying loans

Lines of code Vulnerability details Impact A borrower can put up collateral for a loan then immediately withdraw the collateral, effectively stealing the loan amount from the lender. Proof of Concept The previous implementation from the prior contest used this check in TimeswapPair.pay which...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/06 12:00 a.m.•23 views

Underflown variable in borrowGivenDebtETHCollateral function

Lines of code Vulnerability details Impact borrowGivenDebtETHCollateral function does never properly call ETH.transfer due to underflow. If borrowGivenDebtETHCollateral function is not deprecated, it would cause unexpected behaviors for users. Proof of Concept Here are codes which contain a...

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

Miners Can Manipulate tx.gasprice to Drain Users' Wallets in postIncomingMessages()

Lines of code Vulnerability details Impact The postIncomingMessages function is used to broadcast signed data indicating that a funds on an schain will be moved to mainnet. While the function performs proper signature verification, it doesn't prevent any arbitrary user from frontrunning the...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/03 12:00 a.m.•23 views

Fee-on-transfer/deflationary tokens cause problems

Lines of code Vulnerability details Some ERC20 tokens, such as Tether USDT, allow for charging a fee any time transfer or transferFrom is called. If a contract does not allow for amounts to change after transfers, subsequent transfer operations based on the original amount will revert due to the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/02 12:00 a.m.•23 views

LockedBalance library should drop parameters to 96/32 bits

Lines of code Vulnerability details Impact The LockedBalance contract takes 256-bit amount values but performs bit math on them as if they were 96 bit values. Bits could spill over to a different locked balance in the else part lockedBalance stores two 128-bit locked balances in one 256-bit stora...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/02 12:00 a.m.•23 views

Primary seller can avoid paying the primary fee

Lines of code Vulnerability details Impact A primary seller can circumvent the 15% fee and pay 5% as a secondary seller. Context The foundation protocol charges a 15% fee if the sale is a primary sale and 5% if it's a secondary sale. There are 2 conditions that must be met for a sale to be...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/02 12:00 a.m.•23 views

Centralisation Risk: Admin Role of TokenManagerEth can Rug Pull All Eth from the Bridge

Lines of code Vulnerability details Impact There is a Centralisation risk of the bridge where the DEFAULTADMINROLE of TokenManagerEth.sol is able to modify the ERC20 token on the SChain to any arbitrary address. This would allow the admin role to change the address to one where they have infinite...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/02 12:00 a.m.•23 views

NFT Creators Can Avoid Paying The Primary Foundation Fee

Lines of code Vulnerability details Impact The primary foundation fee is charged on the initial sale of newly minted NFTs. However, the isCreator && !nftContractToTokenIdToFirstSaleCompletednftContracttokenId check can easily be bypassed to avoid paying the primary foundation fee by selling the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/25 12:00 a.m.•23 views

No ERC20 safe* versions called on mainnet deposit

Lines of code Vulnerability details Impact Some mainnet tokens like USDT don't correctly implement the EIP20 standard and their transfer/transferFrom function return void instead of a success boolean. Calling these functions with the correct EIP20 function signatures will always revert. Non-safe...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/24 12:00 a.m.•23 views

Using transfer instead of safeTransfer allows attacker to steal all staked tokens

Lines of code Vulnerability details Impact An attacker can drain all staked tickets. Proof of Concept In the withdrawDelegationToStake function the user can transfer from one of his delegations to the TWABDelegator contract and receive vault tokens he can then unstake to get his tickets back...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/23 12:00 a.m.•23 views

Attacker may DDOS Withdrawal by Making Multiple Small Requests to withdraw()

Lines of code Vulnerability details Impact 1. Attacker call function withdraw with lowest amount eg. 1 0.000001 VUSD 2. The withdrawal request will go into waiting list in variable "withdrawals" 3. Attacker can repeat Step 1 & 2 to make Making Multiple Small Requests to withdraw until pending...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/23 12:00 a.m.•23 views

[WP-M3] TurboRouter.sol#createSafeAndDeposit*() CreateSafeAndDeposit combo methods won't work as an allowance cannot be granted to a newly created Safe for deposit

Lines of code Vulnerability details The TurboRouter.soldeposit function can be used in a multicall together with approve and pullToken from PeripheryPayments to pull tokens from msg.sender and grant allowance for the ERC4626 Safe to call asset.safeTransferFrom with the msg.sender being the router...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/23 12:00 a.m.•23 views

QA Report

1 Impact Light DoS of USDC withdrawal system Proof of Concept Currently, withdrawals are queued in an array and processed sequentially in a for loop. However, a user can post unlimited number of tiny 1 wei withdrawals. Clearing these withdrawals can be gas consuming and can delay users. It is gas...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/22 12:00 a.m.•23 views

permit() without updating nonce can result in replay attacks

Lines of code Vulnerability details Impact In PermitAndMulticall.sol the permit is called on the permitToken which allows you to sign the meta-transaction while someone else can submit it to the blockchain on your behalf. The problem is that a valid signature might be used several times in other...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/22 12:00 a.m.•23 views

batched delegate calls used can result in double spending bug

Lines of code Vulnerability details Impact In TWABDelegator.sol anyone can call the multicall function which then calls multicall in PermitAndMulticall.sol. When using batched delegatecalls the msg.sender and msg.value are not updated on every iteration and this can result in double spending bugs...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/21 12:00 a.m.•23 views

InsuranceFund depositors can be priced out & deposits can be stolen

Lines of code Vulnerability details Impact The InsuranceFund.deposit function mints initial shares equal to the deposited amount. The deposit / withdraw functions also use the VUSD contract balance for the shares computation. balance = vusd.balanceOfaddressthis It's possible to increase the share...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/21 12:00 a.m.•23 views

Withdrawals can be spammed and other users blocked

Lines of code Vulnerability details Impact The VUSD.processWithdrawals function only performs maxWithdrawalProcesses actually maxWithdrawalProcesses + 1 iterations per call. Withdrawals can be freely spammed by a griefer calling burnamount with a zero amount. All future withdrawals are blocked...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/21 12:00 a.m.•23 views

Griefing attack at VUSD withdraw queue is possible

Lines of code Vulnerability details Impact A malicious user can make lots of withdrawal requests to fill up the queue, making VUSD withdrawals unreachable for all other users Proof of Concept There is no control of the size or number of the withdrawal requests, and VUSD will burn even 1 wei amoun...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/20 12:00 a.m.•23 views

ERC4626 mints more shares than it should

Lines of code Vulnerability details bug in the mint function of the ERC4626 contract The mint function recieves an amount of shares and an address to and mints the amount of shares to the to address. The sender must transfer an amount of token, so that the ratio will be saved - shares / totalShar...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/17 12:00 a.m.•23 views

Tokens are directly transferred from briber to BribeVault

Lines of code Vulnerability details Impact Function depositBribeERC20 in BribeVault transfers tokens directly from the briber: // Since this method is called by a depositor contract, we must transfer from the account // that called the depositor contract - amount must be approved beforehand...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/17 12:00 a.m.•23 views

[WP-H0] DEFAULT_ADMIN_ROLE of BribeVault can steal tokens from users' wallets

Lines of code Vulnerability details The current design/implementation allows the DEFAULTADMINROLE of BribeVault to steal funds from any address that approved this contract up to allowance: As a DEFAULTADMINROLE, the attack is simply do the following steps: 1. grantDepositorRole to self; 2...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/17 12:00 a.m.•23 views

Missing input validation in _claim function at RewardDistributor.sol

Lines of code Vulnerability details Description All the functions present in the contract were found to have input validation except the claim functions. The function at inputs the user's value and then is processed at and is lacking all form of input validation. Impact Users can supply illegal...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/10 12:00 a.m.•23 views

Wrong logic around areOperatorsImported

Lines of code Vulnerability details Impact The logic related to the areOperatorsImported method is incorrect and can cause an operator not to be updated because the owner thinks it is already updated, and a vulnerable or defective one can be used. Proof of Concept The operators mapping is made up...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/10 12:00 a.m.•23 views

Wrong rebuild cache logic

Lines of code Vulnerability details Impact Currently, many core operations like NestedFactory.create, NestedFactory.swapTokenForTokens are dependent on the assumption that the cache is well synced before these functions are executed however this may not necessarily be the case. Proof of Concept T...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/09 12:00 a.m.•23 views

deposit wrong implementation

Lines of code Vulnerability details the user is the user of msg.sender, which is always the StakingRewards contract, instead of recepient. one of the problems that are caused by this is that anyone who deposits, will get the rewards of all the other users, because everyone shares the same user...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/02/06 12:00 a.m.•23 views

tokenOut is only required on finalize

Lines of code Vulnerability details Impact I thought of a potential rug pull from the owner: when users buy tokenOut, it is not required that the contract has already escrowed enough tokenOut. It is only required when finalizing the sale: require tokenOut.balanceOfaddressthis = totalTokenOutBough...

6.8AI score
SaveExploits0
Total number of security vulnerabilities5000