-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart Contract Issues #193
Comments
@0xneves @alextnetto Please have a look! |
Hey @1nc0gn170 , thank you so much for your submission!! As you enlightened us, the The unchecked should be removed from every inline assembly as proposed! Regarding best practices for token safety, I believe it can be reinforced in the front end instead, especially because safeTransferFrom is not implemented in all types of tokens. For this first version where don't threat every case separately, we will delegate token safety to the user himself. In next versions we indeed will create function such as |
Thanks for the quick response!
Thanks! |
Hey @1nc0gn170, thanks a lot for your efforts in reviewing the code! |
Bug Report
Hey Team!
Just had a brief look at swaplace contracts and would like to report a couple of issues!
Issues List:
In the function
Swaplace.acceptSwap()
, while iterating over assets, counter is updated incorrectly;This is actually incorrect, it should be just this
Note: Also there is no need to use
unchecked
for assembly, no validation for overflows happens inside assembly block.transferFrom
instead ofsafeTransferFrom
There are certain smart contracts that do not support ERC721, using transferFrom() may result in the NFT being sent to such contracts and get stuck. Also note that using
safeTransferFrom
can introducereentrancy
issues use reentrancy guard.As there is no validation for asset addresses, a malicious user might forge a token contract which will not abort the execution on token failure, instead it just fails silently. This will help the attacker gain other persons tokens without even swaping. Use
safeTransferFrom
also maintain a token whitelist.For any further help regarding audits please reach out to me here: https://cantina.xyz/u/1nc0gn170
Thanks
The text was updated successfully, but these errors were encountered: