Lucene search
+L

64 matches found

Code423n4
Code423n4
added 2022/11/28 12:0 a.m.10 views

incorrect commend and/or rounding issues in AutoPxGmx and AutoPxGlp

Lines of code Vulnerability details Impact The comments on the affected lines state previewWithdraw will round up. However, the implementation, an inner call to convertToShares is made, which actually calls mulDivDown. From further inspection, this pair of functions withdraw, previewWithdraw as...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/11/28 12:0 a.m.10 views

Code is vulnerable to ERC4626 first depositor shares manipulation exploit

Lines of code Vulnerability details Proof of Concept The normal ERC4626 implementation which is not changed in the repository has a vulnerability which can result in the first depositor stealing every subsequent depositor’s funds. It works like this: 1. Vault is just deployed and Bob deposits jus...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/11/28 12:0 a.m.9 views

Underlying assets stealing in AutoPxGmx and AutoPxGlp via share price manipulation

Lines of code Vulnerability details Impact pxGMX and pxGLP tokens can be stolen from depositors in AutoPxGmx and AutoPxGlp vaults by manipulating the price of a share. Proof of Concept ERC4626 vaults are subject to a share price manipulation attack that allows an attacker to steal underlying toke...

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

First depositer can break Vault share distributions

Lines of code Vulnerability details The calculation of exchange rate for shares in PirexERC4626 Vault is done by dividing the total supply of shares by the totalAssets of the vault. The first depositor can mint a very small number of shares, then donate to the vault to manipulate the share price...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/11/28 12:0 a.m.10 views

AutoPxGlp and AutoPxGmx are not compliant with ERC4626 standard

Lines of code Vulnerability details Proof of Concept In both contracts, the previewWithdraw function has the same body // Calculate shares based on the specified assets' proportion of the pool uint256 shares = convertToSharesassets; // Save 1 SLOAD uint256 totalSupply = totalSupply; // Factor in...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/11/28 12:0 a.m.23 views

Attackers can manipulate ERC4626 price per share to take an unfair share of future users

Lines of code Vulnerability details Impact The attacker can get funds from future users, and the future users will lose their funds. Proof of Concept A malicious early user can deposit with 1 wei of asset token and get 1 wei of shares. Then he/she can send 10000e18 - 1 of asset tokens and inflate...

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

Getting collateral value by calling previewRedeem can be manipulated

Lines of code Vulnerability details Proof of Concept The code in EscrowLib is trying to calculate the value of a collateral by calling the previewRedeem method of an ERC4626 vault, when the collateral is a token from such a vault. The EIP4626 specification explicitly says The preview methods retu...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/25 12:0 a.m.9 views

Users cannot use mintWithSignature() function in most cases

Lines of code Vulnerability details Impact Function sfrxETH.mintWithSignature allows users to approve and mint in one transaction. Users will provide input param shares and function will calculate what assets amount needed to be approved in case approveMax = false. uint256 amount = approveMax ?...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/25 12:0 a.m.15 views

Some users may not be able to withdraw till the end of the rewardsCycle, due to possible underflow in the function beforeWithdraw()

Lines of code Vulnerability details Impact In xERC4626.sol If an underflow occur in the function beforeWithdraw, some users may not be able to withdraw till the end of the rewardsCycle. storedTotalAssets is a cached value of total assets, which will only include the unlockedRewards, when the whol...

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

Upgraded Q -> H from 222 [1656255302682]

Judge has assessed an item in Issue 222 as High risk. The relevant finding follows: L-02 totalAssets of erc4626 should never revert eip-4626 According to the spec, totalAssets of erc4626 should never revert MUST NOT revert. wfcash would revert if it's matured but hasn't settled...

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

Withdraw function does not conform to EIP4626

Lines of code Vulnerability details Impact The withdraw of wfCashERC4626 is not 4626 compatible. wfCashERC4626.solL186-L191 According to EIP4626 Burns shares from owner and sends exactly assets of underlying tokens to receiver. The withdraw function of ERC4626 should send the exact same amount of...

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

Re-entrancy in wfCashERC4626.withdraw() can lead to more gains in assets

Lines of code Vulnerability details This is a corrected version of the previous submission and typo mistakes corrected. Impact The withdraw function in wfCashERC4626.sol can be re-entered at the point of redeemInternal. Assume asset tokens are sent to receiver after shares are burnt, and user...

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

Re-entrancy in wfCashERC4626.withdraw() can lead to more gains in assets

Lines of code Vulnerability details Impact The withdraw function in wfCashERC4626.sol can be re-entered at the point of redeemInternal. Assume asset tokens are sent to receiver after shares are burnt, and user re-enters withdraw after redeemInternal is completed., P.S: there's a separate issue on...

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

Loss of underlying tokens due to ERC4626 non-compliance in redeem function in wfCashERC4626.sol

Lines of code Vulnerability details Impact Similar to the report I sent earlier on the issue of The withdraw function in wfCashERC4626.sol, the redeem function is missing the code that transfers the underlying tokens to the receiver. According to the EIP-4626 standard, redeem function Burns share...

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

Loss of underlying tokens due to ERC4626 non-compliance in withdraw function in wfCashERC4626.sol

Lines of code Vulnerability details Impact The withdraw function in wfCashERC4626 is missing the code that transfers the underlying tokens to the receiver. According to the EIP-4626 standard, withdraw function Burns shares from owner and sends exactly assets of underlying tokens to receiver...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/02/23 12:0 a.m.15 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/22 12:0 a.m.22 views

ERC4626.mint() doesn't mint the correct amount

Lines of code Vulnerability details Impact The ERC4626.mint function doesn't mint the correct amount of tokens. Instead of minting amount number of tokens, it should mint shares number of tokens. Since the user doesn't receive the correct amount of tokens I'd rate this issue "HIGH". Proof of...

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

ERC4626 mint uses wrong amount

Lines of code Vulnerability details Impact The docs/video say ERC4626.sol is in scope as its part of TurboSafe The ERC4626.mint function mints amount instead of shares. This will lead to issues when the asset shares are not 1-to-1 as will be the case for most vaults over time. Usually, the asset...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/02/20 12:0 a.m.68 views

ERC4626 does not work with fee-on-transfer tokens

Lines of code Vulnerability details Impact The docs/video say ERC4626.sol is in scope as its part of TurboSafe The ERC4626.deposit/mint functions do not work well with fee-on-transfer tokens as the amount variable is the pre-fee amount, including the fee, whereas the totalAssets do not include th...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/02/20 12:0 a.m.14 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
Rows per page
Query Builder