Platform: Code4rena
Start Date: 06/01/2022
Pot Size: $60,000 USDC
Total HM: 20
Participants: 33
Period: 7 days
Judge: LSDan
Total Solo HM: 9
Id: 67
League: ETH
Rank: 15/33
Findings: 3
Award: $1,159.81
π Selected for report: 1
π Solo Findings: 0
90.0579 USDC - $90.06
pedroais
Dangerous external calls in the middle of various state changes could cause reentrancy issues since there is no reentrancy guard in any functions.
When users call the deposit or sponsor functions a deposit NFT is minted. The _safeMint() function that's used makes an unsafe external call to the receiver contract that could reenter any function of the protocol.
The safe mint function calls _checkOnERC721Received which will make an external call to the contract receiving the NFT.
An example of safeMint being used for reentrancy can be found in this blog post by samczsun : https://www.paradigm.xyz/2021/08/the-dangers-of-surprising-code/
Add reentrancy guard to all public statechanching functions.
#0 - naps62
2022-01-13T12:59:36Z
duplicate of #3
105.9124 USDC - $105.91
pedroais
Users may have to wait more time than predicted to withdraw funds.
The vault's funds are distributed between the vault and the investment strategy but withdrawals come only from funds that are currently inside the vault. This means that multiple depositors (or one big depositor) may not be able to withdraw their funds at the same time.
-Alice and bob deposit 100 tokens each so the total balance is 200 -50% of the funds are invested -There are 100 tokens in the vault and 100 in the strategy -If bob withdraws his funds then Alice can't do it anymore and has to wait for her tokens to be brought back to the vault by the admins -This means if you're not one of the firsts to withdraw you may have to wait an arbitrary amount of time (dependant on admins) to get your tokens back
#0 - naps62
2022-01-13T12:13:01Z
@gabrielpoca isn't this actually a duplicate of https://github.com/code-423n4/2022-01-sandclock-findings/issues/76 ?
#1 - gabrielpoca
2022-01-13T12:14:32Z
nope, they are different issues, but this is the one I was looking for, ty!
#2 - gabrielpoca
2022-01-14T10:35:57Z
actually, you are correct
107.6181 USDC - $107.62
pedroais
The deposit amount could be 0
Require amount != 0
#0 - naps62
2022-01-13T19:59:28Z
duplicate of #155
#1 - dmvt
2022-01-28T23:50:12Z
duplicate of #64
π Selected for report: pedroais
590.4972 USDC - $590.50
pedroais
The claiming percentage can be set to 0 for a claimer https://github.com/code-423n4/2022-01-sandclock/blob/a90ad3824955327597be00bb0bd183a9c228a4fb/sandclock/contracts/Vault.sol#L420
Require claim.ptc != 0
#0 - naps62
2022-02-15T17:52:41Z
265.7237 USDC - $265.72
pedroais
The description for the underlying() and minLockPeriod() is the same
#0 - gabrielpoca
2022-01-13T23:56:00Z