Skip to content

Conversation

@zhoujia6139
Copy link
Contributor

Security Checklist

  • 1. Re-Entrancy
  • 2. Arithmetic Over/Under Flows
  • 3. Unexpected Ether
  • 4. Delegatecall
  • 5. Default Visibilities
  • 6. Entropy Illusion
  • 7. External Contract Referencing
  • 8. Short Address/Parameter Attack (off chain)
  • 9. Unchecked CALL Return Values
  • 10. Race Conditions / Front Running
  • 11. Denial Of Service (DOS)
  • 12. Block Timestamp Manipulation
  • 13. Constructors with Care
  • 14. Uninitialized Storage Pointers
  • 15. Floating Points and Precision
  • 16. Tx.Origin Authentication
  • 17. Address.isContract Re-Entrancy via Constructor

⚠️ NOTES ⚠️

Make sure to think about each of these exploits in this PR.

@zhoujia6139 zhoujia6139 requested a review from a team as a code owner August 14, 2023 08:52
@zhoujia6139 zhoujia6139 marked this pull request as draft August 14, 2023 08:52
@zhoujia6139 zhoujia6139 marked this pull request as ready for review August 15, 2023 05:32
@zhoujia6139 zhoujia6139 requested a review from a team as a code owner August 15, 2023 05:32
amount1Min
);

// refund unused tokens

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if token0 & token1 are not WETH, we need to refund ETH to user when msg.value > 0.

@zhoujia6139 zhoujia6139 mentioned this pull request Aug 28, 2023
17 tasks
require(token0 == weth || token1 == weth, Errors.INVALID_AMOUNT);
token0IsETH = (token0 == weth);
token1IsETH = (token1 == weth);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are many duplicated code here, I think we can declare variable to represent ethToken, ethAmount

} else {
IERC20(token0).safeTransfer(payer, refund0);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here I think we can remove duplicated code

@0x8f701
Copy link
Contributor

0x8f701 commented Sep 5, 2023

I think upgrade script should also be fixed by adding Izumi LP

NTokenOtherdeed,
NTokenStakefish,
NTokenChromieSquiggle,
NTokenIZUMILp,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will break PTokenStKSM which is deployed on moonbeam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants