Lucene search
+L
Code423n4Recent

10190 matches found

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

Users with bad collateralization ratio from either rebase/nonrebasevault can bypassliquidation

Lines of code Vulnerability details Impact users with an unsafe collateralization ratio who are supposed to be liquidated can manipulate the rigidRedemption feature to bypass the liquidation. From the code above its noted that being a rigidRedemption provider one can can put their collateral amou...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•14 views

In LybraStETHVault.sol (LybraEUSDVaultBase.sol) a user could rigid redeem an amount more than their deposited collateral when the collateral ratio of the user goes below 100% even if they have been super-liquidated.

Lines of code Vulnerability details Impact If the collateral ratio of a user goes below 100%, the user would be able to redeem all of their eUSD for a collateral amount greater than their depositedAssetuser even after they have been super-liquidated. For eg, let us say we have a user X. Now, in...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•8 views

Reward distribution logic of the ProtocolRewardsPool and EUSDMiningIncentives contracts are fundamentally wrong, resulting in excess rewards for users

Lines of code Vulnerability details Impact The reward distribution logic of the ProtocolRewardsPool and EUSDMiningIncentives contracts effectively allow a user to mint much more rewards than they should be allowed to. This is possible because, unlike a true implementation of the synthetix staking...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•4 views

Using msg.value instead of sharesAmount while depositing Ether through Lido can lead to a loss of funds as stETH is not pegged to ETH with 1:1 ratio

Lines of code Vulnerability details Impact In case stETH is not pegged to ETH with 1:1 ratio, the LybraStETHVault.sol will still store all deposits in ETH value after converting to stETH. Also, the emitted event does not return the received stETH amount sharesAmount, but msg.value twice. This mig...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•18 views

Potential Unauthorized Flash Loan Execution and Share Burning due to Lack of Permission Checks

Lines of code Vulnerability details Impact The executeFlashloan function in the provided contract allows any user to execute a flash loan on behalf of another user without explicit permission. This could potentially lead to an unauthorized execution of flash loans and unexpected share burnings if...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•9 views

Getting exchange rate function is wrong

Lines of code Vulnerability details Impact Unmatched function for getting the exchange rate can lead to being unable to mint PeUSD when depositing ETH into Rocket Pool. Proof of Concept The interface used in LybraRETHVault.sol for getting the exchange rate does not match the target contract RETH...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•11 views

First user can drain funds from staking contract

Lines of code Vulnerability details Impact If the first user locks an extremely small amount of tokens 1 wei, he can manipulate the reward that is supposed to receive. After locking a small amount, he can unlock it before the second user interacts with the contract. See PoC for more details. Note...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•14 views

Proposal remains open to votes for only 3 blocks instead of 7 days

Lines of code Vulnerability details Impact LybraGovernance contract only allows to vote during the first 3 blocks after the snapshot is taken. Assuming it takes roughly 12 seconds per 1 block on Ethereum, it is only 36 seconds to decide and vote for a proposal. This would be too fast for a regula...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•16 views

Missing require statements in onlyRole/checkRole modifiers

Lines of code Vulnerability details In LybraConfigurator.sol, there are two modifiers, checkOnlyRole and checkRole from GovernanceTimelock, designed to verify whether the msg.sender is authorized. However, these modifiers lack "require" statements to enforce the condition that the returned boolea...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•8 views

A minimum of 1/3 of total esLBR supply required for the proposal to pass

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. If a quorum is set too high, the minimum number of cast voted required for a proposal to be successful would be harder to reach. Proof of Concept Provide direct links to all referenced code in GitHub. A...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•13 views

Exploiter can avoid negative Lido rebases stealing funds from EUSD vaults

Lines of code Vulnerability details Description Lybra keeps the exact amount of collateral as deposited ignoring any lido rebases. That allows malicious users to sandwich negative rebase transactions with depositing and withdrawing their stETH saving the exact amount as before negative rebase. Th...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•12 views

The LybraRETHVault.depositEtherToMint doesn't keep record of user's ether deposits which results in loss for the user.

Lines of code Vulnerability details Impact High: User will lose his deposited ether. Proof of Concept The collateralAsset address variable which is used in LybraPeUSDVaultBase is assumed to be stETH token address Now the depositEtherToMint function from contract LybraRETHVault.sol which inherits...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•6 views

