Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2021/09/07 12:0 a.m.5 views

Does the cosmos-sdk listen to only 1 gravity.sol contract address?

Handle tensors Vulnerability details Recently Thorchain which uses cosmos, was hacked because the Thorchain environment listened to emitted events from routers other than the intended one. This allowed a hacker to create a malicious router. Within the ethmainloop of the orchestrator, is the...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/09/06 12:0 a.m.7 views

Consider using a solidity version >= 0.8.0

Handle tensors Vulnerability details Impact Many spots in the contracts are subject to overflows/underflows. In some instances this is the desired behavior, but this is rarely the case. Consider upgrading certain contracts to 0.8.0 and above to protect against this when it is not desired. An...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/09/06 12:0 a.m.7 views

proRataYears is sometimes 0.

Handle tensors Vulnerability details Impact Not sure what the implications could be. Consider L24, Incentives.sol. Its possible for this to divide to 0 since INTERNALTOKENPRECISION is 10^8 and constants YEAR is around 10^9. Which means if timeSinceLastClaim is a few seconds or minutes, the...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/09/06 12:0 a.m.8 views

Settle Portfolio state could be griefed.

Handle tensors Vulnerability details Impact It could be possible for a user to get a portfolioState that is large enough to be unfeasible to compute, either because of the block gas limit or simply because gas fees are so high and the code itself is complex. If this is possible, than he could tak...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/09/05 12:0 a.m.15 views

Attackers can force liquidations by borrowing large amounts of an asset.

Handle tensors Vulnerability details Impact Consider an attacker who borrows enough to greatly increase the oracle rate. It is claimed that arbitrageurs will come in a fix this discrepancy before the attacker has a chance to profit off of his price manipulation: "Over the next 1 hour, the effect ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/09/05 12:0 a.m.11 views

Possible reentrancy in balanceOf, decimals, mint

Handle tensors Vulnerability details Impact Registering tokens that aren't properly vetted can lead to a loss of funds if the token has callbacks. CREAM finance got hacked in a similar way because the ampleforth token had a callback in the transfer method that wasn't noticed when they vetted it...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/09/05 12:0 a.m.10 views

Can't call external functions internally

Handle tensors Vulnerability details Impact Within GovernerAlpha.sol, certain functions are locked because of the improper modifier. addressthis cannot call external functions in lines L470-497. Proof of Concept Recommended Mitigation Steps Change external to internal. --- The text was updated...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/09/05 12:0 a.m.8 views

Can a small order change the lastImpliedRate significantly?

Handle tensors Vulnerability details Impact Consider the following attack vector. An attacker risks a very small amount of capital $0.01, for example to alter the lastImpliedRate, losing the $0.01 by executing a very bad trade. If no one is willing to arbitrage the rate down for the $0.01, or no...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2021/09/05 12:0 a.m.7 views

Time window must be chosen carefully

Handle tensors Vulnerability details Impact The variable timeWindow in the formula of valuation/README.md must be chosen carefully. In fact, it should probably vary with the amount of user volume the protocol has on each asset. Consider what happens when timeWindow is very small 5min. A price...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/09/05 12:0 a.m.12 views

Idiosyncratic fCash valuation is incorrect

Handle tensors Vulnerability details Impact The docs say that: "Markets may not always trade at the exact maturities of all fCash assets. fCash that does not fall on an exact maturity is called idiosyncratic fCash. To value these assets, Notional takes the linear interpolation of the rates of the...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/09/05 12:0 a.m.19 views

.latestRoundData() does not update the oracle - ExchangeRate.sol

Handle tensors Vulnerability details Impact The method .latestRoundData on an oracle returns the latest updated price from the oracle, but this is not the current price of an asset. To get an accurate current price you need to query it by calling the oracle and waiting for a callback to fulfill t...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2021/09/05 12:0 a.m.6 views

TokenHandler.sol, L174 - .transfer is bad practice

Handle tensors Vulnerability details Impact The use of .transfer to send ether is now considered bad practice as gas costs can change which would break the code. See: Proof of Concept TokenHandler.sol, L174 Recommended Mitigation Steps Use call instead, and make sure to check for reentrancy. ---...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/09/04 12:0 a.m.9 views

Reentrancy Bug in TimelockController.sol

