SafeAffinity Token Logo

AFFINITY [SafeAffinity] Token

About AFFINITY

Listings

Token 2 years
CoinMarketCap 2 years
white paper

Affinity is a project on the BSC network. Affinity rewards its holders in ADA and BUSD. Most importantly Affinity is the creator of ADAPT. ADAPT is the first peer to peer transaction platform where you only have to send tokens by use of a username. Ditch the wallet addresses when sending tokens and use ADAPT!

Social

Laser Scorebeta Last Audit: 17 January 2022

report
Token seems to be (relatively) fine. It still become a scam, but probability is moderate.

SafeAffinity.reflectAndDistribute() (SafeAffinity.sol#267-289) sends eth to arbitrary user
Dangerous calls:
- (successful,None) = address(marketingFeeReceiver).call{gas: 26000,value: amountBNBMarketing}() (SafeAffinity.sol#280)
Ensure that an arbitrary user cannot withdraw unauthorized funds.

Additional information: link

Reentrancy in SafeAffinity._transferFrom(address,address,uint256) (SafeAffinity.sol#159-190):
External calls:
- reflectAndDistribute() (SafeAffinity.sol#181)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#276)
- distributor.deposit() (SafeAffinity.sol#277)
- (successful,None) = address(marketingFeeReceiver).call{gas: 26000,value: amountBNBMarketing}() (SafeAffinity.sol#280)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#285)
- distributor.deposit() (SafeAffinity.sol#286)
- (amountReceived,success) = handleTransferBody(sender,recipient,amount) (SafeAffinity.sol#182)
- distributor.setShare(sender,_balances[sender]) (SafeAffinity.sol#202)
- distributor.setShare(recipient,_balances[recipient]) (SafeAffinity.sol#205)
External calls sending eth:
- reflectAndDistribute() (SafeAffinity.sol#181)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#276)
- (successful,None) = address(marketingFeeReceiver).call{gas: 26000,value: amountBNBMarketing}() (SafeAffinity.sol#280)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#285)
State variables written after the call(s):
- (amountReceived,success) = handleTransferBody(sender,recipient,amount) (SafeAffinity.sol#182)
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (SafeAffinity.sol#195)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (SafeAffinity.sol#219)
- _balances[recipient] = _balances[recipient].add(amountReceived) (SafeAffinity.sol#199)
Reentrancy in AffinityDistributor.deposit() (AffinityDistributor.sol#101-146):
External calls:
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: swapToTokenThreshold}(0,path,address(this),block.timestamp.add(30)) (AffinityDistributor.sol#112-117)
State variables written after the call(s):
- earnsTurnPurchase = false (AffinityDistributor.sol#123)
Reentrancy in AffinityDistributor.deposit() (AffinityDistributor.sol#101-146):
External calls:
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: swapToTokenThreshold}(0,path_scope_1,address(this),block.timestamp.add(30)) (AffinityDistributor.sol#133-138)
State variables written after the call(s):
- earnsTurnPurchase = true (AffinityDistributor.sol#144)
Apply the check-effects-interactions pattern.

Additional information: link


Unable to verify that contract auditor is trusted: Certik, Quantstamp, Hacken, Solidity, Paladinsec, Openzeppelin, Verichains


Combination 1: Reentrancy vulnerabilities + Functions that send Ether to arbitraty destination. Usual for scams. May be justified by some complex mechanics (e.g. rebase, reflections). DYOR & manual audit are advised.

SafeAffinity.reflectAndDistribute().amountBNBMarketing (SafeAffinity.sol#270) is a local variable never initialized
Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.

Additional information: link

AffinityDistributor.distributeEarnDividend(address) (AffinityDistributor.sol#243-255) has external calls inside a loop: success = IERC20(SafeEarn).transfer(shareholder,amount) (AffinityDistributor.sol#248)
AffinityDistributor.distributeVaultDividend(address) (AffinityDistributor.sol#229-241) has external calls inside a loop: success = IERC20(SafeVault).transfer(shareholder,amount) (AffinityDistributor.sol#234)
Favor pull over push strategy for external calls.

Additional information: link

Reentrancy in SafeAffinity._transferFrom(address,address,uint256) (SafeAffinity.sol#159-190):
External calls:
- swapBack() (SafeAffinity.sol#178)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(swapAmount,0,path,address(this),block.timestamp) (SafeAffinity.sol#248-254)
- (amountReceived,success) = handleTransferBody(sender,recipient,amount) (SafeAffinity.sol#179)
- distributor.setShare(sender,_balances[sender]) (SafeAffinity.sol#202)
- distributor.setShare(recipient,_balances[recipient]) (SafeAffinity.sol#205)
State variables written after the call(s):
- (amountReceived,success) = handleTransferBody(sender,recipient,amount) (SafeAffinity.sol#179)
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (SafeAffinity.sol#195)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (SafeAffinity.sol#219)
- _balances[recipient] = _balances[recipient].add(amountReceived) (SafeAffinity.sol#199)
Reentrancy in AffinityDistributor.distributeEarnDividend(address) (AffinityDistributor.sol#243-255):
External calls:
- success = IERC20(SafeEarn).transfer(shareholder,amount) (AffinityDistributor.sol#248)
State variables written after the call(s):
- shares[shareholder].totalRealisedEarn = shares[shareholder].totalRealisedEarn.add(amount) (AffinityDistributor.sol#251)
- shares[shareholder].totalExcludedEarn = getCumulativeEarnDividends(shares[shareholder].amount) (AffinityDistributor.sol#252)
Reentrancy in AffinityDistributor.distributeVaultDividend(address) (AffinityDistributor.sol#229-241):
External calls:
- success = IERC20(SafeVault).transfer(shareholder,amount) (AffinityDistributor.sol#234)
State variables written after the call(s):
- shares[shareholder].totalRealisedVault = shares[shareholder].totalRealisedVault.add(amount) (AffinityDistributor.sol#237)
- shares[shareholder].totalExcludedVault = getCumulativeVaultDividends(shares[shareholder].amount) (AffinityDistributor.sol#238)
Reentrancy in AffinityDistributor.process(uint256) (AffinityDistributor.sol#148-195):
External calls:
- distributeEarnDividend(shareholders[currentIndexEarn]) (AffinityDistributor.sol#167)
- success = IERC20(SafeEarn).transfer(shareholder,amount) (AffinityDistributor.sol#248)
State variables written after the call(s):
- currentIndexEarn ++ (AffinityDistributor.sol#172)
Reentrancy in AffinityDistributor.process(uint256) (AffinityDistributor.sol#148-195):
External calls:
- distributeVaultDividend(shareholders[currentIndexVault]) (AffinityDistributor.sol#184)
- success = IERC20(SafeVault).transfer(shareholder,amount) (AffinityDistributor.sol#234)
State variables written after the call(s):
- currentIndexVault ++ (AffinityDistributor.sol#189)
Reentrancy in AffinityDistributor.setShare(address,uint256) (AffinityDistributor.sol#82-99):
External calls:
- distributeVaultDividend(shareholder) (AffinityDistributor.sol#84)
- success = IERC20(SafeVault).transfer(shareholder,amount) (AffinityDistributor.sol#234)
- distributeEarnDividend(shareholder) (AffinityDistributor.sol#85)
- success = IERC20(SafeEarn).transfer(shareholder,amount) (AffinityDistributor.sol#248)
State variables written after the call(s):
- distributeEarnDividend(shareholder) (AffinityDistributor.sol#85)
- shares[shareholder].totalRealisedEarn = shares[shareholder].totalRealisedEarn.add(amount) (AffinityDistributor.sol#251)
- shares[shareholder].totalExcludedEarn = getCumulativeEarnDividends(shares[shareholder].amount) (AffinityDistributor.sol#252)
- shares[shareholder].amount = amount (AffinityDistributor.sol#95)
- shares[shareholder].totalExcludedVault = getCumulativeVaultDividends(shares[shareholder].amount) (AffinityDistributor.sol#96)
- shares[shareholder].totalExcludedEarn = getCumulativeEarnDividends(shares[shareholder].amount) (AffinityDistributor.sol#97)
Apply the check-effects-interactions pattern.

Additional information: link

AffinityDistributor.setDistributionCriteria(uint256,uint256,uint256) (AffinityDistributor.sol#76-80) should emit an event for:
- minPeriod = _minPeriod (AffinityDistributor.sol#77)
- minDistribution = _minDistribution (AffinityDistributor.sol#78)
SafeAffinity.setFees(uint256,uint256,uint256,uint256) (SafeAffinity.sol#351-359) should emit an event for:
- burnFee = _burnFee (SafeAffinity.sol#352)
- marketingFee = _marketingFee (SafeAffinity.sol#354)
- totalFeeSells = _burnFee.add(_reflectionFee).add(_marketingFee) (SafeAffinity.sol#355)
- totalFeeBuys = _buyFee (SafeAffinity.sol#356)
SafeAffinity.setSwapBackSettings(bool,uint256,bool,uint256,bool,uint256) (SafeAffinity.sol#380-387) should emit an event for:
- swapThreshold = _swapThreshold (SafeAffinity.sol#382)
- swapThresholdPercentOfCirculatingSupply = _percentOfCirculatingSupply (SafeAffinity.sol#384)
Emit an event for critical parameter changes.

Additional information: link

AffinityDistributor.setSafeVaultAddress(address).newSafeVault (AffinityDistributor.sol#315) lacks a zero-check on :
- SafeVault = newSafeVault (AffinityDistributor.sol#316)
AffinityDistributor.setSafeEarnAddress(address).newSafeEarn (AffinityDistributor.sol#320) lacks a zero-check on :
- SafeEarn = newSafeEarn (AffinityDistributor.sol#321)
SafeAffinity.setAllowTransferToMarketing(bool,address)._marketingFeeReceiver (SafeAffinity.sol#395) lacks a zero-check on :
- marketingFeeReceiver = _marketingFeeReceiver (SafeAffinity.sol#397)
SafeAffinity.setDexRouter(address)._uniswapV2Pair (SafeAffinity.sol#405-406) lacks a zero-check on :
- pair = _uniswapV2Pair (SafeAffinity.sol#407)
Check that the address is not zero.

Additional information: link

Reentrancy in SafeAffinity.constructor() (SafeAffinity.sol#84-109):
External calls:
- pair = IUniswapV2Factory(router.factory()).createPair(router.WETH(),address(this)) (SafeAffinity.sol#89)
State variables written after the call(s):
- _allowances[address(this)][address(router)] = _totalSupply (SafeAffinity.sol#90)
- approve(_dexRouter,_totalSupply) (SafeAffinity.sol#105)
- _allowances[msg.sender][spender] = amount (SafeAffinity.sol#129)
- approve(address(pair),_totalSupply) (SafeAffinity.sol#106)
- _allowances[msg.sender][spender] = amount (SafeAffinity.sol#129)
- _balances[msg.sender] = _totalSupply (SafeAffinity.sol#107)
- distributor = new AffinityDistributor(_dexRouter) (SafeAffinity.sol#92)
- isDividendExempt[pair] = true (SafeAffinity.sol#102)
- isDividendExempt[address(this)] = true (SafeAffinity.sol#103)
- isFeeExempt[msg.sender] = true (SafeAffinity.sol#94)
- isFeeExempt[address(this)] = true (SafeAffinity.sol#95)
- isTxLimitExempt[msg.sender] = true (SafeAffinity.sol#97)
- isTxLimitExempt[marketingFeeReceiver] = true (SafeAffinity.sol#98)
- isTxLimitExempt[address(distributor)] = true (SafeAffinity.sol#99)
- isTxLimitExempt[address(this)] = true (SafeAffinity.sol#100)
Reentrancy in AffinityDistributor.deposit() (AffinityDistributor.sol#101-146):
External calls:
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: swapToTokenThreshold}(0,path,address(this),block.timestamp.add(30)) (AffinityDistributor.sol#112-117)
State variables written after the call(s):
- dividendsPerShareEARN = dividendsPerShareEARN.add(dividendsPerShareAccuracyFactor.mul(amount).div(totalShares)) (AffinityDistributor.sol#122)
- totalDividendsEARN = totalDividendsEARN.add(amount) (AffinityDistributor.sol#121)
Reentrancy in AffinityDistributor.deposit() (AffinityDistributor.sol#101-146):
External calls:
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: swapToTokenThreshold}(0,path_scope_1,address(this),block.timestamp.add(30)) (AffinityDistributor.sol#133-138)
State variables written after the call(s):
- dividendsPerShareVAULT = dividendsPerShareVAULT.add(dividendsPerShareAccuracyFactor.mul(amount_scope_2).div(totalShares)) (AffinityDistributor.sol#143)
- totalDividendsVAULT = totalDividendsVAULT.add(amount_scope_2) (AffinityDistributor.sol#142)
Reentrancy in AffinityDistributor.distributeEarnDividend(address) (AffinityDistributor.sol#243-255):
External calls:
- success = IERC20(SafeEarn).transfer(shareholder,amount) (AffinityDistributor.sol#248)
State variables written after the call(s):
- shareholderClaims[shareholder] = block.timestamp (AffinityDistributor.sol#250)
Reentrancy in AffinityDistributor.distributeVaultDividend(address) (AffinityDistributor.sol#229-241):
External calls:
- success = IERC20(SafeVault).transfer(shareholder,amount) (AffinityDistributor.sol#234)
State variables written after the call(s):
- shareholderClaims[shareholder] = block.timestamp (AffinityDistributor.sol#236)
Reentrancy in SafeAffinity.setDexRouter(address) (SafeAffinity.sol#401-410):
External calls:
- _uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this),router.WETH()) (SafeAffinity.sol#405-406)
State variables written after the call(s):
- _allowances[address(this)][address(router)] = _totalSupply (SafeAffinity.sol#408)
- pair = _uniswapV2Pair (SafeAffinity.sol#407)
Reentrancy in AffinityDistributor.setShare(address,uint256) (AffinityDistributor.sol#82-99):
External calls:
- distributeVaultDividend(shareholder) (AffinityDistributor.sol#84)
- success = IERC20(SafeVault).transfer(shareholder,amount) (AffinityDistributor.sol#234)
- distributeEarnDividend(shareholder) (AffinityDistributor.sol#85)
- success = IERC20(SafeEarn).transfer(shareholder,amount) (AffinityDistributor.sol#248)
State variables written after the call(s):
- distributeEarnDividend(shareholder) (AffinityDistributor.sol#85)
- shareholderClaims[shareholder] = block.timestamp (AffinityDistributor.sol#250)
- addShareholder(shareholder) (AffinityDistributor.sol#89)
- shareholderIndexes[shareholder] = shareholders.length (AffinityDistributor.sol#298)
- removeShareholder(shareholder) (AffinityDistributor.sol#91)
- shareholderIndexes[shareholders[shareholders.length - 1]] = shareholderIndexes[shareholder] (AffinityDistributor.sol#304)
- delete shareholderIndexes[shareholder] (AffinityDistributor.sol#306)
- addShareholder(shareholder) (AffinityDistributor.sol#89)
- shareholders.push(shareholder) (AffinityDistributor.sol#299)
- removeShareholder(shareholder) (AffinityDistributor.sol#91)
- shareholders[shareholderIndexes[shareholder]] = shareholders[shareholders.length - 1] (AffinityDistributor.sol#303)
- shareholders.pop() (AffinityDistributor.sol#305)
- totalShares = totalShares.sub(shares[shareholder].amount).add(amount) (AffinityDistributor.sol#94)
Apply the check-effects-interactions pattern.

Additional information: link

Reentrancy in SafeAffinity._transferFrom(address,address,uint256) (SafeAffinity.sol#159-190):
External calls:
- (amountReceived,success) = handleTransferBody(sender,recipient,amount) (SafeAffinity.sol#171)
- distributor.setShare(sender,_balances[sender]) (SafeAffinity.sol#202)
- distributor.setShare(recipient,_balances[recipient]) (SafeAffinity.sol#205)
Event emitted after the call(s):
- Transfer(sender,recipient,amountReceived) (SafeAffinity.sol#172)
Reentrancy in SafeAffinity._transferFrom(address,address,uint256) (SafeAffinity.sol#159-190):
External calls:
- swapBack() (SafeAffinity.sol#178)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(swapAmount,0,path,address(this),block.timestamp) (SafeAffinity.sol#248-254)
- (amountReceived,success) = handleTransferBody(sender,recipient,amount) (SafeAffinity.sol#179)
- distributor.setShare(sender,_balances[sender]) (SafeAffinity.sol#202)
- distributor.setShare(recipient,_balances[recipient]) (SafeAffinity.sol#205)
- reflectAndDistribute() (SafeAffinity.sol#181)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#276)
- distributor.deposit() (SafeAffinity.sol#277)
- (successful,None) = address(marketingFeeReceiver).call{gas: 26000,value: amountBNBMarketing}() (SafeAffinity.sol#280)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#285)
- distributor.deposit() (SafeAffinity.sol#286)
- (amountReceived,success) = handleTransferBody(sender,recipient,amount) (SafeAffinity.sol#182)
- distributor.setShare(sender,_balances[sender]) (SafeAffinity.sol#202)
- distributor.setShare(recipient,_balances[recipient]) (SafeAffinity.sol#205)
- (amountReceived,success) = handleTransferBody(sender,recipient,amount) (SafeAffinity.sol#184)
- distributor.setShare(sender,_balances[sender]) (SafeAffinity.sol#202)
- distributor.setShare(recipient,_balances[recipient]) (SafeAffinity.sol#205)
- distributor.process(distributorGas) (SafeAffinity.sol#185)
External calls sending eth:
- reflectAndDistribute() (SafeAffinity.sol#181)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#276)
- (successful,None) = address(marketingFeeReceiver).call{gas: 26000,value: amountBNBMarketing}() (SafeAffinity.sol#280)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#285)
Event emitted after the call(s):
- Transfer(sender,recipient,amountReceived) (SafeAffinity.sol#188)
Reentrancy in SafeAffinity.constructor() (SafeAffinity.sol#84-109):
External calls:
- pair = IUniswapV2Factory(router.factory()).createPair(router.WETH(),address(this)) (SafeAffinity.sol#89)
Event emitted after the call(s):
- Approval(msg.sender,spender,amount) (SafeAffinity.sol#130)
- approve(address(pair),_totalSupply) (SafeAffinity.sol#106)
- Approval(msg.sender,spender,amount) (SafeAffinity.sol#130)
- approve(_dexRouter,_totalSupply) (SafeAffinity.sol#105)
- Transfer(address(0),msg.sender,_totalSupply) (SafeAffinity.sol#108)
Reentrancy in SafeAffinity.deleteBag(uint256) (SafeAffinity.sol#427-443):
External calls:
- distributor.setShare(msg.sender,_balances[msg.sender]) (SafeAffinity.sol#439)
Event emitted after the call(s):
- Transfer(msg.sender,address(0),nTokens) (SafeAffinity.sol#441)
Reentrancy in SafeAffinity.reflectAndDistribute() (SafeAffinity.sol#267-289):
External calls:
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#276)
- distributor.deposit() (SafeAffinity.sol#277)
- (successful,None) = address(marketingFeeReceiver).call{gas: 26000,value: amountBNBMarketing}() (SafeAffinity.sol#280)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#285)
- distributor.deposit() (SafeAffinity.sol#286)
External calls sending eth:
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#276)
- (successful,None) = address(marketingFeeReceiver).call{gas: 26000,value: amountBNBMarketing}() (SafeAffinity.sol#280)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#285)
Event emitted after the call(s):
- FundDistributors(amountBNBReflection,amountBNBMarketing) (SafeAffinity.sol#288)
Reentrancy in SafeAffinity.setTokenAddresses(address,address) (SafeAffinity.sol#420-424):
External calls:
- distributor.setSafeEarnAddress(nSafeEarn) (SafeAffinity.sol#421)
- distributor.setSafeVaultAddress(nSafeVault) (SafeAffinity.sol#422)
Event emitted after the call(s):
- SwappedTokenAddresses(nSafeEarn,nSafeVault) (SafeAffinity.sol#423)
Reentrancy in SafeAffinity.swapBack() (SafeAffinity.sol#236-258):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(swapAmount,0,path,address(this),block.timestamp) (SafeAffinity.sol#248-254)
Event emitted after the call(s):
- SwappedBack(swapAmount,burnAmount) (SafeAffinity.sol#257)
Apply the check-effects-interactions pattern.

Additional information: link

AffinityDistributor.shouldDistributeVault(address) (AffinityDistributor.sol#219-222) uses timestamp for comparisons
Dangerous comparisons:
- shareholderClaims[shareholder] + minPeriod < block.timestamp && getUnpaidVaultEarnings(shareholder) > minDistribution (AffinityDistributor.sol#220-221)
AffinityDistributor.shouldDistributeEarn(address) (AffinityDistributor.sol#224-227) uses timestamp for comparisons
Dangerous comparisons:
- shareholderClaims[shareholder] + minPeriod < block.timestamp && getUnpaidEarnEarnings(shareholder) > minDistribution (AffinityDistributor.sol#225-226)
AffinityDistributor.claimEarnDividend(address) (AffinityDistributor.sol#257-260) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(shareholderClaims[claimer] + minAutoPeriod < block.timestamp,must wait at least the minimum auto withdraw period) (AffinityDistributor.sol#258)
AffinityDistributor.claimVAULTDividend(address) (AffinityDistributor.sol#262-265) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(shareholderClaims[claimer] + minAutoPeriod < block.timestamp,must wait at least the minimum auto withdraw period) (AffinityDistributor.sol#263)
Ownable.unlock() (Ownable.sol#71-76) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(block.timestamp > _lockTime,Contract is locked) (Ownable.sol#73)
Avoid relying on block.timestamp.

Additional information: link

Address.isContract(address) (Address.sol#24-33) uses assembly
- INLINE ASM (Address.sol#31)
Address._functionCallWithValue(address,bytes,uint256,string) (Address.sol#117-138) uses assembly
- INLINE ASM (Address.sol#130-133)
Do not use evm assembly.

Additional information: link

Different versions of Solidity is used:
- Version used: ['0.8.0', '^0.8.0']
- ^0.8.0 (Address.sol#2)
- 0.8.0 (AffinityDistributor.sol#2)
- ^0.8.0 (Context.sol#2)
- 0.8.0 (IAffinityDistributor.sol#2)
- ^0.8.0 (IERC20.sol#2)
- ^0.8.0 (IUniswapRouter02.sol#2)
- ^0.8.0 (IUniswapV2Factory.sol#2)
- ^0.8.0 (Ownable.sol#2)
- 0.8.0 (SafeAffinity.sol#2)
- ^0.8.0 (SafeMath.sol#2)
Use one Solidity version.

Additional information: link

AffinityDistributor.process(uint256) (AffinityDistributor.sol#148-195) has costly operations inside a loop:
- currentIndexEarn = 0 (AffinityDistributor.sol#163)
AffinityDistributor.process(uint256) (AffinityDistributor.sol#148-195) has costly operations inside a loop:
- currentIndexEarn ++ (AffinityDistributor.sol#172)
AffinityDistributor.process(uint256) (AffinityDistributor.sol#148-195) has costly operations inside a loop:
- currentIndexVault = 0 (AffinityDistributor.sol#180)
AffinityDistributor.process(uint256) (AffinityDistributor.sol#148-195) has costly operations inside a loop:
- currentIndexVault ++ (AffinityDistributor.sol#189)
Use a local variable to hold the loop computation result.

Additional information: link

Address._functionCallWithValue(address,bytes,uint256,string) (Address.sol#117-138) is never used and should be removed
Address.functionCall(address,bytes) (Address.sol#77-79) is never used and should be removed
Address.functionCall(address,bytes,string) (Address.sol#87-89) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256) (Address.sol#102-104) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256,string) (Address.sol#112-115) is never used and should be removed
Address.isContract(address) (Address.sol#24-33) is never used and should be removed
Address.sendValue(address,uint256) (Address.sol#51-57) is never used and should be removed
Context._msgData() (Context.sol#9-12) is never used and should be removed
SafeMath.mod(uint256,uint256) (SafeMath.sol#125-127) is never used and should be removed
SafeMath.mod(uint256,uint256,string) (SafeMath.sol#141-144) is never used and should be removed
Remove unused functions.

Additional information: link

SafeAffinity._maxTxAmount (SafeAffinity.sol#41) is set pre-construction with a non-constant function or state variable:
- _totalSupply.div(200)
SafeAffinity.swapThreshold (SafeAffinity.sol#70) is set pre-construction with a non-constant function or state variable:
- _totalSupply.div(300)
Remove any initialization of state variables via non-constant state variables or function calls. If variables must be set upon contract deployment, locate initialization in the constructor instead.

Additional information: link

Pragma version^0.8.0 (Address.sol#2) allows old versions
Pragma version0.8.0 (AffinityDistributor.sol#2) allows old versions
Pragma version^0.8.0 (Context.sol#2) allows old versions
Pragma version0.8.0 (IAffinityDistributor.sol#2) allows old versions
Pragma version^0.8.0 (IERC20.sol#2) allows old versions
Pragma version^0.8.0 (IUniswapRouter02.sol#2) allows old versions
Pragma version^0.8.0 (IUniswapV2Factory.sol#2) allows old versions
Pragma version^0.8.0 (Ownable.sol#2) allows old versions
Pragma version0.8.0 (SafeAffinity.sol#2) allows old versions
Pragma version^0.8.0 (SafeMath.sol#2) allows old versions
solc-0.8.0 is not recommended for deployment
Deploy with any of the following Solidity versions: 0.5.16 - 0.5.17, 0.6.11 - 0.6.12, 0.7.5 - 0.7.6 Use a simple pragma version that allows any of these versions. Consider using the latest version of Solidity for testing.

Additional information: link

Low level call in Address.sendValue(address,uint256) (Address.sol#51-57):
- (success) = recipient.call{value: amount}() (Address.sol#55)
Low level call in Address._functionCallWithValue(address,bytes,uint256,string) (Address.sol#117-138):
- (success,returndata) = target.call{value: weiValue}(data) (Address.sol#121)
Low level call in SafeAffinity.reflectAndDistribute() (SafeAffinity.sol#267-289):
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#276)
- (successful,None) = address(marketingFeeReceiver).call{gas: 26000,value: amountBNBMarketing}() (SafeAffinity.sol#280)
- (success,None) = address(address(distributor)).call{gas: 26000,value: amountBNBReflection}() (SafeAffinity.sol#285)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence

Additional information: link

Parameter AffinityDistributor.setDistributionCriteria(uint256,uint256,uint256)._minPeriod (AffinityDistributor.sol#76) is not in mixedCase
Parameter AffinityDistributor.setDistributionCriteria(uint256,uint256,uint256)._minDistribution (AffinityDistributor.sol#76) is not in mixedCase
Parameter AffinityDistributor.setDistributionCriteria(uint256,uint256,uint256)._bnbToTokenThreshold (AffinityDistributor.sol#76) is not in mixedCase
Variable AffinityDistributor._token (AffinityDistributor.sol#19) is not in mixedCase
Variable AffinityDistributor.SafeEarn (AffinityDistributor.sol#29) is not in mixedCase
Variable AffinityDistributor.SafeVault (AffinityDistributor.sol#31) is not in mixedCase
Function IUniswapV2Router01.WETH() (IUniswapRouter02.sol#7) is not in mixedCase
Parameter SafeAffinity.setFees(uint256,uint256,uint256,uint256)._burnFee (SafeAffinity.sol#351) is not in mixedCase
Parameter SafeAffinity.setFees(uint256,uint256,uint256,uint256)._reflectionFee (SafeAffinity.sol#351) is not in mixedCase
Parameter SafeAffinity.setFees(uint256,uint256,uint256,uint256)._marketingFee (SafeAffinity.sol#351) is not in mixedCase
Parameter SafeAffinity.setFees(uint256,uint256,uint256,uint256)._buyFee (SafeAffinity.sol#351) is not in mixedCase
Parameter SafeAffinity.setSwapBackSettings(bool,uint256,bool,uint256,bool,uint256)._swapEnabled (SafeAffinity.sol#380) is not in mixedCase
Parameter SafeAffinity.setSwapBackSettings(bool,uint256,bool,uint256,bool,uint256)._swapThreshold (SafeAffinity.sol#380) is not in mixedCase
Parameter SafeAffinity.setSwapBackSettings(bool,uint256,bool,uint256,bool,uint256)._canChangeSwapThreshold (SafeAffinity.sol#380) is not in mixedCase
Parameter SafeAffinity.setSwapBackSettings(bool,uint256,bool,uint256,bool,uint256)._percentOfCirculatingSupply (SafeAffinity.sol#380) is not in mixedCase
Parameter SafeAffinity.setSwapBackSettings(bool,uint256,bool,uint256,bool,uint256)._burnEnabled (SafeAffinity.sol#380) is not in mixedCase
Parameter SafeAffinity.setSwapBackSettings(bool,uint256,bool,uint256,bool,uint256)._minimumBNBToDistribute (SafeAffinity.sol#380) is not in mixedCase
Parameter SafeAffinity.setDistributionCriteria(uint256,uint256,uint256)._minPeriod (SafeAffinity.sol#390) is not in mixedCase
Parameter SafeAffinity.setDistributionCriteria(uint256,uint256,uint256)._minDistribution (SafeAffinity.sol#390) is not in mixedCase
Parameter SafeAffinity.setDistributionCriteria(uint256,uint256,uint256)._bnbToTokenThreshold (SafeAffinity.sol#390) is not in mixedCase
Parameter SafeAffinity.setAllowTransferToMarketing(bool,address)._canSendToMarketing (SafeAffinity.sol#395) is not in mixedCase
Parameter SafeAffinity.setAllowTransferToMarketing(bool,address)._marketingFeeReceiver (SafeAffinity.sol#395) is not in mixedCase
Constant SafeAffinity._name (SafeAffinity.sol#36) is not in UPPER_CASE_WITH_UNDERSCORES
Constant SafeAffinity._symbol (SafeAffinity.sol#37) is not in UPPER_CASE_WITH_UNDERSCORES
Constant SafeAffinity._decimals (SafeAffinity.sol#38) is not in UPPER_CASE_WITH_UNDERSCORES
Variable SafeAffinity._totalSupply (SafeAffinity.sol#40) is not in mixedCase
Variable SafeAffinity._maxTxAmount (SafeAffinity.sol#41) is not in mixedCase
Variable SafeAffinity._balances (SafeAffinity.sol#43) is not in mixedCase
Variable SafeAffinity._allowances (SafeAffinity.sol#44) is not in mixedCase
Follow the Solidity naming convention.

Additional information: link

Redundant expression "this (Context.sol#10)" inContext (Context.sol#4-14)
Remove redundant statements if they congest code but offer no value.

Additional information: link

Variable IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (IUniswapRouter02.sol#12) is too similar to IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (IUniswapRouter02.sol#13)
Prevent variables from having similar names.

Additional information: link

SafeAffinity.slitherConstructorVariables() (SafeAffinity.sol#29-451) uses literals with too many digits:
- distributorGas = 500000 (SafeAffinity.sol#67)
Use: Ether suffix, Time suffix, or The scientific notation

Additional information: link

AffinityDistributor.dividendsPerShareAccuracyFactor (AffinityDistributor.sol#48) should be constant
AffinityDistributor.minAutoPeriod (AffinityDistributor.sol#52) should be constant
SafeAffinity.distributorGas (SafeAffinity.sol#67) should be constant
SafeAffinity.feeDenominator (SafeAffinity.sol#56) should be constant
Add the constant attributes to state variables that never change.

Additional information: link

owner() should be declared external:
- Ownable.owner() (Ownable.sol#24-26)
renounceOwnership() should be declared external:
- Ownable.renounceOwnership() (Ownable.sol#43-46)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (Ownable.sol#52-56)
geUnlockTime() should be declared external:
- Ownable.geUnlockTime() (Ownable.sol#58-60)
lock(uint256) should be declared external:
- Ownable.lock(uint256) (Ownable.sol#63-68)
unlock() should be declared external:
- Ownable.unlock() (Ownable.sol#71-76)
balanceOf(address) should be declared external:
- SafeAffinity.balanceOf(address) (SafeAffinity.sol#114)
name() should be declared external:
- SafeAffinity.name() (SafeAffinity.sol#116-118)
symbol() should be declared external:
- SafeAffinity.symbol() (SafeAffinity.sol#120-122)
decimals() should be declared external:
- SafeAffinity.decimals() (SafeAffinity.sol#124-126)
getIsFeeExempt(address) should be declared external:
- SafeAffinity.getIsFeeExempt(address) (SafeAffinity.sol#330-332)
getIsDividendExempt(address) should be declared external:
- SafeAffinity.getIsDividendExempt(address) (SafeAffinity.sol#335-337)
getIsTxLimitExempt(address) should be declared external:
- SafeAffinity.getIsTxLimitExempt(address) (SafeAffinity.sol#340-342)
Use the external attribute for functions never called from the contract.

Additional information: link

Holders:


Token is deployed only at one blockchain


Token has only one trading pair


Unable to find PancakeSwap trading pair to compute liquidity.


Unable to find PancakeSwap trading pair to compute number of swaps.


Twitter account has relatively few followers


Last post in Twitter was more than 30 days ago


Unable to find Youtube account


Twitter account has few posts


Unable to find whitepaper link on the website


Young tokens have high risks of scam / price dump / death


Young tokens have high risks of price dump / death


Young tokens have high risks of price dump / death


Young tokens have high risks of price dump / death


Young tokens have high risks of price dump / death


Token has relatively low CoinGecko rank

Price for AFFINITY

News for AFFINITY