Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2022/09/12 12:0 a.m.7 views

Missing access control on burnFeiHeld()

Lines of code Vulnerability details Impact The function burnFeiHeld is external, and can be called by everyone. This allows anyone to burn the FEI balance of the contract. This may affect the 1:1 ratio of FEI and DAI of the contract SimpleFeiDaiPSM.sol Proof of Concept Tools Used Manual review...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.11 views

redeem() doesn't support inflationary or deflationary erc20 tokens

Lines of code Vulnerability details Impact A transfer-on-fee token or a deflationary/rebasing token, causes the received amount to be less than the accounted amount. For instance, a deflationary tokens might charge a certain fee for every transfer or transferFrom. TribeRedeemer.sol supports the u...

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

Unbounded Loop

Lines of code Vulnerability details 🎨 Category Denial of Service 💥 Impact If the number of tokensReceived gets too big, the transaction's gas cost could exceed the block gas limit and make it impossible to call previewRedeem at all. 📝 Proof of Concept previewRedeem function iterates over all...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.10 views

Redeem fails when DAI is not enough

Lines of code Vulnerability details Impact In SimpleFeiDaiPSM.sol, redeem fails when DAI amount of the contract is less than input FEI amount. But it can succeed if minAmountOut is less than the DAI amount of the contract. Proof of Concept Let us say amountFeiIn DAI amount of SimpleFeiDaiPSM...

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

Missing access Control to burnFeiHeld function

Lines of code Vulnerability details Impact burnFeiHeld hasn't any owner modifier , so everybody run it Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. function burnFeiHeld external uint256...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.4 views

redeem FUNCTION COULD REVERT DUE TO UNDERFLOW

Lines of code Vulnerability details Impact User will not able to redeem the token, because the function will revert due to no check for redeemBase. Proof of Concept User will call redeem function with to and amountIn parameter. There is decrement for the base variable inside the function. Since...

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

Deniel of service with block gas limit.

Lines of code Vulnerability details Impact An array of unknown size can lead to Deniel of service with block gas limit. Proof of Concept When smart contracts are deployed or functions inside them are called, the execution of these actions always requires a certain amount of gas, based of how much...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.10 views

Contract TribeRedeemer: function previewRedeem() might unable to be called forever because of devide by 0

Lines of code Vulnerability details 2022-09-tribe Contract TribeRedeemer: function previewRedeem might unable to be called forever because of devide by 0 tags: c4, 2022-09-tribe, medium Affected code Impact After redemptions, redeemBase can be 0. Then function previewRedeem always revert when be...

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

Loss of precision will lock portions of tokens

Lines of code Vulnerability details Impact When the initial balance of a redemption reward token is smaller than the base, small amounts of the token will be rounded down to zero, meaning small-amount users will get nothing for redeeming tokens. Broken accounting means high severity Proof of...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.4 views

Exchange rate may stale.

Lines of code Vulnerability details Impact While deploying rarimarkleredeemer the deployer set exchange rate in constractor and this cant be change through any function so, while calculating the preview redeem it may use a difference exchange rate between the actuall ctoken and the exchange rate ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.9 views

SimpleFeiDaiPSM contract user can lose DAI funds after having their FEI tokens burned

Lines of code Vulnerability details Impact The FEI token contract contain a burnFrom function which allow the BURNER account to burn a given amount of FEI tokens from an account. When a user transfers DAI to the SimpleFeiDaiPSM contract he get an equivalent amount of FEI tokens in return, those F...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.8 views

TribeRedeemer.redeem function can possibly revert when block gas limit is reached

Lines of code Vulnerability details Impact As the following constructor shows, when constructing the TribeRedeemer contract, the number of tokens in tokensReceived that is used to set tokensReceived is not capped. When the redeem function below is called, tokensReceived, which is essentially toke...

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

Mint function on the simplefeidaiPSM() might DOS

Lines of code Vulnerability details Impact While a user call mint function it imediately mint fei token by supplying DAI and when a user redeem a token the fei will be transfered to this contract without burning the fei token, this could lead DOS if the total supply of the fei token reach the...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.8 views

Can not Claim the second time per Spec requirement