Handle leastwood Vulnerability details Impact Notional's governance framework utilises a fork of Compound's Governor Alpha and ERC20 token. These are denoted specifically as the GovernorAlpha.sol and NoteERC20.sol contracts. However, the GovernorAlpha.sol has a key difference when compared to...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/30 12:0 a.m.7 views

DOS by Frontrunning NoteERC20 initialize() Function

Handle leastwood Vulnerability details Impact The scripts/ folder outlines a number of deployment scripts used by the Notional team. Some of the contracts deployed utilise the ERC1967 upgradeable proxy standard. This standard involves first deploying an implementation contract and later a proxy...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2021/08/29 12:0 a.m.6 views

_transfer what happens if sender==recipient

Handle gpersoon Vulnerability details Impact The function transfer of nTokenAction.sol uses temporary variables and updates the sender and recipient separately. This is a dangerous constructions because the update of the recipient could overwrite the update of the sender. This has led to several...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/27 12:0 a.m.13 views

executing instruction outside code can lead to failing transfer

Handle Omik Vulnerability details Impact in the , is handling transfer and transferfrom, and checking the return value of the transfer and transferfrom, but the checking is happening outside the code, therefore if the transfer successfull it will still return false Proof of Concept 1. deploy this...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/26 12:0 a.m.23 views

Arbitrary Logic Enables ERC20 Theft

Handle ElliotFriedman Vulnerability details Severe Issue: ERC20 Token Theft Using Arbitrary Logic There are 2 ways that this bug can be used to drain funds from the bridge. Both are catastrophic and result in total loss of funds. The 1st method is horrible, the second method is diabolical as it c...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2021/08/26 12:0 a.m.9 views

Owner has a rugpull function

Handle tensors Vulnerability details Impact The owner of the contract has a rugpull function. This can be unsafe if the private key for the owner account falls into the wrong hands, allowing instant withdrawal of all the funds. In general, having a single point of failure like this is not...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/26 12:0 a.m.9 views

UberOwner has too much power

Handle tensors Vulnerability details Impact The Uber Owner has too much power within the system. This makes the protocol closer to a centralized prediction market whose rules are determined by the Uber Owner. Proof of Concept The above functions can be used by the Uber Owner to completely change...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/26 12:0 a.m.8 views

Self transfer can lead to unlimited mint

Handle Omik Vulnerability details Impact The implementation of the transfer function in the is the different from the usual erc20 token transfer function, this happen because it count the incentive that the user get, but the with self tranfer it can lead to unlimited mint, because it makes the...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/25 12:0 a.m.7 views

Deposits don't work with fee-on transfer tokens

Handle cmichel Vulnerability details There are ERC20 tokens that may make certain customizations to their ERC20 contracts. One type of these tokens is deflationary tokens that charge a certain fee for every transfer or transferFrom. Others are rebasing tokens that increase in value over time like...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/25 12:0 a.m.4 views

Function setAmicableResolution is susceptible to front-running attacks

Handle shw Vulnerability details Impact The setAmicableResolution function in RCMarket allows the admin to override the oracle's answer. However, this function is susceptible to front-running attacks where a user could set the winning outcome to the oracle's answer before the admin's transaction ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/25 12:0 a.m.7 views

Market whitelist does not work

Handle cmichel Vulnerability details The RCTreasury.marketWhitelistCheck function gets the marketWhitelistmsgSender variable and performs a special check if it's non-zero. However, there's no way to set the whitelist in the first place making this function unnecessary. Impact The market whitelist...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/25 12:0 a.m.8 views

getMarketInfo skipResults does not work

Handle cmichel Vulnerability details The RCFactory.getMarketInfo function uses the same counter resultNumber for the result arrays' index. This counter is increased if skipResults is set, and the arrays are therefore not indexed at zero. if resultNumber skipResults // @audit increases the array...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/24 12:0 a.m.7 views

Monopolization of the bidding platform

Handle animixar Vulnerability details Impact This is potentially a low-to-medium risk vulnerability as this will lead to the platform being monopolized by a handful of people; preventing any adoption and growth. Proof of Concept A very few super-users with a lot of funds at their disposal can mak...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/24 12:0 a.m.5 views

