This report was generated by Aderyn, a static analysis tool built by Cyfrin, a blockchain security company. This report is not a substitute for manual audit or security review. It should not be relied upon for any purpose other than to assist in the identification of potential security vulnerabilities.
Key | Value |
---|---|
.sol Files | 2 |
Total nSLOC | 350 |
Filepath | nSLOC |
---|---|
src/PoolFactory.sol | 35 |
src/TSwapPool.sol | 315 |
Total | 350 |
Category | No. of Issues |
---|---|
Critical | 0 |
High | 0 |
Medium | 1 |
Low | 1 |
NC | 3 |
Using ERC721::_mint()
can mint ERC721 tokens to addresses which don't support ERC721 tokens. Use _safeMint()
instead of _mint()
for ERC721.
-
Found in src/TSwapPool.sol Line: 193
_mint(msg.sender, liquidityTokensToMint);
Solc compiler version 0.8.20 switches the default target EVM version to Shanghai, which means that the generated bytecode will include PUSH0 opcodes. Be sure to select the appropriate EVM version in case you intend to deploy on a chain other than mainnet like L2 chains that may not support PUSH0, otherwise deployment of your contracts will fail.
-
Found in src/PoolFactory.sol Line: 15
pragma solidity 0.8.20;
-
Found in src/TSwapPool.sol Line: 15
pragma solidity 0.8.20;
-
Found in src/TSwapPool.sol Line: 296
function swapExactInput(
-
Found in src/TSwapPool.sol Line: 274
uint256 inputAmountMinusFee = inputAmount * 997;
-
Found in src/TSwapPool.sol Line: 276
uint256 denominator = (inputReserves * 1000) + inputAmountMinusFee;
-
Found in src/TSwapPool.sol Line: 292
((inputReserves * outputAmount) * 10000) /
-
Found in src/TSwapPool.sol Line: 293
((outputReserves - outputAmount) * 997);
-
Found in src/TSwapPool.sol Line: 403
outputToken.safeTransfer(msg.sender, 1_000_000_000_000_000_000);
-
Found in src/TSwapPool.sol Line: 455
1e18,
-
Found in src/TSwapPool.sol Line: 464
1e18,
Index event fields make the field more quickly accessible to off-chain tools that parse events. However, note that each index field costs extra gas during emission, so it's not necessarily best to index the maximum allowed per event (three fields). Each event should use three indexed fields if there are three or more fields, and gas usage is not particularly of concern for the events in question. If there are fewer than three fields, all of the fields should be indexed.