Lines of code Vulnerability details Impact Reading the spec, MerkleReedeemerSpec "The user can claim a configurable amount of each ctoken, or all of them if possible" means, the claim amount can be called multiple times. Meanwhile, in RariMerkleRedeemer.sol, inside the claim function, it requires...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.8 views

Lack of Access Control on burnFeiHeld() function.

Lines of code Vulnerability details Impact: The burnFeiHeld has external visibility modifier. There is no access control on burnFeiHeld function in SimpleFeiDaiPSM.sol contract. Any external user can burn FEI on this contract. function burnFeiHeld external uint256 feiBalance =...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.7 views

User that uses auto compounding solution to auto compound cTokens and smart contracts that hold cTokens can't redeem their cTokens to FEI

Lines of code Vulnerability details Impact You mentioned that "Only EOA addresses will be listed in the merkle nodes, as addresses also need to perform an ECDSA signature on a message to claim the swap." This leaves any contract holding that cToken rugged. Moreover, not only contract Is rugged, b...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.10 views

burnFeiHeld() in SimpleFeiDaiPSM burns FEI balance of contract, which includes FEI received because of redeems and FEI transferred or minted for the contract address. contract should only burn FEI received in redeems. this functionality a backdoor to transfer and burn FEI tokens by this contract.

Lines of code Vulnerability details Impact it's possible to burn FEI tokens without receiving DAI tokens, one can transfer FEI tokens to SimpleFeiDaiPSM contract address and then call burnFeiHeld to burn FEI tokens. this is a backdoor to burn FEI tokens. the contract should only burn FEI tokens...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.7 views

Calls inside loops that may address DoS/Griefing

Lines of code Vulnerability details Calls inside loops that may address DoS/Griefing Description Calls to external contracts inside a loop are dangerous especially if the loop index can be user-controlled because it could lead to DoS if one of the calls reverts or execution runs out of gas...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.11 views

High Potential Redeem function can not be executed because of revert

Lines of code Vulnerability details Impact Inside TribeRedeemer constructor tokensReceived is initialized, and can't be modified anywhere else. previewRedeem function will check balance of tokensReceived tokens of TribeRedeemer contract, and there is a require statement which guarantees that the...

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

Low precision in exchange rates

Lines of code Vulnerability details Impact When set the cTokenExchangeRates the requiere checks how the rate it's greater than 1e10 Some tokens hace different decimals, like USD Coin who haves 6 decimals This gives the posibility to have a rate lower than 1e10 Proof of Concept baseToken haves 18...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.4 views

The mint function is missing the minAmountOut control, this will cause the user to lose their funds.

Lines of code Vulnerability details Impact The mint function of the SimpleFeiDaiPSM contract receives DAI from the user, mints the FEI and sends it to the user. amountIn argument ; the amount of DAI received from the user, minAmountOut argument ; requests output for the amount of FEI given to the...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.6 views

Contract TribeRedeemer: fund can be locked in contract because contract does not have directly withdraw function

Lines of code Vulnerability details 2022-09-tribe Contract TribeRedeemer: fund can be locked in contract because contract does not have directly withdraw function tags: c4, 2022-09-tribe, high Affected code Impact Contract does not have directly withdraw function, so the only way to withdraw...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.9 views

There is no time lock mechanism in RariMerkleRedeemer and constructor of RariMerkleRedeemer contract don't check for maximum value for cTokenExchangeRates, if high value have been set by mistake then attacker can withdraw most of baseToken balance of contract immediately

Lines of code Vulnerability details Impact Exchange rates are used to calculate baseToken amounts that are going to be transferred to the user, if exchange rates are set as a very high number by mistake, an attacker can withdraw baseToken balance of the contract. there should be some checks in th...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.4 views

Broken pro-rata formula

Lines of code Vulnerability details Impact The README.md states: Intended to redeem TRIBE from the effective circulating supply in exchange for a pro rata portion of a list of ERC-20 tokens. Users redeeming the same number of shares get different amounts, meaning that if you are late to redeem,...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.5 views

FEI Minter can drain SimpleFeiDaiPSM contract DAI balance

