Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/04/20 12:0 a.m.6 views

test

Lines of code L1 Vulnerability details test --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

The minter can steal the Frankencoin in notifyLoss()

Lines of code Vulnerability details Impact The minter can steal the Frankencoin in notifyLoss because of In this code: if reserveLeft = amount transferaddressreserve, msg.sender, amount; The minter can call the function notifyLoss Constantly. When reserveLeft = amount, the minter who call the fir...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.8 views

Lack of removal of minters reduces chances of survival

Lines of code Vulnerability details Impact It is reasonable to assume there will be occasions of misbehaving minters that will threaten the functioning of the Frankencoin ecosystem and there is no way to disable any such minter without redeploying the contract. Ex. an attacker can deploy a...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.13 views

A MINTER CAN STOP A QUALIFIED POOL SHARE HOLDER FROM DENYING THE MINTER DURING THE APPLICATION PERIOD BY FRONT-RUNNING THE TRANSACTION

Lines of code Vulnerability details Impact A minter can stop a Qualified pool share holder from denying the minter during the application period by front-running the transaction Consider the following scenario: 1 . Assume minter is User A and Qualified pool share holder is User B. 2 . User A call...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

Position created with BNB as collateral will result in locked collateral

Lines of code Vulnerability details withdrawCollateral allows position owners to withdraw collateral from the position - as long as it is still collateralized afterwards. File: Position.sol 263: function withdrawCollateraladdress target, uint256 amount public onlyOwner noChallenge noCooldown 264:...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.10 views

Use of revert Statement in requireOwner Function in Ownable Contract May Cause Unexpected Behavior

Lines of code Vulnerability details Summary: There is a potential issue with the error handling in the requireOwner function that may lead to unexpected behavior. Description: Description: The Ownable contract provides basic access control by defining an owner address that can be granted exclusiv...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.12 views

Lack of validation in opening positions parameters can lead to critical vulnerabilities at protocol level

Lines of code Vulnerability details Suspicious positions may be denied by voters if they don't seem legit, but over time it is very possible that one of them lands in the protocol, which can involve serious risks. Some attributes may not seem harmful with certain values at first sight, and can le...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.10 views

Minter and position privileges allow unrestricted minting and burning of arbitrary tokens

Lines of code Vulnerability details Any registered minter and a position belonging to him have absolute control of minting and burning tokens on all accounts. Impact New minting mechanisms are subject to governance approval i.e. can be veto’ed. These, however, will be arbitrary contracts with...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.11 views

Attacker can extract unlimited ZCHF by setting a high price for a position and challenging it

Lines of code Vulnerability details An attacker can act as both minter and challenger, and profit by setting an arbitrarily high price for a position way higher than what the collateral really is worth, and then immediately challenging the position. After the challenge succeeds, the attacker will...

6.3AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.10 views

Position ownership could be transferred to zero address

Lines of code Vulnerability details Impact Ownership of a Position could be transferred to zero address. This is usually caused by mistake but the consequence is loss of collateral. Proof of Concept The position owner calls transferOwnership but accidentally set newOwner address to 0x0. Tools Use...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

The owner of position can mint zchf unlimitedly by becoming the challenger that successfully challenges their own position to receive unlimit reward.

Lines of code Vulnerability details Summary The owner of position can become the challenger of his position and end the challenge within the same block after the open the position to earn unlimited reward. By executing within the same block, the owner could prevent the intervention of other...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.10 views

POSITION LIMIT COULD BE FULLY REDUCED TO ZERO BY CLONES

Lines of code Vulnerability details Impact A newly opened position could have its limit fully reduced to zero as soon as the cooldown period has elapsed. Proof of Concept As seen in the function below, a newly opened position with 0 Frankencoin minted could have its limit turn 0 if the function...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.9 views

can launch a challenge without any collateral in MintingHub.sol

Lines of code Vulnerability details Impact launchChallenge... function in MintingHub.sol ignores return value by challenge.position.collateral.transferFrom Several tokens do not revert in case of failure and return false. If the token used as collateral return false, the user can launch a challen...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

