Lucene search
+L

18 matches found

Code423n4
Code423n4
added 2023/11/17 12:0 a.m.11 views

asD::withdrawCarry assumes wrong number of decimals returned by exchangeRateCurrent which will cause owner to not be able to withdraw revenue

Lines of code Vulnerability details tl;dr asD::withdrawCarry assumes that the exchange rate returned by the cNote contract will be scaled by 1e28, but in reality it will be only scaled by 1e18. It will cause withdrawCarry to always revert with Integer Underflow, which means that owner won't ever ...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/11/17 12:0 a.m.20 views

withdrawCarry will not work

Lines of code Vulnerability details Description When calculating the amount of interest gathered this calculation is done: asD::withdrawCarry: File: asD/src/asD.sol 73: uint256 exchangeRate = CTokenInterfacecNote.exchangeRateCurrent; // Scaled by 1 10^18 - 8 + Underlying Token Decimals, i.e. 10^2...

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

asD.sol::mint & asDFactory.sol::create allows an attacker to mint legitimate aSD with counterfeit underlying $NOTE

Lines of code Vulnerability details Impact When creating an aSD token using create from the asDFactory.sol, there's the cNote address reference to specify and set. A malicious user can deploy a counterfeit NOTE underlying token that isn't legit or backed by anything and set/reference it as...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/11/17 12:0 a.m.16 views

asD creator's would not be able to claim interest accrued due to wrong calculations of the maximumWithdrawable

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The asD contract implement's withdrawCarry method, which calculates the accrued interest on the users NOTE deposit. The variable maximumWithdrawable gets interest accrued by the deposit by the...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/11/17 12:0 a.m.14 views

The withdrawCarry() function always reverts because of an incorrect assumption.

Lines of code Vulnerability details Impact The Compound protocol's CTokens have 8 decimal places, but the team mistakenly believed that cNote also had only 8 decimal places. However, it was discovered that cNote actually has 18 decimal places. This discrepancy caused the withdrawCarry function to...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/11/17 12:0 a.m.9 views

The Invariant can be broken as 1 NOTE does not always equal to 1 cNOTE.

Lines of code Vulnerability details Impact users will not be able to redeem their asD tokens for equivalent amount of NOTE because when minting cNOTE, 1 cNOTE doesn't always equal 1 NOTE. Link to site here as of when the image above was taken, you needed exactly 1.0042 NOTES to be able to get 1...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/11/17 12:0 a.m.21 views

D.O.S due to wrong scaling factor

Lines of code Vulnerability details Impact The cNote token which is a fork of the CToken contract has a scaling method used to handle the exchange rate between CToken and the underlying token. This method helps scale the exchange rate because solidity doesn't handle fixed-point decimals. The...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/11/17 12:0 a.m.14 views

asD TOKEN CREATOR CAN PROFIT UNFAIRLY FROM THE cNote TOKENS DIRECLTY TRANSFERRED TO THE asD.sol CONTRACT

Lines of code Vulnerability details Impact The asD.withdrawCarry function is used to withdraw the interest that accrued in the asD contract in the form of NOTE tokens. Only the owner of the asD token is able to withdraw the interest accrued since the withdrawCarry is controlled by the onlyOwner...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/10 12:0 a.m.13 views

User can claim most of the rewards for a lending market by depositing cNote for just 2 blocks / epoch

Lines of code Vulnerability details Impact For a user to receive rewards for supplying cNote in a lending market LM, he only needs to have supplied the cNote at the end of an epoch. Users staking for the whole duration of an epoch get 0 benefits, compared to users who supply only at the end of th...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2022/07/01 12:0 a.m.12 views

Sending 1 wei of cNote to the treasury can malfunction sweepInterest()

Lines of code Vulnerability details function sweepInterest external override if msg.sender != admin revert SenderNotAdminmsg.sender; //Total balance of Treasury = Note + CNote Balance, Exp memory exRate = Expmantissa: cnote.exchangeRateStored; //used stored interest rates in determining amount to...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/29 12:0 a.m.9 views

AccountantDelegate: The sweepInterest function sweeps an incorrect number of cnote.

Lines of code Vulnerability details Impact In the sweepInterest function of the AccountantDelegate contract, the number of cnote sent to treasury should be cNoteToSweep instead of amtToSweep, as amtToSweep will normally be smaller than cNoteToSweep, which will cause the interest to be locked in t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/29 12:0 a.m.7 views

borrowFresh does not work

Lines of code Vulnerability details Impact The CNote contract uses the borrowFresh function of the CToken contract to perform the borrow operation. However, since the CNote contract does not hold note tokens, getCashPrior returns 0 and is less than borrowAmount, making the borrowFresh function no...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/29 12:0 a.m.7 views

Deny of service in CNote.doTransferOut

Lines of code Vulnerability details Impact The CNote.doTransferOut method is susceptible to denial of service. Proof of Concept The logic of the doTransferOut method in CNote is as follows: function doTransferOutaddress payable to, uint amount virtual override internal requireaddressaccountant !=...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/29 12:0 a.m.11 views

An attacker can render CNote’s doTransferOut unusable

Lines of code Vulnerability details Impact In doTransferOut, the underlying balance of the CNote has to be 0 after the transfer. While this works fine when the underlying balance of the CNote was 0 before the call i.e., in the normal case, the function will always revert when the balance was...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/29 12:0 a.m.25 views

redeemFresh does not work

Lines of code Vulnerability details Impact The CNote contract uses the CToken contract's redeemFresh function to perform redeem operations. However, since the CNote contract does not hold note tokens, the getCashPrior returns 0 and is less than the redeemAmount, causing the redeemFresh function t...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.15 views

CNote updates the accounts after sending the funds, allowing for reentrancy

Lines of code Vulnerability details Having no reentrancy control and updating the records after external interactions allows for funds draining by reentrancy. Setting the severity to medium as this is conditional to transfer flow control introduction on future upgrades, but the impact is up to th...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.9 views

Transferring any amount of the underlying token to the CNote contract will make the contract functions unusable

Lines of code Vulnerability details Impact The contract expects the balance of the underlying token to == 0 at all points when calling the contract functions by requiring getCashPrior == 0, which checks token.balanceOfaddressthis where token is the underlying asset. An attacker can transfer any...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/21 12:0 a.m.11 views

Incorrect repayAmount used in CNote

Lines of code Vulnerability details Impact repayAmount was used instead of repayAmountFinal in CNote.repayBorrowFresh. This will lead to revert if the borrower want to repay full amount with typeuint.max Proof of Concept uint actualRepayAmount = doTransferInpayer, repayAmount; Recommended...

6.8AI score
SaveExploits0
Rows per page
Query Builder