Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/06/19 12:0 a.m.•14 views

division rounding error in _handleExecuteLiquidity() and _reconcile() make routerBalances and contract fund balance to get out of sync and cause fund lose

Lines of code Vulnerability details Impact variable routerBalances suppose to keep track of routers balance in contract and routers can withdraw their balance from contract. but because of division rounding error in handleExecuteLiquidity and reconcile contract uses more of its tokens than it...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•15 views

Upgraded Q -> M from 119 [1655579861612]

Judge has assessed an item in Issue 119 as Medium risk. The relevant finding follows: L01: Use .call instead of .send Line References Description It is recommended to use call instead of send because the former fowards all remaining gas with the call, while the latter has a gas limit of 2300. Thi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•9 views

Upgraded Q -> M from 117 [1655579798819]

Judge has assessed an item in Issue 117 as Medium risk. The relevant finding follows: Don't use send / transfer to send ETH This is low severity but you should avoid these and use call --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•14 views

Should it transfer underSpentAmount to _msgSender() instead of reserve?

Lines of code Vulnerability details Impact underSpentAmount is dust amount, if being transferred to reserve without any state modification. These tokens might be lost. Normally, dust amount must transfer back to only msgSender as a best practice. Proof of Concept unchecked uint256 underSpentAmoun...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•14 views

Upgraded Q -> M from 205 [1655579891083]

Judge has assessed an item in Issue 205 as Medium risk. The relevant finding follows: transfer and send methods are used inside the codebase. Since these methods use 2300 gas stipend which is not adjustable,it may likely to get broken when calling a contract's fallback function if any contract...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•9 views

Harvest is vulnerable to sandwich attack.

Lines of code Vulnerability details Impact Function harvest does multiple swaps from auraBAL - BAL/ETH BPT - WETH - AURA using BalancerVault. But it doesn’t use minAmountsOut or have a check for mimimum return amount. It makes this function vulnerable to sandwich attack. An attacker which can be ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•16 views

Fee-on-transfer support

Lines of code Vulnerability details Impact Every time transferFrom or transfer function in ERC20 standard is called there is a possibility that underlying smart contract did not transfer the exact amount entered. It is required to find out contract balance increase/decrease after the transfer to...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•8 views

Vulnerable OZ version [email protected] used

Lines of code Vulnerability details Impact An outdated and vulnerable OpenZeppelin version 3.4.0 is used. This dependency has a known high severity vulnerability: describes the possibility of initializer protected functions to be called twice, this would affect the MyStrategy.sol contract. See...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•12 views

Wrong Deadline

Lines of code Vulnerability details the deadline is the timestamp after which the transaction will revert. the goal of this field is that the caller can set a deadline for the transaction so the transaction will not succeed in any arbitrary time in the future, and after this deadline, they can...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•15 views

Any User May Transfer Rewards From AuraLocker To MyStrategy These Rewards Are Unaccounted For and Stuck

Lines of code Vulnerability details Impact Harvesting the rewards from AuraLocker incorrectly assumes that rewards are only transferred during harvest when LOCKER.getRewardsaddressthis is called. However it is possible for anyone to call AuraLocker.getRewardsaddressMyStrategy and transfer the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•13 views

Division by 0 can lead to accidentally revert

Lines of code Vulnerability details Division by 0 can lead to accidentally revert, An example of a similar issue - code-423n4/2021-10-defiprotocol-findings84 Code instances: https://github.com/code-423n4/2022-06-nested/tree/main/contracts/operators/Beefy/lp/BeefyZapBiswapLPVaultOperator.solL286...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•12 views

Should also check balanceOfRewards in _withdrawAll()

Lines of code Vulnerability details Impact withdrawAll should check that all of your positions are unwinded. It does check balanceOfPool and LOCKER.balanceOf. Then withdrawToVault in BaseStrategy.sol can transfer all want to the vault. But it doesn’t check reward tokens. want could also be one of...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•10 views

Principal payout

Lines of code Vulnerability details Impact It's possible to treat unvested aura as bribes and an attacker may cause a withdraw of AURA from the strategy to the popint where the debt in AURA to users cannot be covered by the strategy. Proof of Concept Anyone can create a valuable token in which it...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•17 views