Share accounting is incorrect

Lines of code Vulnerability details Bug Description Share Distrbution In the Equity contract, the amount of shares minted to a depositor is determined using calculateSharesInternal: Equity.solL266-L270 function calculateSharesInternaluint256 capitalBefore, uint256 investment internal view returns...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.10 views

Allowance not updated correctly

Lines of code Vulnerability details Impact allowance doesn't get updated properly therefore an attacker contract can exploit the token contract by transferring some tokens and still spend the same amount of allowance. Here are the steps: calling approve function from ERC20.sol with the spender...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.9 views

Equity.sol : restructureCapTable is not using correct index in array

Lines of code Vulnerability details Impact When array of addresses are passed to restructure in the emergency situation, contract would revert due to accessing the first index always. Not able to restructure in single call during emergency. Proof of Concept function restructureCapTableaddress...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.8 views

ERC777 Re-entrancy Risk

Lines of code Vulnerability details Impact The code does not screen out for tokens that use the erc777 standard and therefore presents a re-entrancy risk via the token's callback function Proof of Concept Tools Used Manual Recommended Mitigation Steps Add in re-entrancy lock to function --- The...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.14 views

Position.sol: usage of an incorrect version of Ownable library can potentially malfunction all onlyOwner functions

Lines of code Vulnerability details Impact // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol The current implementaion is using a non-upgradeable version of the Ownable library isnstead of the upgradeable version:...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.9 views

An attacker can mint himself many tokens for free by cloning a position and adjusting its price

Lines of code Vulnerability details Impact A malicious attacker can mint himself the max limit amount of tokens of any position for free, by cloning a position and manipulating its price. Proof of Concept Steps overview: 1. a The attacker clones an existing position 2. b The attacker sets the pri...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

There is no way to withdraw the Fees from the reserve contract

Lines of code Vulnerability details Impact This will mean 1000 of dollars worth of ZCHF in fees cannot be withdrawn by the owner Proof of Concept The reserve contract currentlyor can be the frankencoin contract also lacks a function for withdrawing ZCHF tokens, which are deposited as fees when...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

[H-06] Double-entrypoint collateral token allows position owner to withdraw underlying collateral without repaying ZCHF

Lines of code Vulnerability details Impact Position::withdraw is intended to allow the position owner to withdraw any ERC20 token which might have ended up at position address. If the collateral address is passed as argument then Position::withdrawCollateral is called to perform the necessary...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.6 views

votes[to] mapping anchor time not adjusted correctly in Equity.adjustRecipientVoteAnchor() can lead to unexpected results

Lines of code Vulnerability details H-01 votesto mapping anchor time not adjusted correctly in Equity.adjustRecipientVoteAnchor can lead to unexpected results Proof of Concept Equity.solL161 function adjustRecipientVoteAnchoraddress to, uint256 amount internal returns uint256 if to != address0x0...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.5 views

Malicious redeem prevention

Lines of code Vulnerability details Impact Sending FPS to a person affects his voteAnchor and can prevent him from withdrawing money for a long time Proof of Concept Since canRedeem function is using voteAnchor to determine holding period and sending FPS evokes adjustRecipientVoteAnchor, which...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.15 views

Positions can be created to mint unlimited tokens and still run off with the provided collateral.

Lines of code Vulnerability details Impact Brief Introduction A compromised position can be used to mint tokens up to the limit. The attacker can also withdraw this collateral. Hence, the attacker can mint tokens against his collateral and withdraw his collateral at the same time. Explanation...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.11 views

Reentrancy Attack Vulnerability in StablecoinBridge Contract

Lines of code Vulnerability details Impact The vulnerability can potentially drain the funds of the contract by allowing an attacker to repeatedly call the mint or burn functions and re-enter the mintInternal or burnInternal functions before they complete. Proof of Concept To deploy the...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.5 views

Result of transferFrom and transfer are not checked.

