Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2022/09/12 12:00 a.m.14 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.10 views

A reverting token transfer will lock all payouts.

Lines of code Vulnerability details Impact A reverting fallback function will lock all payouts. Proof of Concept External calls can fail accidentally or deliberately, which can cause a DoS condition in the contract. To minimize the damage caused by such failures, it is better to isolate each...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.12 views

Can easily bypass the require by modifying parameter

Lines of code Vulnerability details Impact User can easily bypass the require code inside redeem function inside SimpleFeiDaiPSM.sol file by modifying the parameter. the requireamountFeiOut = minAmountOut, ... and requireamountOut = minAmountOut, .. statement can be bypassed easily since the two...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.12 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.17 views

possbile griefing using replay attack

Lines of code Vulnerability details users who want to user redeem function has to set a value for amountIn this value cant be more than redeemBase , which is set in contract's constructor. the value of redeemBase will decrease in case of a successful call of redeem . while contract's solidity...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.13 views

TribeRedeemer.reedem assets can be lost in case of malicious token

Lines of code Vulnerability details Impact The function redeemaddress to, uint256 amountIn to calculate the amount of redemption tokens in turn calls In case of a malicious token will always revert: contract BadBadERC20 is ERC20, ERC20Burnable constructor ERC20"BadToken", "BDT" function...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.14 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.19 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.21 views

in function redeem() of TribeRedeemer users would receive less funds because of rounding error in division in previewRedeem()

Lines of code Vulnerability details Impact Function previewRedeem in TribeRedeemer has been used to calculate the amounts of tokens the user would receive for what the user transfer as redeemedToken. the user would receive a ratio of token balance of the contract which ratio is equal to amountIn ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.18 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.21 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.17 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.13 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.20 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.16 views

Function getRedeemAmountOut can't deliver was it should be

Lines of code Vulnerability details Proof of Concept The fn of getRedeemAmountOut can't be deliver the same as it should be eversince it has @params uint256 amountIn and return amountIn which clearly should be amountFeiIn. So the calculate would be deliver wrong value. Tools Used Manual Review...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.19 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.22 views

Potential DoS in _claim()

Lines of code Vulnerability details Impact An attacker could call claim in an infinite loop to conduct DoS attack. Proof of Concept Here is the implementation of claim: // User provides the the cToken & the amount they should get, and it is verified against the merkle root for that cToken ///...

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

TribeRedeemer has no way of getting the redeemedToken out

Lines of code Vulnerability details Impact TribeRedeemer has no way of getting the redeemedToken out! The tokens in tokensReceived will be sent in exchange for redeemedToken, but then the received redeemedToken are locked forever in the contract. There is no mechanism to take them out! If this is...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.15 views

User's cToken could be locked in _claim()

Lines of code Vulnerability details Impact The function claim can only be called 1 time to set the claims amount, but if later the user's balance of the cToken is updated, whether increase of decrease, the functionality of claim and redeem will break. In the case later some cToken is transferred ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.19 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.17 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.17 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.16 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.14 views

Contract TribeRedeemer: User might not redeem with large amount

Lines of code Vulnerability details 2022-09-tribe Contract TribeRedeemer: User might not redeem with large amount tags: c4, 2022-09-tribe, medium Affected code Impact After many redemptions of contract TribeRedeemer, redeemBase will be reduced and might not be still large. Then users can not rede...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/12 12:00 a.m.19 views

Wrong exchange rates after some time, because It's not possible to change excahngeRates after contract deployments, the rates can be changed after some times in real life but it's not possible to change rates in contract

Lines of code Vulnerability details Impact exchange rates are used to calculate amounts of baseToken users received for their cTokens, exchange rates are set when contracts get deployed but it's not possible to change them after some time, so users would get the wrong exchange rates after some ti...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/11 12:00 a.m.24 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/11 12:00 a.m.17 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/11 12:00 a.m.13 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/11 12:00 a.m.20 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.13 views

Possible division loss during LpPricesCumulative calculation

Lines of code Vulnerability details Impact During the token0TVL calculation, it divides by decimals without multiplying 1e18 first. So there might be division loss and the price might be calculated wrongly. Proof of Concept When we calculate this part, it divides first without multiplying 1e18...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.10 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.14 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.15 views