Insufficient checks at the smart contract level to ensure that previous user address is the lowest bid that is higher than the bid to be added.

Handle 0xImpostor Vulnerability details Impact I understand that it is Thus, it is up to the frontend to keep track of the orderbook and sort it appropriately. however should there be a custom UI made for these contracts and it is not sorted correctly, some of the logic in the code will break...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/22 12:0 a.m.15 views

Parameter updates not propagated

Handle gpersoon Vulnerability details Impact There are several functions to update parameters. However these parameters are only updated on the top level and not propagated to the other contracts. This could lead to various unpredictable results. Examples are: setNftHubAddress of RCFactory...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/22 12:0 a.m.7 views

Uninitialized Variable marketWhitelist in RCTreasury.sol

Handle leastwood Vulnerability details Impact The variable, marketWhitelist, is never initialized in the contract RCTreasury.sol. As a result, the function marketWhitelistCheck does not perform a proper check on whitelisted users for a restricted market. Additionally, the function will always...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/22 12:0 a.m.11 views

findNewOwner edgecase

Handle gpersoon Vulnerability details Impact In the function findNewOwner of RCOrderbook, as loop is done which included the check loopCounter maxDeletions Afterwards a check is done for "loopCounter != maxDeletions" to determine if the processing is finished. If loopCounter == maxDeletions then...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/16 12:0 a.m.14 views

Rewards accumaulated can stay constant and oftern not increment

Handle moose-code Vulnerability details Impact rewardsPerToken.accumulated can stay constant while rewardsPerToken.lastUpdated is continually updated, leading to no actual rewards being distributed. I.e. No rewards accumulate. Proof of Concept Line 115, rewardsPerToken.accumulated could stay...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/14 12:0 a.m.6 views

ERC20Rewards.sol: Consider making rewardsToken immutable

Handle hickuphh3 Vulnerability details Impact While it might seem like a good feature to have, being able to switch reward tokens will only be useful for tokens which are equivalent in value probably stablecoins, pegged tokens since it carries over unclaimed rewards from the previous reward...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/14 12:0 a.m.12 views

ERC20Rewards.sol: Use TransferHelper for rewardsToken

Handle hickuphh3 Vulnerability details Impact As it is used in other contracts, rewardsToken shouldn't be an exception. --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/14 12:0 a.m.14 views

Use safeTransfer instead of transfer

Handle shw Vulnerability details Impact Tokens not compliant with the ERC20 specification could return false from the transfer function call to indicate the transfer fails, while the calling contract would not notice the failure if the return value is not checked. Checking the return value is a...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/14 12:0 a.m.8 views

Rewards squatting - setting rewards in different ERC20 tokens opens various economic attacks.

Handle moose-code Vulnerability details Impact Users have essentially have an option to either claim currently earned reward amounts on future rewards tokens, or the current rewards token. Although stated on line 84, it does not take into account the implications and lock in this contract will ha...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/14 12:0 a.m.12 views

Strategy.sol: startPool() can possibly be flashloaned

Handle hickuphh3 Vulnerability details Impact Since startPool is callable by anyone, an attacker can flash loan to first imbalance the pool, get the strategy to deposit in the imbalanced ratio, then rebalance the pool to the original ratio, thus causing the strategy to suffer from impermanent los...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/14 12:0 a.m.10 views

Exchange rates from Compound are assumed with 18 decimals

Handle shw Vulnerability details Impact The CTokenMultiOracle contract assumes the exchange rates borrowing rate of Compound always have 18 decimals, while, however, which is not true. According to the Compound documentation, the exchange rate returned from the exchangeRateCurrent function is...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/13 12:0 a.m.15 views

No slippage protection in Strategy

Handle cmichel Vulnerability details The startPool and endPool functions of Strategy.sol mint/burn tokens in the pool without any minimum return amount checks: // startPool pool.mintaddressthis, true, 0 // endPool ,, uint256 fyTokenDivested = pool.burnaddressthis, 0, 0; If one of the pool tokens ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/13 12:0 a.m.14 views

Unchecked return value from transfer()

Handle JMukesh Vulnerability details Impact It is usually good to add a require-statement that checks the return value or to use something like safeTransfer; unless one is sure the given token reverts in case of a failure. Proof of Concept Tools Used manual review Recommended Mitigation Steps che...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/13 12:0 a.m.11 views