Lines of code Vulnerability details M-01 result of transferFrom and transfer are not checked. It may lead to assets lost if the transfer is somehow failed. below are some examples: contracts/Position.sol 138: collateral.transferFrommsg.sender, addressthis, newCollateral - colbal; 228:...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.1 views

can open a position without any collateral in MintingHub.sol

Lines of code Vulnerability details Impact openPosition... function in MintingHub.sol ignores return value by challenge.position.collateral.transferFrom Several tokens do not revert in case of failure and return false. The require still pass but then, if the token used as collateral return false,...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.8 views

end() reverts if bidder blacklisted by collateral token, grieving challenger

Lines of code Vulnerability details A successful challenge can be ended via MintingHub.end. This transfers challenge.size collateral back to the challenger, before repaying the challenge and paying the challenger the reward. In this call, position.notifyChallengeSucceeded is called. This transfer...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.8 views

An attacker whose a 3% shareholder can wipe-out all the tokens of anyone using a flash-loan

Lines of code Vulnerability details Impact A 3% votes holder can wipe the equity of any other holder using the restructureCapTable function. Proof of Concept 1. a Be a 3% votes holder or have helpers that together have 3% 2. b Reduce the equity to be less than MINIMUMEQUITY This could be done by...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.6 views

createNewPosition/clonePosition/createClone are suspicious of the reorg attack

Lines of code Vulnerability details Description The createNewPosition function creates a new position smart contract and returns its address. The address is determined by create address derivation, that depends on the contract nonce. Later user could use interact with newly created contract. At t...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.12 views

Lack of slippage in redeem can result in loss of shares for redeemer

Lines of code Vulnerability details FPS holders can redeem their shares against zchf using redeem File: Equity.sol 276: function redeemaddress target, uint256 shares public returns uint256 //@audit no slippage, calculateProceeds can return 0 277: requirecanRedeemmsg.sender; 278: uint256 proceeds ...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

Challenger incentives can be inflated with external transfers

Lines of code Vulnerability details Impact The function notifyChallengeSucceeded calculates the volume of ZCHF to be repaid, which is then used to calculate the reward for the challenger. The challenger can however artificially inflate this value. A challenger can start a challenge on an...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.12 views

Burn logic issue due to lack of checking parameter 0 in burnWithReserve function

Lines of code Vulnerability details Impact The token quantity is sent to 0 and then the token is internally burned, causing a logic problem. Proof of Concept 1. burnWithReserve - reservePPM = 0 2. calculateFreedAmount call - The result is scaled by the ratio of currentReserve and minterReserve...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.17 views

Challenging invalid positions can allow an attacker to reward himself with infinite tokens

Lines of code Vulnerability details Impact An attacker can mint himself as many Frankencoins as he wants in a single transaction by challenging an invalid position. Proof of Concept Steps overview: Since there's no check on the validity of a position when challenging it, an attacker can: 1. a...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.8 views

function restructureCapTable() in Equity.sol not functioning as expected

Lines of code Vulnerability details Impact Incorrect typo in function restructureCapTable leading to only burning tokens of first address of addressToWipe array arguement. Proof of Concept Here, in L313, addressToWipe0 only takes first address of the array. While ignoring the rest and also since...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.9 views

Anyone can open any position with no init period

Lines of code Vulnerability details Impact Anyone can immediately open a malicious position by calling openPosition... and passing 0 as initPeriodSeconds. Proof of Concept The function on line has public visibility, whereas I suspect it should be private. This effectively means anyone can mint an...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.14 views

User minting FPS can get grieved by equity loss event

Lines of code Vulnerability details minting in onTokenTransfer handles the case equity = MINIMUMEQUITY, "insuf equity"; // ensures that the initial deposit is at least 1000 ZCHF 245: 246: // Assign 1000 FPS for the initial deposit, calculate the amount otherwise 247: uint256 shares = equity =...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.8 views

Unrestricted Token Transfer and Minting

Lines of code Vulnerability details Impact An attacker could exploit this vulnerability to mint an unlimited number of tokens, potentially devaluing the token and manipulating the market. Proof of Concept: Proof of Concept --The contract allows anyone to call the onTokenTransfer function without...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