auraBAL can be stuck into the Strategy contract

Lines of code Vulnerability details Impact The internal harvest function defined is responsible to claim auraBAL from the aura locker and within the function it swaps them to auraBAL - BAL/ETH BPT - WETH - AURA, finally it locks AURA to the locker to increase the position. For claiming auraBAL it...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•11 views

Yield can be lost due to not specifying limit when transferring auraBAL to BAL/ETH BPT

Lines of code Vulnerability details Impact In harvest, when swapping auraBAL to BAL/ETH BPT the limit variable which specifies the minimum amount of tokens that are to be received when singleSwap.kind=GIVENIN is set to 0. This means that when the swap is made, the transaction can be frontrun and...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•13 views

Upgraded Q -> M from 189 [1655579836940]

Judge has assessed an item in Issue 189 as Medium risk. The relevant finding follows: N02 Using send to send ETH could run out of gas. You have to be sure of the logic of the recipient. --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•10 views

Operator may be removed without checking whether are there fund locked in that operator.

Lines of code Vulnerability details Impact Operator may be removed without checking whether are there fund locked in that operator. Locked fund may not be able to withdraw unless operator is being added back. Proof of Concept /// @inheritdoc INestedFactory function removeOperatorbytes32 operator...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•10 views

_harvest has no slippage protection when swapping auraBAL for AURA

Lines of code Vulnerability details Impact Single swaps of harvest contains no slippage or deadline, which makes it vulnerable to sandwich attacks, MEV exploits and may lead to significant loss of yield. Proof of Concept When using BALANCERVAULT.swap here and here, there is no slippage protection...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•11 views

Upgraded Q -> M from 180 [1655579854185]

Judge has assessed an item in Issue 180 as Medium risk. The relevant finding follows: Use of send might fail in the future send only forward 2300 gas which may break when gas cost change in a future ETH upgrade see: function withdrawAll public payable onlyOwner...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•13 views

_harvest rewards can be stolen because it doesn't implement any slippage bounds

Lines of code Vulnerability details Impact Harvested funds stolen Proof of Concept harvest does not implement any kind of minimum out when calling the 3 consecutive swaps L249, L263 and L275 to get from auraBal to Aura. An attacker could easily sandwich the least liquid pool and steal all the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•13 views

Missing slippage protection for autocompounding auraBAL rewards into AURA

Lines of code Vulnerability details Impact Autocompounding auraBAL rewards into AURA requires multiple swaps auraBAL - BAL/ETH BPT - WETH - AURA within MyStrategy.harvest. The swaps are at risk of being front-run / sandwiched, resulting in a loss of funds. Since MEV is very prominent I think the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•9 views

Division by 0

Lines of code Vulnerability details Division by 0 can lead to accidentally revert, An example of a similar issue - code-423n4/2021-10-defiprotocol-findings84 Code instances: https://github.com/code-423n4/2022-06-nested/tree/main/contracts/operators/Beefy/lp/BeefyZapBiswapLPVaultOperator.solL286...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•11 views

_processExtraToken() in _sendBadgerToTree() will transfer BADGER again

Lines of code Vulnerability details Impact sendBadgerToTree sends amount BADGER to BADGERTREE. However processExtraToken in sendBadgerToTree also sends amount BADGER to the vault. it sends amount BADGER twice. It could result in revert if it doesn't have enough balance of BADGER. Proof of Concept...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•13 views

Loss of yield can occur due to not specifying minAmountsOut when exiting BAL/ETH pool

Lines of code Vulnerability details Impact When exiting the BAL/ETH pool, due to not specifying anything for minAmountsOut an attacker can frontrun the transaction and cause a large change in price in the pool. This in turn leads to a large impermanent loss which is realised when the strategy bur...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•11 views

Upgraded Q -> M from 155 [1655579831823]

Judge has assessed an item in Issue 155 as Medium risk. The relevant finding follows: ETH send return value is ignored while is gas limited The use of send / call to send ETH may have unintended outcomes on the eth being sent to the receiver. Eth may be irretrievable or undelivered if the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•6 views

