10190 matches found
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...
Add a timelock to setDefaultFeePercentage(),setCustomFeePercentageForCollateral(), setCustomFeePercentageForSafe() and setMinDebtPercentageForSaving()
Lines of code Vulnerability details Impact It is a good practice to give time for users to react and adjust to critical changes. A timelock provides more guarantees and reduces the level of trust required, thus decreasing risk for users. It also indicates that the project is legitimate. Here, no...
MarginAccount.sol - Asset transfer to insuranceFund is lost.
Lines of code Vulnerability details Impact MarginAccount.sol - Line 377, token asset is transferred into insuranceFund but not found any function to transfer asset out of insuranceFund. Proof of Concept Add any ERC20 token to Collateral list Call settleBadDebt Recommended Mitigation Steps Add...
Attacker can DOS VUSD withdrawal by spamming withdrawals of zero tokens
Lines of code Vulnerability details Impact By spamming withdrawal requests of 0, the user can clog the withdrawal queue. For anybody to withdraw their funds somebody has to first unclog it by running processWithdrawal. Depending on the number of spam withdrawals, potentially multiple times. Since...
Lack of approve after creating a safe in TurboRouter
Lines of code Vulnerability details Impact Both createSafeAndDeposit function and createSafeAndDepositAndBoost would revert on every call. Proof of Concept Both functions suffers from the same mistake so I'll detailed only on createSafeAndDeposit link 1. First the function calls...
DoS in permitAndMulticall
Lines of code Vulnerability details Impact The permitAndMulticall function does not authenticate the data argument through any signatures. Only the from, amount parameters are as chosen by the from user as these are checked in the permitAndMulticall - ERC20ticket.permit call. An attacker can...
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...
Use of external calls without reentrancy modifers
Lines of code Vulnerability details Impact In TWAPDelegator.sol functions like updateDelegatee and createDelegation have external calls without the use of reentrancy modifiers. These modifiers can serve as a strong security tool to prevent attacks when using external calls. Proof of Concept Tools...
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...
Bypass MAX_LOCK duration + External calls even when delegation is locked
Lines of code Vulnerability details Impact Delegation owner can change the MAXLOCK duration even though current lock set on delegation has not yet expired Also Delegation owner can execute calls even when delegation is locked Proof of Concept Bypass MAXLOCK: 1. User A creates a new Delegation usi...
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...
The initialize() function can be called first by an attacker
Lines of code Vulnerability details Impact In Delegation.sol the initialize function sets the owner of the contract and can only be called once. The problem is that an attacker can monitor the blockchain byte code and call the initialize function first automatically before the protocol has a chan...
CONSTANT_SETTER_ROLE is never assigned in CommunityLocker.sol
Lines of code Vulnerability details Impact In CommunityLocker.sol only the caller with the CONSTANTSETTERROLE can call the setTimeLimitPerMessage function. The problem is that the CONSTANTSETTERROLE is never assigned in the contract. Only the DEFAULTADMINROLE is assigned in the initialize functio...
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...
TokenManagerERC721.sol _exit() function uses transferFrom
Lines of code Vulnerability details Impact In TokenManagerERC721 the exit function makes use of transferFrom instead of safeTransferFrom. Tokens that don’t correctly implement the latest EIP20 spec will be unusable in the protocol as they revert the transaction because of the missing return value...
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...
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...
totalAssets() can overflow leading to the incorrect pricing of assets
Lines of code Vulnerability details The TurboSafe's totalAssets function is used by ERC4626.previewDeposit, ERC4626.previewMint, ERC4626.previewWithdraw, and ERC4626.previewRedeem. These preview functions are called directly by the non-preview versions and therefore if totalAssets has the wrong...
ERC4626RouterBase.withdraw should use a **max** shares out check
Lines of code Vulnerability details Impact The docs/video say ERC4626RouterBase.sol is in scope as its part of TurboRouter The ERC4626RouterBase.withdraw function withdraws the asset amount parameter by burning shares. function withdraw IERC4626 vault, address to, uint256 amount, uint256...
TurboRouter: Dangerous PeripheryPayments Contract
Lines of code Vulnerability details Impact As an entry contract, the TurboRouter contract plays an important role in interacting with users. And the TurboRouter contract inherits from the PeripheryPayments contract. In the PeripheryPayments contract, anyone can use the tokens and ETH in the...
TurboRouter can't interact with existing TurboSafe because of the authentication modifier
Lines of code Vulnerability details Impact The TurboRouter is not able to interact with an existing TurboSafe because of the authentication modifier of the respective TurboSafe functions. Because of that, those router functions are unusable. Proof of Concept Here's the test file I used to confirm...
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...
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...
Slurp can be frontrun with fee increase
Lines of code Vulnerability details Impact The TurboSafe.slurp function fetches the current fee from the clerk. This fee can be changed. The slurp transaction can be frontrun with a fee increase specifically targeted for the vault or the asset by the clerk and steal the vault yield that should go...
User can't create TurboSafe through TurboMaster.createSafe()
Lines of code Vulnerability details Impact A user can't create a safe because of the requiresAuth modifier in createSafe. Neither directly through the TurboMaster contract nor through the router. Proof of Concept Here's the test file I used to confirm it. I had to modify the contracts a little bi...
TurboRouter: deposit(), mint(), createSafeAndDeposit() and createSafeAndDepositAndBoost() functions may be vulnerable to FRONT-RUN attack
Lines of code Vulnerability details Impact The TurboRouter contract inherits from the PeripheryPayments contract. To execute the deposit, mint, createSafeAndDeposit and createSafeAndDepositAndBoost functions of the TurboRouter contract, the user needs to first execute the pullToken and approve...
totalFeiBoosted vars can desync in TurboSafe and TurboMaster
Lines of code Vulnerability details Impact The TurboSafe and TurboMaster contracts each keep track of totalFeiBoosted, getTotalFeiBoostedForVault, and Master keeps track of getTotalBoostedAgainstCollateral in addition. For the TurboMaster contract, these values should be the sum of the...
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...
High Risk Title
Lines of code 2022-01-dev-test-repo-findings/README.md Line 1 in 21e7cf8 | | THIS IS A TEST REPO FOR DEV PURPOSES ---|--- 2022-01-dev-test-repo-findings/README.md Line 1 in 21e7cf8 | THIS IS A TEST REPO FOR DEV PURPOSES ---|--- Vulnerability details Impact Detailed description of the impact of th...
TurboRouter: deposit(), mint(), createSafeAndDeposit() and createSafeAndDepositAndBoost() functions do not work
Lines of code Vulnerability details Impact The TurboRouter contract inherits from the ERC4626RouterBase contract. When the user calls the deposit, mint, createSafeAndDeposit and createSafeAndDepositAndBoost functions of the TurboRouter contract, the deposit and mint functions of the...
ERC4626 mints token amount, not number of shares
Lines of code Vulnerability details Impact If the number of assets is different from the number of shares, the user will get more or less shares than they expect. Users don't have to be sophisticated at all, just using the contract as intended can cause users to get more or less of the shares of ...
TurboRouter: deposit(), mint(), createSafeAndDeposit() and createSafeAndDepositAndBoost() functions do not work
Lines of code Vulnerability details Impact The TurboRouter contract inherits from the ERC4626RouterBase contract. When the user calls the deposit, mint, createSafeAndDeposit and createSafeAndDepositAndBoost functions of the TurboRouter contract, the deposit and mint functions of the...
Mint does not produce the intended amount of shares
Lines of code Vulnerability details Resubmitting this issue with a better explanation, apologize for the double submit. Impact In the mint function, it should produce shares token, but there is an inattention mistake and it produces amount tokens. Proof of Concept Assume the contract manages 1000...
Seems to be an inattention error
Lines of code Vulnerability details Shouldn't it be mintto, shares; ? Currently the using mint , one would receive as many shares as assets they transfer, which is not the intended behaviour --- The text was updated successfully, but these errors were encountered: All reactions...
Reentrancy in depositBribeERC20 function
Lines of code Vulnerability details Impact depositBribeERC20 function in BriveVault is reentrant in line 187, where an address supplied by the caller is called. A bad actor that has DEPOSITORROLE and is a contract can execute a folowing attack: 1. Create a dummy token contract, reentrant in the...
DoS by Creating Excessive Length withdrawals List.
Lines of code Vulnerability details Impact It is possible for an attacker to add a large number of withdrawals to the list withdrawals. The result is that users will be required to submit numerous processWithdrawals transactions before they are able to withdraw any of their own funds. This may...
Users Can Frontrun Calls to updateRewardsMetadata() And Claim Tokens Twice
Lines of code Vulnerability details Impact The updateRewardsMetadata function is called by the BribeVault contract by the admin role. The function will take a list of distributions which are used to update the associated reward metadata. It is expected that the merkle root will be updated to...
Turbo Safe's can be created with malicious tokens
Lines of code Vulnerability details Impact In TurboMaster.sol the createSafe function is called when the user calls a function with the same name in the TurboRouter.sol file. It then creates a new Turbo Safe with an arbitrary token supplied by the user. Since there is no whitelist of acceptable...
Rewards can be claimed if merkle proof is known
Lines of code Vulnerability details Impact The README describes the following when a voting ends: Outside of the Hidden Hand contract scope, after the Tokemak CoRE round ends, proposal data is compiled and these two things happen: - The following is derived from the data: its hash KECCAK-256 and...
Non-Standard ERC20 Tokens Are Not Supported
Lines of code Vulnerability details Impact There are several contracts which do not utilise OpenZeppelin's SafeERC20 library when performing token transfers. The Redacted Cartel suite of smart contracts intends to support bribes from all tokens, including non-standard tokens such as USDT which do...
Reentrancy in depositBribeERC20
Lines of code Vulnerability details Description The contract was found vulnerable to Reentrancy attack. It was noticed that the function depositBribeERC20 makes an external call to another untrusted address or a contract before it resolves any effects at line "" If the attacker controls the...
Arbitrary fees
Lines of code Vulnerability details Impact Function transferBribes has a parameter named fees. Essentially, it allows an admin to apply any arbitrary fees and send them to the feeRecipient. This makes no sense because admins can manipulate the amounts however they want with 0 restrictions. I see...
Slurp misses boost cap checks
Lines of code Vulnerability details Impact Missing checks of canSafeBoostVault in onSafeSlurp function in TurboMaster.solL279. The current vault deposit could already be at BoostCap. Calling slurp on this vault would add interest on the getTotalFeiBoostedForVaultV which will now becomes BoostCap...
Wrong pragma
Lines of code Vulnerability details Impact Use a buggy version of solidity with immutable. Proof of Concept The contract use immutable, and this solidity version defined in the pragma has some issues with them, as you can see here. Recommended Mitigation Steps Use at least 0.8.9 --- The text was...
onSafeSlurp() can be called by anyone on TurboMaster.sol
Lines of code Vulnerability details Impact In TurboMaster.sol the onSafeSlurp function can be called directly by anyone while the logic implies that it should only be called by the slurp function on the TurboSafe.sol contract which performs the required calculations beforehand. When onSafeSlurp i...
Use of IERC20.transfer() instead of SafeERC20.safeTransfer()
Lines of code Vulnerability details Impact There are multiple external calls to IERC20.transfer that suppose to transfer out tokens from the system. However, there are tokens like USDT that don't return any return value in their implementation of the transfer function, so calling IERC20.transfer ...
DEPOSITOR_ROLE can manipulate b.amount value
Lines of code Vulnerability details Impact Malicious DEPOSITORROLE can doing self transfer and manipulate b.amount Proof of Concept In case malicious DEPOSITORROLE inputing WETH address and putting briber == addressthis in safeTransferFrom argument which is self transfering. Therefore, it is...
admin can rug pull
Lines of code Vulnerability details In the links I provided, the admin can steal all user funds. this can cause reputation risk. --- The text was updated successfully, but these errors were encountered: All reactions...
[WP-M8] ThecosomataETH should have a min_mint_amount parameter for add_liquidity() set off-chain instead of calculating the min_mint_amount on-chain
Lines of code Vulnerability details // Calculate the min. LP token amount after slippage and attempt to add liquidity function addLiquidityuint256 ethAmount, uint256 btrflyAmount internal uint2562 memory amounts = ethAmount, btrflyAmount; uint256 expectedAmount =...
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...