Lines of code Vulnerability details Impact The FEI token contract contain a mint function which allow the MINTER to mint a given amount of FEI tokens to any account including his own address. So the Minter can mint to his own account an amount of FEI tokens equivalent to the SimpleFeiDaiPSM...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/11 12:0 a.m.13 views

Signature replay in RariMerkleRedeemer

Lines of code Vulnerability details Impact It is possible to reuse the signature used in the sign method in different chains or forks. Proof of Concept Neither the signed content nor the signature are associated with the contract DOMAINSEPARATOR. Therefore, both can be repeated in other contracts...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/11 12:0 a.m.12 views

Unending and Eventually Futile TRIBE Redemption

Lines of code Vulnerability details Impact TRIBE holders can redeem for pro rata share of remaining DAO controlled assets according to TIP-121 proposal. In the light of this, users would rush into redeeming their TRIBE before the balances of each tokensReceived held on this contract run out...

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

No way to burn or withdraw redeemedToken from TribeRedeemer

Lines of code Vulnerability details Impact There is no way to burn or withdraw redeemedToken, sended to this contract Recommended Mitigation Steps Burn tokens in redeem or add function to withdraw that tokens --- The text was updated successfully, but these errors were encountered: All reactions...

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

an attacker can take out flash loan and cause users not to be able to redeem their tokens because of undflow or divsion by zero

Lines of code Vulnerability details Impact An attacker can take out a flash loan and cause the state variable redeemBase=1 causing users who call this function to get dosed and since users can't call this function after the attacker makes the reedem function unuseable which can cause funds to be...

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

Sudden price fluctuations occuring at a call to _update() will not be reflected by reserves(), sampleReserves() and sampleSupply() until after periodSize seconds

Lines of code Vulnerability details Impact Consider the situation where a token suddenly drops drastically in price in the market. Consider a call to BaseV1Pair.swap which makes a very large swap between the two tokens accurately reflecting the change in price and also causes a new observation to...

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

Division before multiplication can lead to an error

Lines of code Vulnerability details Division before multiplication can lead to an error Impact LP token price can be half of actual price by this mistake. Proof of Concept For simplicity, let us say decimals is 1018. Prices can be nearly 1, but slightly smaller than 1. In that case, token0TVL = 0...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.13 views

USING SYMBOL FOR TOKEN IDENTIFICATION

Lines of code Vulnerability details Impact Proof of Concept An exploiter may create a fake tokens whose symbols are cNOTE, cUSDT or cUSDC. When somebody call computrolle’s liquidateCalculateSeizeTokens ,it will give an unlisted token with other token's it can be unlisted token or listed token...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.17 views

HARDCODED PRICES FOR STABLECOINS

Lines of code Vulnerability details Impact Hardcoded prices of stablecosins may open some arbitrage opportunities and produce many bad loans in CLM. Proof of Concept Hardcoding price of cUSDT and cUSDC as 1 may open some arbitrage opportunities when real price for each token is a little bit...

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

Unbounded loop in BaseV1-core.sol could lead to a griefing/DOS attack

Lines of code Vulnerability details Denial Of Service Attack Denial-of-service attacks: Attacks that cause DoS are called DoS attacks. The purpose is to disable the computer or network from providing normal service. Description: As this array can grow quite large, the transaction’s gas cost could...

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

reserve0CumulativeLast is incorrectly calculated

Lines of code Vulnerability details Impact It was observed that both reserve0CumulativeLast and reserve1CumulativeLast are incorrectly calculated. Reference can be taken from Uniswap contract which calculates it correctly at Proof of Concept 1. The reserve0CumulativeLast is currently calculated i...

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

Hardcoded USD pegs can be broken

Lines of code Vulnerability details Description The prices of USDC and USDT, which I assume are the underlying tokens of cUSDC and cUSDT, have been hardcoded to parity. Such practices are highly discouraged because while the likelihood of either stablecoin de-pegging is low, it is not zero. Becau...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.6 views

Should add check for Insufficient allowance

Lines of code Vulnerability details Impact There is not check for Insufficient allowance inside transferFrom method. Proof of Concept Tools Used Code analytics Recommended Mitigation Steps requirecurrentAllowance = amount, "ERC20: insufficient allowance"; --- The text was updated successfully, bu...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.8 views