ERC20Rewards returns wrong rewards if no tokens initially exist

Handle cmichel Vulnerability details The ERC20Rewards.updateRewardsPerToken function exits without updating rewardsPerToken.lastUpdated if totalSupply is zero, i.e., if there are no tokens initially. This leads to an error if there is an active rewards period but not tokens have been minted yet...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/13 12:0 a.m.7 views

ERC20Rewards breaks when setting a different token

Handle cmichel Vulnerability details The setRewards function allows setting a different token. Holders of a previous reward period cannot all be paid out and will receive their old reward amount in the new token. This leads to issues when the new token is more less valuable, or uses different...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/13 12:0 a.m.17 views

CompositeMultiOracle returns wrong decimals for prices?

Handle cmichel Vulnerability details The CompositeMultiOracle.peek/get functions seem to return wrong prices. It's unclear what decimals source.decimals refers to in this case. Does it refer to source.source token decimals? It chains the price arguments through peek function calls and a single...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/13 12:0 a.m.11 views

No ERC20 safe* versions called

Handle cmichel Vulnerability details The claim function performs an ERC20 transfer rewardsToken.transferto, claiming; but does not check the return value, nor does it work with all legacy tokens. Some tokens like USDT don't correctly implement the EIP20 standard and their transfer/transferFrom...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/13 12:0 a.m.10 views

TimeLock cannot schedule the same calls multiple times

Handle cmichel Vulnerability details The TimeLock.schedule function reverts if the same targets and data fields are used as the txHash will be the same. This means one cannot schedule the same transactions multiple times. Impact Imagine the delay is set to 30 days, but a contractor needs to be pa...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/11 12:0 a.m.14 views

initializeMarket uses wrong market index for synthetic

Handle cmichel Vulnerability details The LongShort.initializeMarket function accepts a marketIndex parameter to identify which market should be initialized. However, this index is not used everywhere, when calling IStakerstaker.addNewStakingFund the latestMarket variable is used. In the...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/11 12:0 a.m.7 views

OracleManagerFlippening_V0 price data could be stale

Handle cmichel Vulnerability details There is no check in OracleManagerFlippeningV0.getLatestPrice if the return values indicate stale data. This could lead to stale prices according to the Chainlink documentation: under current notifications: "if answeredInRound roundId could indicate stale data...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/11 12:0 a.m.8 views

Short shift is not cleared

Handle cmichel Vulnerability details The LongShort.batchConfirmOutstandingPendingActions function uses the batchedamountSyntheticTokentoShiftAwayFrommarketSidemarketIndexfalse field to determine how much short tokens to shift to long tokens. However, this field is not cleared, instead, the long...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2021/08/11 12:0 a.m.10 views

Use safeTransfer instead of transfer

Handle shw Vulnerability details Impact Tokens not compliant with the ERC20 specification could return false from the approve call to indicate the approval fails, while the calling contract would not notice the failure if the return value is not checked. Proof of Concept Referenced code:...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/11 12:0 a.m.8 views

What is the right place for amountReservedInCaseOfInsufficientAaveLiquidity in transferPaymentTokensToUser?

Handle pauliax Vulnerability details Impact transferPaymentTokensToUser is called from LongShort's executeOutstandingNextPriceRedeems which in turn is called from executeOutstandingNextPriceSettlements which is quite a common function so I don't think that always subtracting the amount from...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2021/08/11 12:0 a.m.7 views

Incorrect shift variable is reset in LongShort

Handle shw Vulnerability details Impact The logic at lines 1187 to 1208 of LongShort is to handle the user's shift from SHORT to LONG. However, at line 1207, the number of tokens to be shifted from LONG is reset to 0 instead of SHORT, causing incorrect accounting of LONG and SHORT tokens. Proof o...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/08/11 12:0 a.m.9 views

Missing events/timelocks for owner/admin only functions that change critical parameters

Handle 0xRajeev Vulnerability details Impact Owner/admin only functions that change critical parameters should emit events and have timelocks. Events allow capturing the changed parameters so that off-chain tools/interfaces can register such changes with timelocks that allow users to evaluate the...

7AI score
Exploits0
Total number of security vulnerabilities10190