Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•23 views

Proper use of dependecy

Lines of code Vulnerability details Impact Using safeTransferFrom of solmate. There is no checking the token address is exist Proof of Concept After consulting the dev, the only check for making sure the token exist is a list on the UI/fontend side. A highly motivated attacker can easily disable...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•24 views

ERC4626Cloned.previewMint() causes malicious users to can exclusive access to vault

Lines of code Vulnerability details Impact exclusive access to vault,Other users will not be able to mint Proof of Concept In the previewMint method, if the first user mint, no matter how many shares the user passes in, only 10e18 assets are needed function previewMintuint256 shares public view...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•22 views

Reentrancy in safeTransferFrom() in ClearingHouse.sol allows the attacker to withdraw the collateral, while still owning the borrowed assets.

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Calling the function safeTransferFrom and passing in a custom, attacker controlled payment token allows the malicious actor to perform reentrancy. the following function clears the attacker of all debt,...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•36 views

Attacker can fake an ERC20 token as the paymentToken and call ClearingHouse.safeTransferFrom() to prematurely settle the auction, preventing the actual auction from completing

Lines of code Vulnerability details Impact ClearingHouses are deployed for each new loan and settle payments between Seaport auctions and Astaria Vaults if a liquidation occurs. However, due to the lack of proper data validation in the current implementation, anyone can fake a token and transfer ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•15 views

_buyoutLien() does not properly validate the liquidationInitialAsk

Lines of code Vulnerability details Impact Illegal liquidationInitialAsk, resulting in insufficient bids to cover the debt Proof of Concept buyoutLien will validate against liquidationInitialAsk, but incorrectly uses the old stack for validation function buyoutLien LienStorage storage s,...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•14 views

INCORRECT FUNCTION CALLS

Lines of code Vulnerability details Impact In Vault.sol, WithdrawProxy.sol and PublicVault.sol, name is making an incorrect external call to return its output variable. Apparently, it is calling ERC20asset.symbol instead of ERC20asset.name. Devoid of an accurate name description, this could lead ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•18 views

[M-02] Strategist has full control over Public Vault it can be risky for depositors

Lines of code Vulnerability details Impact The strategist has full control over all key functions. If the strategist is compromised or hacked he will be able to manipulate the vault. For example, increase the depositCap modifyDepositCapuint256 newCap, add a depositor to the whitelist...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•25 views

IRREVERSIBLE SHUTDOWN FUNCTION

Lines of code Vulnerability details Impact The abstract contract VaultImplementation is inherited by Vault.sol and PublicVault.sol. Its shutdown can be called by the strategist to make loadVISlot.isShutdown = true. This will make the modifier whenNotPaused revert, rendering commitToLien and...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•13 views

refPerTok() for one asset might revert and break the protocol

Lines of code Vulnerability details Impact It turns out that function refPerTok might revert for some assets. For example for CTokenFiatCollateral an external call might revert. As a result refPerTok also reverts. Function refPerTok is called in a loop for all assets inside...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•22 views

User can lose 10 ethers to Vault

Lines of code Vulnerability details Impact If a user or a contract that has a large allowance 10 ethers or max on an ERC4626Cloned based Vault that has not yet received any deposits, calls mint with 0 share argument, will have a 10 ethers of the asset transferred to the Vault with no way to recla...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•23 views

createLien() The first LienToken does not check for liquidationInitialAsk and maxPotentialDebt

Lines of code Vulnerability details Impact Illegal liquidationInitialAsk and maxPotentialDebt may result in bids amount do not cover the debt Proof of Concept With the current implementation, the first LienToken does not check liquidationInitialAsk and maxPotentialDebt function appendStack...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•21 views

settleAuction() Check for status errors

Lines of code Vulnerability details Impact ClearingHouse.safeTransferFrom to execute successfully even if there is no bid Proof of Concept settleAuction is called at the end of the auction and will check if the status is legal function settleAuctionuint256 collateralId public if...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•20 views

A malicious user can call transferWithdrawReserve() multiple times to modify s.withdrawReserve