Withdraw fee discounting using self rigidRedemption

Lines of code Vulnerability details Description There is no restriction for self rigidRedemption so that allows one to repay and withdraw instantly part of the collateral. That allows us to instantly withdraw with less fee paid. Impact It may be used for malicious scenarios with flashloan for...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•15 views

Token transfer is not handled properly in stakerewardV2pool.sol.

Lines of code Vulnerability details Impact Token transfer is not handled properly in stakerewardV2pool.sol. Many stakingtokens return a bool as transfer success , best practice is receiving the output as a boolean and revert the transaction if it is false. If it is not handled properly then it ma...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•10 views

users can pay the fees without burning the amount in their balances

Lines of code Vulnerability details Impact users can set the amount in the repay function to the amount that is equal to his fee and in this case the users can pay the fee without burning the amount in their balancesthe caller set himself as provider and onBehlaf in the same time. more details in...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•14 views

Voting period hardcoded to 3 blocks

Lines of code Vulnerability details Impact Here in the Governance contract, the voting period is locked to 3 blocks. function votingPeriod public pure override returns uint256 return 3; function votingDelay public pure override returns uint256 return 1; This is a direct bug because if we take a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•16 views

The function will not work properly on Optimism due to use of block.number

Lines of code Vulnerability details Impact On Optimism, the block.number is not a reliable source of timing information and the time between each block is also different from Ethereum. This is because each transaction on L2 is placed in a separate block and blocks are not produce at a constant...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•11 views

Wrong validation when setting BadCollateralRatio

Lines of code Vulnerability details Impact Setting of BadCollateralRatio has a slight bug //@audit-issue bug here, should be - 1e19 function setBadCollateralRatioaddress pool, uint256 newRatio external onlyRoleDAO requirenewRatio = 130 1e18 && newRatio = 160 1e18, "eUSD vault safe...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•15 views

User with bad collateralization ratio less than 125 cent can bypass super liquidation

Lines of code Vulnerability details Impact Users with a bad collateralization ratio such as less than 1251e15 can bypass super liquidation by just getting liquidated normally with the help of malicious liquidators/keepers where they might lose at most only 50% of their deposited collateral instea...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•16 views

Flashloan/onFlashLoan() does not comply eip-3156

Lines of code Vulnerability details Impact In PeUSDMainnetStableVision.sol, File: contracts/lybra/token/PeUSDMainnetStableVision.sol interface FlashBorrower /// @notice Flash loan callback /// @param amount The amount of tokens received /// @param data Forwarded data from the flash loan request /...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•15 views

_quorumReached does not add all votes

Lines of code Vulnerability details Impact quorumReached is a function that checks if the Amount of votes already cast passes the threshold limit. But the function does not add all votes //@audit-issue quorum reached does not add all votes function quorumReacheduint256 proposalId internal view...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•19 views

Reentrancy may allow a customer to steal funds

Lines of code Vulnerability details Impact The reentrancy in the vested token can be used by a customer if the execution can be hijacked before the balance change occurs. Let’s consider function withdraw. Firstly, the balance is checked and then if there is enough token surplus to withdraw, the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•15 views

[M] Hardcoded address will not remain consistent across other chains

Lines of code Vulnerability details Impact The hardcoded address for the LBR token will not remain consistent across other chains, such as Polygon, Avalanche, Arbitrum and BSC for example. IEUSD0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2.balanceOfethlbrLpToken Proof of Concept Hardcoding the addre...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•18 views

stETHs rebase profit stealing

Lines of code Vulnerability details Description It's possible with flashloan from AAVE to capture a big shares amount of eUSD, after each stETH rebase exploiter will buy excessive income, which leads to eUSD rebase due to shares burning, so the exploiter will have most of burned eUSD because they...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•10 views

Voting Delay set to 1 block, would not allow users enough time to buy tokens, or delegate their votes before the voting starts

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. With a voting delay set to 1 block, users would not have enough time to buy tokens, or delegate their votes. Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•9 views

Keepers are allowed to use the full EUSD balance of any provider to liquidate funds

