Closed code423n4 closed 2 years ago
leastwood
The sponsor() function allows sponsors to parse the zero amount successfully. As a result, a deposit NFT will be minted which provides no functionality to the user.
sponsor()
https://github.com/code-423n4/2022-01-sandclock/blob/main/sandclock/contracts/Vault.sol
Manual code review.
Consider only allowing users to sponsor the protocol with a positive amount, i.e. _amount != 0.
_amount != 0
Fixed in https://github.com/sandclock-org/solidity-contracts/pull/85
Handle
leastwood
Vulnerability details
Impact
The
sponsor()
function allows sponsors to parse the zero amount successfully. As a result, a deposit NFT will be minted which provides no functionality to the user.Proof of Concept
https://github.com/code-423n4/2022-01-sandclock/blob/main/sandclock/contracts/Vault.sol
Tools Used
Manual code review.
Recommended Mitigation Steps
Consider only allowing users to sponsor the protocol with a positive amount, i.e.
_amount != 0
.