Challenges can be frontrun with de-leveraging to cause lossses for challengers

Lines of code Vulnerability details Impact Challenges, once created, cannot be closed. Thus once a challenge is created, the challenger has already transferred in a collateral amount and is thus open for losing their collateral to a bidding war which will most likely close below market price, sin...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.8 views

Signature malleability for S

Lines of code Vulnerability details Impact Ethereum contracts often assumes that the signature is unique, but signatures can be altered without the possession of the private key and still be valid. The EVM specification defines several so-called ‘precompiled’ contracts one of them being ecrecover...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.9 views

Underflow in suggestMinter function

Lines of code Vulnerability details Impact The suggestMinter function in the smart contract allows users to suggest a new minter address by specifying an application period, an application fee, and a message. The function sets the mintersminter mapping to the current block timestamp plus the...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

Equity.restructureCapTable only restructures one address at a time

Lines of code Vulnerability details Equity.restructureCapTable allows qualified FPS holders to restructure the system, that is: burning shares of other holders that did not participate in putting equity above water. File: Equity.sol 309: function restructureCapTableaddress calldata helpers, addre...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.5 views

Sound adjusting of a position could fail

Lines of code Vulnerability details Impact Increasing collateral and decreasing it's liquidation price, such that with new liquidation price and old collateral position is becoming unsound, leads to a revert. Such situation can happen often, imagine position that's fully minted and has market pri...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.4 views

Lack of zero address check throughout the codebase could lead to unwanted redeployments, address(0) ownership and onTokenTransfer unsuccessful.

Lines of code Vulnerability details Impact User defined address should always have zero address check. This checks SHOULD NOT BE MISSED IN CASE OF A FACTORY CONTRACT. This will lead to redeployments of contract and blockage of certain functionality as described below. It is also worth to note tha...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.7 views

Return values of ERC20 transfer and transferFrom are unchecked

Lines of code https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/StablecoinBridge...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/04/19 12:0 a.m.10 views

Let Me Suggest For You

Lines of code Vulnerability details Impact Scope of vulnerabiliy - This vulnerability allows any user including users the do not own any share tokens to effectivly cast a veto on a minter suggetion. The only requirement to excecute the vulnerability is to have the minimun fee in the acccount. In...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/14 12:0 a.m.12 views

if revertOnFailure is set to false, batchContributeFor doesn't refund properly

Lines of code Vulnerability details Proof of Concept Consider the code for batchContributeFor: function batchContributeFor BatchContributeForArgs calldata args external payable onlyDelegateCall returns uint96 memory votingPowers uint256 numContributions = args.recipients.length; votingPowers = ne...

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

Use of _mint in ReraiseETHCrowdfund#_contribute is incompatible with PartyGovernanceNFT#mint

Lines of code Vulnerability details Impact Misconfigured receiver could accidentally DOS party Proof of Concept ReraiseETHCrowdfund.solL238 if previousVotingPower == 0 mintcontributor; - @audit-issue standard minting here ReraiseETHCrowdfund.solL374 uint256 tokenId = party.mintcontributor,...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/14 12:0 a.m.8 views

ETHCrowdfundBase#_calculateRefundAmount can return too many funds to users and brick refunds

Lines of code Vulnerability details Impact Malicious user can honeypot and grief users causing loss of funds Proof of Concept ETHCrowdfundBase.solL227-L230 if fundingSplitRecipient != address0 && fundingSplitBps 0 uint96 feeAmount = amount fundingSplitBps / 1e4; amount -= feeAmount; When a user...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/04/14 12:0 a.m.2 views

InitialETHCrowdfund.batchContributeFor() doesn't refund for failed contributes

Lines of code Vulnerability details Impact InitialETHCrowdfund.batchContributeFor doesn't refund for failed contributes when args.revertOnFailure is false. The funds will be locked in the initial crowdfund contract, so it should be refunded. Proof of Concept InitialETHCrowdfund.batchContributeFor...

6.9AI score
Exploits0
Total number of security vulnerabilities10190