Lines of code Vulnerability details Impact The function PublicVault.soltransferWithdrawReserve is meants to transfers funds from the PublicVault to the WithdrawProxy. However, this function has no access control, anyone can call it multiple times to modify the withdrawReserve value Proof of Conce...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•26 views

Basket range formula is inefficient, leading the protocol to unnecessary haircut

Lines of code Vulnerability details Impact The BackingManager.manageTokens function checks if there's any deficit in collateral, in case there is, if there's a surplus from another collateral token it trades it to cover the deficit, otherwise it goes for a 'haircut' and cuts the amount of basket...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•16 views

totalStakes is not updated in seizeRSR()

Lines of code Vulnerability details Impact when RSR is seized in the function seizeRSR stakeRSR is update but totalStakes is not updated so after seizeRSR is called when stake is called the line 225 uint256 stakeAmount = newTotalStakes - totalStakes; will underflow and revert because totalStakes ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•30 views

Overflow/Underflow in interest calculation caused by lack of timestamp validation in _getInterest() & _getRemainingInterest() function

Lines of code Vulnerability details Impact An attacker could manipulate the last timestamp of a lien in the stack struct to cause an underflow or overflow in the interest calculation. This could result in an incorrect interest amount being calculated, which could lead to incorrect payments being...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•33 views

ERC4626Cloned deposit and mint logic differ on first deposit

Lines of code Vulnerability details The ERC4626Cloned contract is an implementation of the ERC4626 used for vaults. The standard contains a deposit function to deposit a specific amount of the underlying asset, and a mint function that will calculate the amount needed of the underlying token to...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•17 views

WithdrawProxy will break if there is a fee-on-transfer underlying

Lines of code Vulnerability details PublicVault.transferWithdrawReserve will increase WithdrawProxy.withdrawReserveReceived by withdrawBalance. The issue is that if the token has a fee-on-transfer, withdrawBalance will be greater than the amount received by withdrawProxy 384:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•15 views

WithdrawProxy calculation error for tokens with decimals != 18 leads to claim reverting

Lines of code Vulnerability details withdrawRatio has 18 decimals 314: s.liquidationWithdrawRatio = proxySupply 315: .mulDivDown1e18, totalSupply 316: .safeCastTo88; 317: 318: currentWithdrawProxy.setWithdrawRatios.liquidationWithdrawRatio; But in WithdrawProxy.claim, transferAmount divides...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•15 views

ClearingHouse can pass in a malicious payment token

Lines of code Vulnerability details Impact vault loss assets Proof of Concept When the auction is successful the NFT is transferred to the bidder and seaport calls ClearingHouse.safeTransferFrom to trigger the repayment of the debt through the conduit mechanism ClearingHouse.safeTransferFrom -...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•18 views

commitToLien() can create LienToken for any holder

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept The VaultImplementation.commitToLien method is external and can be executed by anyone The method will internally verify that the corresponding collateralId is yours or has the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•18 views

Reentrancy Vulnerability in stake() and unstake() functions.

Lines of code Vulnerability details Impact An attacker can repeatedly call these functions and manipulate the state of the contract, potentially leading to a loss of funds for the users of the contract. For example, an attacker could repeatedly call the stake function, causing the attacker to...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•58 views

FIRST ERC4626 DEPOSIT CAN BE EXPLOITED ON SHARE CALCULATION

Lines of code Vulnerability details Impact This is a common attack vector involving shares based liquidity pool contracts. An early user can manipulate the price per share and profit from late users' deposits because of the precision loss caused by the rather large value of price per share. Note:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•26 views

Inconsistent min deposit

Lines of code Vulnerability details Impact The first transfer in a vault that is based on ERC4626Cloned produces different results depending on whether it is done via deposit or via mint. While first deposit produces a number of shares that is 1:1 with the asset, in the case of mint, the results...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•22 views

commitToLien() can pass in an illegal payment token

Lines of code Vulnerability details Impact Stealing vault assets Proof of Concept There are currently two ways to create new Liens in the system 1. user call AstariaRouter.commitToLiens, the internal implementation of this is through VaultImplementation.commitToLien to create 2. user can call...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•58 views