Update initializer modifier to prevent reentrancy during initialization

Lines of code Vulnerability details Impact The solution uses: "OpenZeppelin/[email protected]". This dependency has a known high severity vulnerability: Which makes MyStrategy contract vulnerable contract MyStrategy is BaseStrategy, ReentrancyGuardUpgradeable ... function...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•9 views

Timelock has a rug vector bypass

Lines of code Vulnerability details Impact Having a bypass for the timelock defeats the purpose of a timelock. Anyone in the EMERGENCYROLE, or who is able to compromise the key is able to immediately make changes at the expense of users. Proof of Concept executeEmergency can take any action on...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•10 views

Wrong Deadline

Lines of code Vulnerability details the deadline is the timestamp after which the transaction will revert. the goal of this field is that the caller can set a deadline for the transaction so the transaction will not succeed in any arbitrary time in the future, and after this deadline, they can...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•13 views

Claiming BADGER bribes and sweeping BADGER rewards tokens is broken

Lines of code Vulnerability details Impact Twice the amount of BADGER tokens are sent to badgerTree within the MyStrategy.sendBadgerToTree function. Due to insufficient BADGER tokens, this will break the following functionalities: MyStrategy.sweepRewardToken L107-L113 function...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•16 views

Badger rewards from Hidden Hand can permanently prevent Strategy from receiving bribes

Lines of code Vulnerability details Impact If the contract receives rewards from the hidden hand marketplace in BADGER then the contract tries to transfer the same amount of tokens twice to two different accounts, once with sendBadgerToTree in MyStrategy and again with processExtraToken in the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•11 views

Emergency withdrawals are broken

Lines of code Vulnerability details Impact Usually, in emergency situations, contracts will be paused by the owner to prevent further damage. To withdraw all funds, the MyStrategy.prepareWithdrawAll function has to be manually called right before BaseStrategy.withdrawToVault can be called see...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•9 views

BADGER bribes can not be claimed

Lines of code Vulnerability details sendBadgerToTree will send BADGER twice and therefore fail. It is sending it to the BADGERTREE in sendBadgerToTree, and then continues to send the same amount to the vault in processExtraToken. Impact BADGER rewards cannot be claimed. The contract is trying to...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•12 views

Upgraded Q -> M from 47 [1655572104366]

Judge has assessed an item in Issue 47 as Medium risk. The relevant finding follows: 1. Unsafe use of transfer/transferFrom with IERC20 Some tokens do not implement the ERC20 standard properly but are still accepted by most code that accepts ERC20 tokens. For example Tether USDT's transfer and...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•13 views

harvest() can be frontrun, to make the AURABAL token stuck

Lines of code Vulnerability details Impact In the LOCKER contract https://etherscan.io/address/0x3Fa73f1E5d8A792C80F426fc8F84FBF7Ce9bBCACcode anyone can call getreward for any account, therefore an attacker can frontrun an authorized actor, by calling getrewardaddressmyStrategy, before the harves...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•8 views

Override function but with different argument location

Lines of code Vulnerability details IYearnVault.sol.withdraw inherent IStakingVault.sol.withdraw but the parameters does not match --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•12 views

prepareWithdrawAll should not be external

Lines of code Vulnerability details Impact Despite commented as Internal Core Implementations, prepareWithdrawAll is external. There also lack guarantee that prepareWithdrawAll is called before withdrawAll. Proof of Concept /// ===== Internal Core Implementations ===== function prepareWithdrawAll...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•12 views

User can bypass entryFee by sending arbitrary calldata to ParaSwap operator

Lines of code Vulnerability details Impact Any user is able to bypass the entryFee collection when using NestedFactory.create by passing in arbitrary calldata when using the ParaSwap router. High level, a user can pass in calldata to swap from a miniscule amount of input token to an ERC777 with...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•11 views

Yield can be lost due to not specifying limit when transferring WETH to Aura

Lines of code Vulnerability details Impact In the harvest function, when the contract swaps WETH to Aura, limit is set to 0 allowing an attacker to front run the transaction and cause substantional loss of yield. swapSingleSwap singleSwap, FundManagement funds, uint256 limit, uint256 deadline...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•8 views