Lines of code Vulnerability details Impact Keepers are allowed to use the full EUSD balance of any provider to liquidate funds. Normally, the keeper should only be allowed to use max of the amount that the provider approves to LybraStETHVault. But the check only checks if the provider gives an...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/03 12:0 a.m.•11 views

Invalid Access Control Modifiers

Lines of code Vulnerability details Impact The LybraConfigurator is the contract in charge of all core functionality in the Lybra ecosystem. However, the modifiers checks here are invalid. So anybody could call any function in the protocol. All funds could be stolen and governance overturned Proo...

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

A Dutch trade could end up with an unintended lower closing price

Lines of code Vulnerability details Impact notTradingPausedOrFrozen that is turned on and off during an open Dutch trade could have the auction closed with a lower price depending on the timimg, leading to lesser capability to boost the Rtoken and/or stRSR exchange rates as well as a weakened...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/26 12:0 a.m.•17 views

The broker should not be fully disabled by GnosisTrade.reportViolation

Lines of code Vulnerability details Impact GnosisTrade and DutchTrade are two separate auction systems where the failing of either system should not affect the other one. The current design will have Broker.sol disabled when reportViolation is invoked by GnosisTrade.settle if the auction's cleari...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•14 views

Missing slippage protection leads to potential sandwich of small transfers or blocking the swap feature

Lines of code Vulnerability details Impact The swap module is invoked with a default of coinswaptypes.InputCoin: transferredCoin, Address: recipient.String, coinswaptypes.OutputCoin: swapCoins, Address: recipient.String. The swap module makes sure that in tokens of the swap are limitted to...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•9 views

AutoSwapThreshold field is not checked for exceeding MaxAutoSwapThreshold constant

Lines of code Vulnerability details Impact validateAutoSwapThreshold function has a problem that does not check the AutoSwapThreshold field is less than or equal to the MaxAutoSwapThreshold constant, this can caused that a malicious user could set the AutoSwapThreshold field to a value that is...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•6 views

An error could lead to coins not being returned to user

Lines of code Vulnerability details Impact The function swapCoins does check that SendCoins does receive them correctly here but not when sending them to the user here Proof of Concept If there is an error returning the swapped coins to the user, they will remain locked. There is no history of...

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

Slippage protection minOut autoSwapThreshold is not effective when swapping the token

Lines of code Vulnerability details Impact In the current model, the minimum output minOut amount for the auto-swap is set to match the autoSwapThreshold, which is fixed at 4 CANTO. This configuration might result in potential market risks due to fluctuations in the value of CANTO, potentially...

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

Users potentially cannot have Canto token swapped automatically when bridging assets to the Canto Network

Lines of code Vulnerability details Impact If the field AutoSwapThreshold is set to zero value, the logic that compares standardCoinBalance to the autoSwapThreshold always evaluates to false so there isn't any swap operation from bridged asset to Canto token for users. Therefore, the purpose of t...

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

Lack of checks for non-zero values

Lines of code Vulnerability details Impact Lack of propper parameter validation Proof of Concept The GetPoolByLptDenom function takes lptDenom as an input parameter and uses it right away as an argument to retrieve a pool from the KVStore. However, if it is empty or invalid, the function will...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•17 views

Pre-defined limit is different from the spec.

Lines of code Vulnerability details Impact In the spec, the pre-defined limit of ETH is 0.01 ETHs. But the actual limit in the code is not 0.01 ETH which could result in misleading. Proof of Concept In the spec, it said that the pre-defined limit of ETH is 0.01 ETHs For risk management purposes, ...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•15 views

Lack of input validation

Lines of code Vulnerability details Impact There is no input sanitizer implemented for the transfertypes.FungibleTokenPacketData data variable. Proof of Concept After "unmarshaling" the packet, which checks if there is an error, it is used right away without further checking the fields inside it,...

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

Canto pool could be drained.

Lines of code Vulnerability details Impact It was written that there a limit for 10 USDC /10 USDT /0.01 ETH, which currently equals to 10 USDT/ 10 USDC/ 18 USDT almost. These limits are for 4 Canto. Which means code accepts the Canto price at max: 2,5 USDC or equavalent. It is also written in the...

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

