bnb-party / BNBParty.Factory

Smart contract manages Liquidity Pools and Token creation, enabling decentralized swaps and liquidity handling
MIT License
2 stars 0 forks source link

fix `reentrancy-no-eth` slither warning #67

Closed YouStillAlive closed 1 month ago

github-actions[bot] commented 1 month ago

Methods

Symbol Meaning
Execution gas for this method does not include intrinsic gas overhead
Cost was non-zero but below the precision setting for the currency display (see options)
Min Max Avg Calls usd avg
BNBPartyFactory
       createParty(string,string) 5,728,901 5,905,663 5,764,366 36 15.74
       joinParty(address,uint256) 143,964 5,709,444 2,080,549 26 5.68
       leaveParty(address,uint256,uint256) 177,880 203,218 183,548 5 0.50
       pause() - - 46,851 5 0.13
       setBNBPartySwapRouter(address) 24,135 46,275 45,045 18 0.12
       setNonfungiblePositionManager(address,address) 27,416 68,950 66,640 18 0.18
       setSwapRouter(address) - - 46,298 16 0.13
       unpause() - - 24,885 5 0.07
       withdrawFee() - - 31,766 2 0.09
       withdrawLPFee(address[]) - - 173,618 1 0.47
       withdrawPartyLPFee(address[]) - - 173,798 2 0.47
NonfungiblePositionManager
       approve(address,uint256) 46,052 46,395 46,303 4 0.13
SwapRouter
       exactInput((bytes,address,uint256,uint256,uint256)) 135,887 145,445 142,259 3 0.39
       multicall(bytes[]) - - 163,901 2 0.45

Deployments

Min Max Avg Block % usd avg
BNBPartyFactory 3,704,885 3,704,897 3,704,896 2.8 % 10.12
MockContract - - 107,813 0.1 % 0.29
MockNonfungibleTokenPositionDescriptor - - 111,329 0.1 % 0.30
NonfungiblePositionManager 5,171,500 5,171,524 5,171,518 4 % 14.12
SqrtPriceCalculator - - 278,712 0.2 % 0.76
SwapRouter 2,201,066 2,201,090 2,201,085 1.7 % 6.01
UniswapV3Factory 5,437,097 5,437,109 5,437,108 4.2 % 14.85

Solidity and Network Config

Settings Value
Solidity: version 0.8.26
Solidity: optimized true
Solidity: runs 200
Solidity: viaIR false
Block Limit 130,000,000
L1 Gas Price 5 gwei
Token Price 546.15 usd/bnb
Network BINANCE
Toolchain hardhat
codecov-commenter commented 1 month ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines Coverage Δ
contracts/BNBPartyCreation.sol 100.00% <100.00%> (ø)
contracts/BNBPartyFactory.sol 100.00% <100.00%> (ø)
contracts/BNBPartyLiquidity.sol 100.00% <100.00%> (ø)
github-actions[bot] commented 1 month ago

Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results. Summary

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyLiquidity.sol#L14-L56

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyLiquidityHelper.sol#L16-L40

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyCreation.sol#L43-L77

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyManageable.sol#L93-L105

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartySwaps.sol#L47-L53

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyFee.sol#L70-L82

reentrancy-benign

Impact: Low Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyLiquidity.sol#L14-L56

reentrancy-events

Impact: Low Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartySwaps.sol#L13-L22

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartySwaps.sol#L13-L22

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartySwaps.sol#L13-L22

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyLiquidity.sol#L14-L56

naming-convention

Impact: Informational Confidence: High

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyState.sol#L27

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyState.sol#L14

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyManageable.sol#L35

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyManageable.sol#L15

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/interfaces/INonfungiblePositionManager.sol#L184

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyManageable.sol#L16

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyManageable.sol#L29

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartyState.sol#L16

reentrancy-unlimited-gas

Impact: Informational Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/24fb39c8a0b45865ac0d5316facd669fa6702f87/contracts/BNBPartySwaps.sol#L13-L22