Solmate safetransfer and safetransferfrom does not check the codesize of the token address, which may lead to fund loss

Lines of code Vulnerability details Impact Possible miscalculation and loss of funds. Proof of Concept In AstariaRouter.commitToLiens, the safetransfer and safetransferfrom doesn’t check the existence of code at the token address. This is a known issue while using solmate’s libraries.Hence this m...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•52 views

First ERC4626 deposit can break share calculation

Lines of code Vulnerability details Impact The first depositor of an ERC4626 vault can maliciously manipulate the share price by depositing the lowest possible amount 1 wei of liquidity and then artificially inflating ERC4626.totalAssets. This can inflate the base share price as high as 1:1e18...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•47 views

First ERC4626 deposit can break share calculation

Lines of code Vulnerability details Impact ERC4626 vault share price can be maliciously inflated on the initial deposit, leading to the next depositor losing assets due to precision issues. Proof of Concept The first depositor of an ERC4626 vault can maliciously manipulate the share price by...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•12 views

Incorrect Trade Settlement in settleTrade() function

Lines of code Vulnerability details Impact /// Settle a single trade, expected to be used with multicall for efficient mass settlement /// @custom:refresher function settleTradeIERC20 sell external; This function takes in only a single IERC20 token as a parameter, with no other information about...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•37 views

LienToken: Lender and liquidator can collude to block auction and seize collateral

Lines of code Vulnerability details If a lender offers a loan denominated in an ERC20 token that blocks transfers to certain addresses for example, the USDT and USDC blocklist, they may collude with a liquidator or act as the liquidator themselves to prevent loan payments, block all bids in the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•31 views

Wrong implementations in ERC4626RouterBase contract

Lines of code Vulnerability details The ERC4626RouterBase contract contains a set of functions that act as wrappers for a ERC4626 contract, providing a base periphery functionality around a ERC4626 vault. There are a number of different flaws in the wrapped implementations of mint, deposit,...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•15 views

[M-01] Public Vault cannot be reactivated after Shutdown.

Lines of code Vulnerability details Impact If the strategist who created the vault is compromised/hacked or accidentally/intentionally shutdown the vault by call shutdown the public vault cannot be resumed. There is no function that sets isShutdown = false. Unintentional shutdown of a large publi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•28 views

PublicVault Contract Allows Minting Tokens to a Null Address

Lines of code Vulnerability details Impact The PublicVault contract allows the minting of tokens to a null address. When the redeemFutureEpoch function is called with a null address as the receiver, the function will still proceed with the minting of the underlying asset, but the tokens will not...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•31 views

LienToken.transferFrom There is a possibility of malicious attack

Lines of code Vulnerability details Impact Corrupt multiple key properties of public vault, causing vault not to function properly Proof of Concept When LienToken.makePayment/buyoutLien/payDebtViaClearingHouse If it corresponds to PublicVault, it will make multiple changes to the vault, such as:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•22 views

Infinite Loop Vulnerability in endIdForWithdraw() Function.

Lines of code Vulnerability details Impact While loop within the endIdForWithdraw function. while left time test = left + right / 2; // left test right because left right - 1 if queuetest.availableAt = time left = test; else right = test; This loop can cause an infinite loop if the loop invariant...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•28 views

Solmate's ERC20 does not check for token contract's existence

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Not checking for token existence is a know issue for Solmate. This can cause unexpected contract functionality for transfers implemented in the codes. Proof of Concept Provide direct links to all...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•17 views

makePayment() may increase the user's debt

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept makePayment will be called when the user needs to repay the money, in two cases. 1. If the repayment amount = borrowed amount + interest, then the loan is paid off and the corresponding...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•18 views

commitment.lienRequest.strategy.vault can be dffierent from the actual vault

Lines of code Vulnerability details Impact The protocol doesn't check that commitment.lienRequest.strategy.vault is equal to the actual vault. The problem with this is that commitment.lienRequest.strategy.vault and vault might be using 2 different tokens. The borrower gets the token of the actual...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•25 views