Coinswap::Types::Params have a bad configuration for ETH max swap amount

Lines of code Vulnerability details Impact There is an error in the code regarding the maximum a user can spend for the 4 Canto swap to minimize risk of slippage. While the documentation claim it to be 0.01 ETH, in the code it is defined as 0.1 ETH, which is a 10x value increase and significant...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•7 views

Lack of token pair existence

Lines of code Vulnerability details Impact There is no check that ensures the token pair does exists. Proof of Concept he code assumes that if a token pair ID is not registered or if the token pair is not enabled, the conversion process will be skipped. However, there is no explicit check or...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•10 views

users being overcharged or not receiving the full amount of coins as they expected caused by the incorrect calculation of the amount of coins bought

Lines of code Vulnerability details Impact in the GetInputPrice function there a line inputAmtWithFee := inputAmt.Mulsdk.NewIntFromBigIntdeltaFee.BigInt tat make a problem so here we have in that line in the GetInputPrice function, the sdk.NewIntFromBigInt function it's takes the big.Int as an...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•20 views

Potential risk of using swappedAmount in case of swap error

Lines of code Vulnerability details Impact In case the swap operation failed, the module should continue as is with the erc20 conversion and finish the IBC transfer. This is the relevant part of the code that swallows the error: swappedAmount, err = k.coinswapKeeper.TradeInputForExactOutputctx,...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•4 views

packet.DestinationChannel IS CHECKED AGAINST THE WhitelistedChannels, BUT packet.SourceChannel SHOULD BE CHECKED INSTEAD, AS PER THE PROTOCOL DESIGN REQUIREMENTS

Lines of code Vulnerability details Impact In the ibccallbacks.OnRecvPacket function, the Source Channel of the transferred packet is required to be checked against the WhitelistedChannels of the module. If the Source Channel of the packet is not in the WhitelistedChannels list then the auto swap...

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

Add check to disallow creation of Standard Denomination pool

Lines of code Vulnerability details Impact CreatePool does not check if the counterpartyDenom is a Standard Denomination. This can lead to creation of pools where the StandardDenom and the CounterpartyDenom are the same. Code reference // CreatePool create a liquidity that saves relevant...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•12 views

Missing store revert in case of erc20 conversion error can lead to loss of funds

Lines of code Vulnerability details Impact The module is expected to have no changes in case a erc20 conversion failed. It was implemented by swallowing the error with a log and continuing with the flow finishing the IBC transfer. This is the relevant code section: if , err =...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•9 views

There is no deadline for swaps

Lines of code Vulnerability details Impact If the receiver that is specified in the IBC callback doesn't have enough tokens for interacting with the Canto network defaults at 4 CANTO, then the middleware is going to swap the tokens for some CANTO tokens on the Canto network and convert the rest t...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/06/23 12:0 a.m.•21 views

Default coin spend limit was set wrong for ETH

Lines of code Vulnerability details Impact It is stated in the README that some spend limit are configured for the swaps. This is a security precaution to avoid spending too much tokens for the default 4 CANTO tokens in order to onboard the users if their balance is less than 4 tokens. As a...

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

The validation of the source channel is performed incorrectly

Lines of code Vulnerability details Impact There is a potential risk of unauthorized sources sending assets to the Canto Network and automatically swapping transferred tokens for Canto tokens. Proof of Concept When bootstrapping Canto Network, node operators config channel ID for the onboarding...

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

The Swap action will always fail if the value of the deposited IBC asset is less than the value of autoSwapThreshold Canto

Lines of code Vulnerability details Impact The Swap action will always fail if the value of the deposited IBC asset the value of autoSwapThreshold Canto. This is not a bug, but it's very inconvenient for users and makes the goal of the onboarding module fail. Let's asssume that: 1 Canto = 0.1 USD...

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

Almost all of the github.com/cosmos/cosmos-sdk/types will be deprecated

Lines of code Vulnerability details Impact Codes in the scope won't work if the would be updated. Proof of Concept It is clearly seen that in the it is fixed version of v0.45.9. However, in next version of cosmos-sdk all of the Int methods will be deprecated. Almost all of the code in the scope i...

6.9AI score
SaveExploits0
Total number of security vulnerabilities10190