Vaults are vulnerable to sandwich attacks due to missing slippage checks

Lines of code Vulnerability details Impact Swaps in the new Beefy Vault can have almost all funds taken via MEV sandwich attacks because there is no slippage control Proof of Concept The last argument to addliquidity is the minimum amount to mint, which is zero here: File:...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•12 views

YearnCurveVaultOperator's withdrawETH doesn't check for minAmountOut

Lines of code Vulnerability details withdrawETH effectively do not control the output token result of withdrawal as Vault token is ETH in this case, while WETH balance is controlled and no ETH - WETH deposit is done. I.e. any calls to withdrawETH with non-zero minAmountOut will fail as WETH balan...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•16 views

It lacks slippage control when swapping tokens

Lines of code Vulnerability details Impact In balancer document: In the above example code, we set our tokenBAL limit to 0, which means we are willing to accept 100% slippage on our trade. That is generally a very bad idea It lacks slippage control when calling BALANCERVAULT.swap, making it suffe...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•10 views

_harvest() vulnerable to sandwich attacks due to missing slippage checks

Lines of code Vulnerability details Impact All funds that should have been harvested can be taken via MEV sandwich attacks because there is no slippage control. Proof of Concept The two swap calls pass zero as the third argument: File: contracts/MyStrategy.sol 1 249 uint256 balEthBptEarned =...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•11 views

Attacker can deposit for MyStrategy in AuraLocker make it unable to withdraw all.

Lines of code Vulnerability details Impact Function withdrawToVault in BaseStrategy will withdraw all funds from strategy to vault, it uses an internal function withdrawAll in MyStrategy. In this function, there is a check that no locked balance is still in AuraLocker. An attacker can keep deposi...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•10 views

removeVault operator functions can freeze the funds invested there

Lines of code Vulnerability details Vault removal methods don't check if there are any funds still invested with the vault being removed. In the same time after vault was removed withdraws from it will not be available as non-zero checks in the corresponding functions will fail. Setting severity ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•21 views

Swap routes are hardcoded for pools that do not exist yet.

Lines of code Vulnerability details Impact The route for swapping auraBAL to AURA is hardcoded and does not allow any flexibility. Proof of Concept The route for this swap is hardcoded to auraBAL - BAL/ETH BPT - WETH - AURA, with specific pool IDs. This seems to be done for the sake of simplicity...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•10 views

Beefy vault can be removed without withdrawing all deposited tokens. Causing these token to be locked forever unless an owner is added this vault back.

Lines of code Vulnerability details Impact Beefy vault can be removed without withdrawing all deposited tokens. Causing these token to be locked forever unless an owner is added this vault back. Proof of Concept function removeVaultaddress vault external onlyOwner requirevaultsvault != address0,...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•10 views

Yield may be stolen by MEV bot by sandwiching harvest()

Lines of code Vulnerability details Impact Yield may be stolen by MEV bot by sandwiching harvest. Because of minimum output amount of swapping is set to 0. Which mean MEV bot can pump price of AURA token to the highest price before your strategy swap to let you buy AURA token at an incredibly hig...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•13 views

_harvest() performs market swaps without slippage control and is a subject to sandwich attacks

Lines of code Vulnerability details As a result trades happen at a manipulated price and end up receiving fewer tokens than current market price dictates. Placing severity to medium as impact here is a partial fund loss conditional only on big enough asset amount to be swapped: sandwich attacks a...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•11 views

Attacker can steal money from the initializer function

Lines of code Vulnerability details Impact Your Using old openzeplin Verision which the initializer function is vulnerable to and an attacker can call it twice after it’s been initliazed and since it approves max tokens to those contract. Which then after it’s first initialization the attacker...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:0 a.m.•15 views

Low Value Definition On The Slippage

Lines of code Vulnerability details Impact Trades can happen at a bad price and lead to receiving fewer tokens than at a fair market price. The attacker's profit is the protocol's loss. Proof of Concept MyStrategy contract has low slippage checks which can lead to being vulnerable to sandwich...

6.9AI score
SaveExploits0
Total number of security vulnerabilities10190