Front-run Initializer

Lines of code Vulnerability details Impact In function: function initialize Authority AUTHORITY, ICollateralToken COLLATERALTOKEN, ILienToken LIENTOKEN, ITransferProxy TRANSFERPROXY, address VAULTIMPL, address SOLOIMPL, address WITHDRAWIMPL, address BEACONPROXYIMPL, address CLEARINGHOUSEIMPL...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•16 views

Interest is much lower than what it should be

Lines of code Vulnerability details Protocol interest calculation is said in the docs to be as follow: To convert a standard annualized simple interest rate to an Astaria-compatible interest per second value, divide by 3153600031536000 seconds per year and multiply by 10^18 This is not what is...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•14 views

A user can use the same proof for a commitment more than 1 time

Lines of code Vulnerability details Impact A user can use the same commitment signature and merkleData more than 1 time to obtain another loan. Proof of Concept A user needs to make some procedures to take a loan against an NFT. Normally the user calls commitToLiens in AstariaRouter.sol providing...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•19 views

Redeemers will receive less collateral than expected if function completeRedemptions() is called with empty refundees list

Lines of code Vulnerability details Impact Function completeRedemptions is used by admin account to distribute collateral to users and also to refund redemption requests if the redemption cannot be serviced. function completeRedemptions address calldata redeemers, address calldata refundees,...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•21 views

If requestMint() is called before mintFee is initially set via setMintFee(), the return of _getMintFees(collateralAmountIn) can be "underflow" , which results in the loss for the protocol and the unexpected-benefit for certain users

Lines of code Vulnerability details Impact This vulnerability lead to the loss for this protocol and the unexpected-benefit for certain users like this: The protocol cannot earn the fee in collateral feesInCollateral that is supposed to be earned unless the MANAGERADMIN set the certain amount of...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•20 views

mintFee can be set to 100%

Lines of code Vulnerability details Impact The mintFee can be set to 100%. An amount of centralization over the usual is to be expected in a protocol that deals with RWAs and requires KYC but being able to set the fee to 100% is unnecessary, dangerous, and could harm Ondo's reputation. Proof of...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•13 views

Use safeTransefer and safeTransferfrom

Lines of code Vulnerability details Impact and Recommended Mitigation Steps CErc20.sol Transfers are not safe because there is no checking whether the return value is true/false without use of Openzeppelins safeTransfer/safeTransferFrom. Should use the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•16 views

_processRefund() fails to update currentRedeemAmount when epochToService == currentEpoch

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. processRefund fails to update currentRedeemAmountwhenepochToService == currentEpoch. As a result, currentRedeemAmount will contain the portion that has already been refunded, an incorrect number. Proof ...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•16 views

Loss of user funds when completing CASH redemptions

Lines of code Vulnerability details The function completeRedemptions present in the CashManager contract is used by the manager to complete redemptions requested by users and also to process refunds. function completeRedemptions address calldata redeemers, address calldata refundees, uint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•21 views

Not resetting totalBurned in CashManger will break user redemptions

Lines of code Vulnerability details Not resetting totalBurned in CashManger will break user redemptions The current implementation in CashManager.completeRedemptions is not updating the totalBurned amount in an epoch if there was a refund. The problem is, that if not all user redemptions can be...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•17 views

MANAGER_ADMIN has the right to give or take any amount of user's tokens using setPendingMintBalance.

Lines of code Vulnerability details Impact Not sure what the use case of setPendingMintBalance should be, but it can cause admins to drain the whole balance, nullify the user's funds or break the protocol. This can be caused on purpose, accidentally or through an attacker stealing MANAGERADMIN's...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•25 views

Centralization risk

Lines of code Vulnerability details Impact MANAGERADMIN can set a very high value for minimumRedeemAmount which will ensure that all attempt to redeem amount simply fails Proof of Concept 1. User A wants to redeem amount 100000 using the requestRedemption function 2. Before User A can do so,...

6.7AI score
SaveExploits0
Total number of security vulnerabilities10190