Controlling the ERC20 Token contract from symbol is not secure

Lines of code Vulnerability details Impact BaseV1-periphery.solL491 in the getUnderlyingPrice function , the correctness of the CToken contract received from the instance is done with if compareStringssymbol, "cCANTO" on line BaseV1-periphery.solL490 This is not a safe way, fake contracts similar...

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

TWAP LP price manipulation

Lines of code Vulnerability details Impact The total value locked sum of the pair is used to price the LP. But the reserves of the underlying can be easily influenced by flashloan, then the TVL can vary dramatically.Just like what happened before here Warp. Although getPriceLP use TWAP to calcula...

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

LP token price calculation suceptible to oracle attack manipulation

Lines of code Vulnerability details Impact The current calculation of the LP token its no accurate. Currently you formula is a the sum of the underlying asset value; sumPiRi / supply Sumatory of each token prices times reserve, divided by total supply, but this is suceptible to oracle manipulatio...

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

setPeriodSize need check for value range

Lines of code Vulnerability details Impact If periodSize is mistakenly set too small, 0 or a small value, the price oracle might be easier to manipulate. As a consequence, multiple functionality depending on oracle price feed may lose accuracy, and even incur large fund loss. Proof of Concept The...

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

Rounding error for low decimal token

Lines of code Vulnerability details Impact Some token has low decimal USDC has only 6, as a result, the rounding may introduce substantial error in stable pair calculation, causing wrong getAmountOut quote, at the end lead to fund loss in swap function. Malicious user can abuse the wrong quote to...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.5 views

Missing checks for Comptroller can block expected/correct flows getUnderlyingPrice

Lines of code Vulnerability details Missing checks for Comptroller can block expected/correct flows getUnderlyingPrice Summary Zero address should be checked to be avoided Also a 2 steps assign would help to not going wrong or a check within a whitelist Details getUnderlyingPrice would be blocked...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.15 views

transferFrom() failure in _safeTransferFrom() could drain the pair

Lines of code Vulnerability details Impact For some tokens, tokenCon.transferFrom could fail and return false but not revert. Some malicious user can abuse it the addLiquidity/addLiquidityCANTO function to perform failure transferFrom but still get the liquidity, and later remove liquidity to dra...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.8 views

blockTimestampLast not initialised to block.timestamp results in wrong calculations for reservesCumulative and totalSupplyCumulative in _update() function

Lines of code Vulnerability details Impact Default value of blockTimestampLast is 0 and affects the calculations done in the first call of update. observations would store the wrong value and affect subsequent calculations of price when a sample size that includes this wrong observation is taken...

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

Two-step change of privileged roles

Lines of code Vulnerability details Impact Lack of two-step procedure for critical operations is error-prone and can lead to irrevocable mistakes, might leave the system operationally with no/malicious privileged role. For example, when transfer admin role, in a single-step change, if the current...

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

Lack of minimal sufficient liquidity check can result in unreliable prices

Lines of code Vulnerability details function getPriceCantoaddress token internal view returnsuint erc20 token = erc20token; address pair = pairForaddresswcanto, addresstoken, false; if !isPairpair return 0; // this pair does not exist with Canto uint decimals = 10 token.decimals; // get decimals ...

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

[M04] Incorrect price calculation for non-stable pairs without CANTO token

Lines of code Vulnerability details Impact A non-stable pair that doesn't have CANTO token will always have an incorrect price calculated for it. Proof of Concept The code assumes that all pairs are pairs with either NOTE or CANTO token: However, the createPair function doesn't require one of the...

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

USE SAME SYMBOL CAN GET FAKED PRICE OF TOKEN

Lines of code Vulnerability details Impact it compare symbol to identify token,it can be exploit to produce fake price of token. Proof of Concept attacker can create a token which is like cToken and has symbol of cNOTE .When somebody call comptroller’s liquidateCalculateSeizeTokens ,it will give ...

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

Divide before multiply

Lines of code Vulnerability details Divide before multiply Impact Solidity integer division might truncate. As a result, performing multiplication before division can sometimes avoid loss of precision. Details In general, this is a problem due to precision. In this case, it also affects...

6.8AI score
Exploits0
Total number of security vulnerabilities10190