Hardcoded prices are subject to be abused

Lines of code Vulnerability details Impact Hardcoded prices are subject to be abused which might address the protocol being drained. Proof of Concept There are 2 possible different issues of the Lending Protocol; 1. The attack surface/risk is not originated directly through the Canto protocol but...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.12 views

MISSING CHECK OF TOKEN RESULTING IN WRONG ANSWER OF LP TOKEN PRICE

Lines of code Vulnerability details Impact When calculating the LP price, due to the lack of checking of the tokens, if both the token0 and token1 of the pair are not wcanto or note, it will lead to the wrong LP price. Proof of Concept if pair.stable // stable pairs will be priced in terms of Not...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.13 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.10 views

Lack of input array length check in UNSAFE_swapExactTokensForTokens() could lock user's funds

Lines of code Vulnerability details Impact In case the amounts and routes array do not match in length by mistake: the swap might fail the swap could stop early during the swap path user funds could be locked forever in some situations Proof of Concept src/Swap/BaseV1-periphery.sol function...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.11 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.17 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.27 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.12 views

Hardcoded cUSDT and cUSDC prices are dangerous to the system when those stablecoins depeg

Lines of code Vulnerability details Proof of Concept function getUnderlyingPriceCToken ctoken external override view returnsuint address underlying; //manual scope to pop symbol off of stack string memory symbol = ctoken.symbol; if compareStringssymbol, "cCANTO" underlying = addresswcanto; return...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.14 views

Tokens with low trading volumes will have distorted time weighting

Lines of code Vulnerability details Proof of Concept Although the docs talk of time weighted values, the actual processing of values by update,reserves, sampleReserves and sampleSupply weights all observations as equal, regardless of duration. So long as update is being called frequently, this...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.11 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.14 views

ATTACKER COULD PREVENT ANY OTHER USERS FROM MINTING SYNTHETIC TOKENS

Lines of code Vulnerability details An attacker can repeatedly call mint followed by burn after depositing some collateral with deposit. If this is appropriately sized and timed, it can cause the mint call to fail for another user due to the check here that is called during mint here. Every time ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.18 views

Comparison of tokens

Lines of code Vulnerability details Impact In function named getUnderlyingPrice the BaseV1Router01 contract desides price of the token by comparing tokens' symbol name with predefined constant. By passing custom token attacker can force returned value of getUnderlyingPrice function to be incorrec...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.32 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
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.16 views

Dividing before multiplying can cause data loss

Lines of code Vulnerability details Impact Note: I'll use the notation decimals here to represent 10 token.decimals, just like th variable defined in the BaseV1Router.getPriceLP function. In the BaseV1Router.getPriceLP function, the token0 TVL is calculated in terms of NOTE, by multiplying the TV...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.13 views

getUnderlyingPrice returns an incorrect value for cUSDC

Lines of code Vulnerability details BaseV1Router01.getUnderlyingPricecToken returns the price of cToken in $NOTE. As per the docs, the function is designed so that cStable coins USDC, USDT, NOTE have prices that are statically set to 1e18. The issue is that USDC uses 6 decimal places of precision...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.14 views

Unbounded loop on array can lead to DoS

Lines of code Vulnerability details Description: As this array can grow quite large, the transaction’s gas cost could exceed the block gas limit and make it impossible to call this function at all Actual Codes used: src/Swap/BaseV1-core.sol:96: observations.pushObservationblock.timestamp, 0, 0,0;...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/09/08 12:00 a.m.22 views

Unbounded loop on array can lead to DoS

Lines of code Vulnerability details Description: As this array can grow quite large, the transaction’s gas cost could exceed the block gas limit and make it impossible to call this function at all a push exist but there's no pop in the solution, that means it will continuously only push which wil...

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

Price can be manipulated by flashloan

Lines of code Vulnerability details Impact The last observation of the TWAP can be manipulated by a flashloan, which thus manipulates the price. Proof of Concept The price calculated in getPriceLP is based on the last 8 observations. As the last observation may be in the current block it is...

6.8AI score
SaveExploits0
Total number of security vulnerabilities10190