Revolutionize Your Business with Xamer's Smart Audit Services
On-chain smart contract security monitoring
Unco is redefining the meme coin landscape by blending innovation, fairness, and purpose. Whether you're in it for the excitement or the potential, Unco is crafted to exceed expectations on every level. Join the Unco revolution and explore the future of meme coins today!
Audits
Onboarded Date
06/Jan/2025
Contracts
0x5BC...FF497
Website
We talked about a project on linkedin.
Create new project Buildng product
Adding a new event with attachments
added a new member to velzon dashboard
These customers can rest assured their order has been placed.
They all have something to say beyond the words on the page. They can come across as casual or neutral, exotic or graphic.
2 days left notification to submit the monthly sales report. Reports Builder
User Erica245 submitted a ticket.
Team Leader & HR
Projects
Tasks
Full Stack Developer
Project Manager
UI/UX Designer
Team Leader & Web Developer
Backend Developer
Front-End Developer
Web Designer
Wed Developer
Showing 1 to 10 of 12 entries
All Findings
Acknowledge
Partially
Resolved
0x5BC8FA96a2...FF497
Token Standard
Functions
Verified Contract
/** *Submitted for verification at Etherscan.io on 2025-01-01*/// SPDX-License-Identifier: Unlicensedpragma solidity ^0.8.4;abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; }}interface IERC20 { function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value );}library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }}library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. keccak256('') bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require( address(this).balance >= amount, "Address: insufficient balance" ); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(""); require( success, "Address: unable to send value, recipient may have reverted" ); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, "Address: low-level call with value failed" ); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require( address(this).balance >= value, "Address: insufficient balance for call" ); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: weiValue}( data ); if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }}contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }}// pragma solidity >=0.5.0;interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external;}// pragma solidity >=0.5.0;interface IUniswapV2Pair { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; event Burn( address indexed sender, uint256 amount0, uint256 amount1, address indexed to ); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns ( uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast ); function price0CumulativeLast() external view returns (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function burn(address to) external returns (uint256 amount0, uint256 amount1); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; function initialize(address, address) external;}// pragma solidity >=0.6.2;interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountOut); function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);}// pragma solidity >=0.6.2;interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external;}contract UniCoin is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; address public governanceAddress = 0x691925C4c2F25301bBE81cA2A0B19773718D7E84; address public taxWallet = payable(0x9e70B8e291C4a359559817e8F23E82a6bBE743Be); address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 333000000000000 * 10**18; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = "UNCO"; string private _symbol = "UNCO"; uint8 private _decimals = 18; uint256 public _burnPercent = 75; uint256 private _previousBurnPercent = _burnPercent; uint256 public _buyTax = 0; uint256 private _previousBuyTax =_buyTax; uint256 public _sellTax = 0; uint256 private _previousSellTax =_sellTax; uint public dailySellLimit = 25; uint public minimumBuyAmount; IUniswapV2Router02 public immutable uniswapV2Router; address private usdt; address public immutable uniswapV2Pair; mapping(address => uint256) private _dailySold; mapping(address => uint256) private _lastSellTimestamp; modifier onlyGovernance { require(_msgSender()==governanceAddress,"caller is not governence!"); _; } constructor(address _usdt) { _rOwned[_msgSender()] = _rTotal; usdt = _usdt; minimumBuyAmount = 10 * 10** IERC20(usdt).decimals(); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _usdt); uniswapV2Router = _uniswapV2Router; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue) ); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender].sub( subtractedValue, "ERC20: decreased allowance below zero" ) ); return true; } function tokenFromReflection(uint256 rAmount) public view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); bool takeFee = true; uint8 _type = 0; if (from == uniswapV2Pair) { _type = 1; } if (to == uniswapV2Pair) { _type = 2; } //if any account belongs to _isExcludedFromFee account then remove the fee if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } uint256 totalBalance = balanceOf(from); if (totalBalance == amount) { amount = amount.mul(9999).div(10000); } if(_type==1 && takeFee) { uint256 tokenPrice = getTokenPrice(); require(((amount * tokenPrice) / 10 ** decimals()) >= minimumBuyAmount, "Buy amount is below the minimum requirement"); } else if(_type==2 && takeFee) { uint256 maxSell = (balanceOf(from) * dailySellLimit) / 10000; if (block.timestamp - _lastSellTimestamp[from] >= 1 days) { _dailySold[from] = 0; } require(_dailySold[from] + amount <= maxSell, "Sell exceeds daily limit"); _dailySold[from] += amount; _lastSellTimestamp[from] = block.timestamp; } _tokenTransfer(from, to, amount, takeFee, _type); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee, uint8 _type ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount, _type); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount, uint8 _type ) private { uint256 currentRate = _getRate(); uint rAmount = tAmount.mul(currentRate); (uint256 txTransferAmount, uint256 rxTransferAmount) = _taxDeduct( tAmount, rAmount, sender, _type ); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rxTransferAmount); emit Transfer(sender, recipient, txTransferAmount); } function _taxDeduct( uint256 tAmount, uint256 rAmount, address sender, uint8 _type ) private returns (uint256, uint256) { if (_buyTax == 0 && _sellTax == 0 && _burnPercent==0) return (tAmount, rAmount); uint256 currentRate = _getRate(); uint256 _tCharity; if (_type == 0) { _tCharity = calulateBurnAmount(tAmount); } else if (_type == 1) { _tCharity = calculateBuyFee(tAmount); } else { _tCharity = calculateSellFee(tAmount); } uint256 _rCharity = _tCharity.mul(currentRate); uint rTransferAmount = rAmount.sub(_rCharity); uint tTransferAmount = tAmount.sub(_tCharity); if(_type!=0 && _tCharity!=0) { _rOwned[taxWallet] = _rOwned[taxWallet].add(_rCharity); _tOwned[taxWallet] = _tOwned[taxWallet].add(_tCharity); emit Transfer(sender, taxWallet, _tCharity); } else { if(_tCharity!=0){ _rOwned[deadAddress] = _rOwned[deadAddress].add(_rCharity); _tOwned[deadAddress] = _tOwned[deadAddress].add(_tCharity); emit Transfer(sender, deadAddress, _tCharity); } } return (tTransferAmount, rTransferAmount); } function getTokenPrice() public view returns (uint256) { (uint112 reserve0, uint112 reserve1, ) = IUniswapV2Pair(uniswapV2Pair).getReserves(); address token0 = IUniswapV2Pair(uniswapV2Pair).token0(); (uint112 tokenReserve, uint112 wethReserve) = token0 == address(this) ? (reserve0, reserve1) : (reserve1, reserve0); require(wethReserve > 0, "WETH reserve is zero"); return uint256(wethReserve) * 10**decimals() / uint256(tokenReserve); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function calculateBuyFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_buyTax).div(100); } function calculateSellFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_sellTax).div(100); } function calulateBurnAmount(uint256 _amount) private view returns (uint256) { return _amount.mul(_burnPercent).div(100); } function removeAllFee() private { if (_buyTax == 0 && _sellTax == 0 && _burnPercent ==0 ) return; _previousBuyTax= _buyTax; _previousSellTax = _sellTax; _previousBurnPercent = _burnPercent; _buyTax = 0; _sellTax = 0; _burnPercent = 0; } function restoreAllFee() private { _buyTax = _previousBuyTax; _sellTax = _previousSellTax; _burnPercent = _previousBurnPercent; } function isExcludedFromFee(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function setTaxWallet(address _taxWallet) external onlyGovernance { require(_taxWallet != address(0), "Tax wallet address cannot be zero"); taxWallet = _taxWallet; } function addWhiteList(address account) public onlyGovernance { _isExcludedFromFee[account] = true; } function removeWhiteList(address account) public onlyGovernance { _isExcludedFromFee[account] = false; } function setSwapBurnTax(uint256 tax) external onlyGovernance { _burnPercent = tax; } function setSwapBuyTax(uint256 tax) external onlyGovernance { _buyTax = tax; } function setSwapSellTax(uint256 tax) external onlyGovernance { _sellTax = tax; } function changeGovernanceAddress(address _newAddress) external onlyOwner { governanceAddress = _newAddress; } function setDailySellLimit(uint256 _limit) external onlyGovernance { require(_limit > 0, "Daily sell limit must be greater than zero"); dailySellLimit = _limit; } function airDrop(address[] calldata recipients, uint256[] calldata amounts) external onlyGovernance { require(recipients.length == amounts.length, "Recipients and amounts length mismatch"); for (uint256 i = 0; i < recipients.length; i++) { _transfer(msg.sender, recipients[i], amounts[i]); } }}
/**
*Submitted for verification at Etherscan.io on 2025-01-01
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return payable(msg.sender);
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
interface IERC20 {
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
function div(
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
function mod(
require(b != 0, errorMessage);
return a % b;
library Address {
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. keccak256('')
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly {
codehash := extcodehash(account)
return (codehash != accountHash && codehash != 0x0);
function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
success,
"Address: unable to send value, recipient may have reverted"
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
return functionCall(target, data, "Address: low-level call failed");
function functionCall(
address target,
bytes memory data,
) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
function functionCallWithValue(
return
functionCallWithValue(
target,
data,
value,
"Address: low-level call with value failed"
uint256 value,
address(this).balance >= value,
"Address: insufficient balance for call"
return _functionCallWithValue(target, data, value, errorMessage);
function _functionCallWithValue(
uint256 weiValue,
) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: weiValue}(
data
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
revert(errorMessage);
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
constructor() {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
function owner() public view returns (address) {
return _owner;
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
function transferOwnership(address newOwner) public virtual onlyOwner {
newOwner != address(0),
"Ownable: new owner is the zero address"
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
// pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB)
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
function setFeeTo(address) external;
function setFeeToSetter(address) external;
interface IUniswapV2Pair {
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function balanceOf(address owner) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
address from,
address to,
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
event Swap(
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function burn(address to)
returns (uint256 amount0, uint256 amount1);
function swap(
bytes calldata data
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
// pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
uint256 deadline
)
uint256 amountA,
uint256 amountB,
uint256 liquidity
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
payable
uint256 amountToken,
uint256 amountETH,
function removeLiquidity(
uint256 liquidity,
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
bool approveMax,
function removeLiquidityETHWithPermit(
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
function swapExactETHForTokens(
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
function swapExactTokensForETH(
function swapETHForExactTokens(
function quote(
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
function swapExactETHForTokensSupportingFeeOnTransferTokens(
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
contract UniCoin is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address public governanceAddress = 0x691925C4c2F25301bBE81cA2A0B19773718D7E84;
address public taxWallet = payable(0x9e70B8e291C4a359559817e8F23E82a6bBE743Be);
address public immutable deadAddress =
0x000000000000000000000000000000000000dEaD;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 333000000000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private _name = "UNCO";
string private _symbol = "UNCO";
uint8 private _decimals = 18;
uint256 public _burnPercent = 75;
uint256 private _previousBurnPercent = _burnPercent;
uint256 public _buyTax = 0;
uint256 private _previousBuyTax =_buyTax;
uint256 public _sellTax = 0;
uint256 private _previousSellTax =_sellTax;
uint public dailySellLimit = 25;
uint public minimumBuyAmount;
IUniswapV2Router02 public immutable uniswapV2Router;
address private usdt;
address public immutable uniswapV2Pair;
mapping(address => uint256) private _dailySold;
mapping(address => uint256) private _lastSellTimestamp;
modifier onlyGovernance {
require(_msgSender()==governanceAddress,"caller is not governence!");
constructor(address _usdt) {
_rOwned[_msgSender()] = _rTotal;
usdt = _usdt;
minimumBuyAmount = 10 * 10** IERC20(usdt).decimals();
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _usdt);
uniswapV2Router = _uniswapV2Router;
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;
emit Transfer(address(0), _msgSender(), _tTotal);
function name() public view returns (string memory) {
return _name;
function symbol() public view returns (string memory) {
return _symbol;
function decimals() public view returns (uint8) {
return _decimals;
function totalSupply() public view override returns (uint256) {
return _tTotal;
function balanceOf(address account) public view override returns (uint256) {
return tokenFromReflection(_rOwned[account]);
public
override
returns (bool)
_transfer(_msgSender(), recipient, amount);
return true;
returns (uint256)
return _allowances[owner][spender];
function approve(address spender, uint256 amount)
_approve(_msgSender(), spender, amount);
) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()].sub(
amount,
"ERC20: transfer amount exceeds allowance"
function increaseAllowance(address spender, uint256 addedValue)
virtual
spender,
_allowances[_msgSender()][spender].add(addedValue)
function decreaseAllowance(address spender, uint256 subtractedValue)
_allowances[_msgSender()][spender].sub(
subtractedValue,
"ERC20: decreased allowance below zero"
function tokenFromReflection(uint256 rAmount)
rAmount <= _rTotal,
"Amount must be less than total reflections"
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
function _approve(
) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
function _transfer(
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
bool takeFee = true;
uint8 _type = 0;
if (from == uniswapV2Pair) {
_type = 1;
if (to == uniswapV2Pair) {
_type = 2;
//if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
takeFee = false;
uint256 totalBalance = balanceOf(from);
if (totalBalance == amount) {
amount = amount.mul(9999).div(10000);
if(_type==1 && takeFee) {
uint256 tokenPrice = getTokenPrice();
require(((amount * tokenPrice) / 10 ** decimals()) >= minimumBuyAmount, "Buy amount is below the minimum requirement");
} else if(_type==2 && takeFee) {
uint256 maxSell = (balanceOf(from) * dailySellLimit) / 10000;
if (block.timestamp - _lastSellTimestamp[from] >= 1 days) {
_dailySold[from] = 0;
require(_dailySold[from] + amount <= maxSell, "Sell exceeds daily limit");
_dailySold[from] += amount;
_lastSellTimestamp[from] = block.timestamp;
_tokenTransfer(from, to, amount, takeFee, _type);
function _tokenTransfer(
uint256 amount,
bool takeFee,
uint8 _type
if (!takeFee) removeAllFee();
_transferStandard(sender, recipient, amount, _type);
if (!takeFee) restoreAllFee();
function _transferStandard(
uint256 tAmount,
uint rAmount = tAmount.mul(currentRate);
(uint256 txTransferAmount, uint256 rxTransferAmount) = _taxDeduct(
tAmount,
rAmount,
_type
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[recipient] = _rOwned[recipient].add(rxTransferAmount);
emit Transfer(sender, recipient, txTransferAmount);
function _taxDeduct(
uint256 rAmount,
) private returns (uint256, uint256) {
if (_buyTax == 0 && _sellTax == 0 && _burnPercent==0)
return (tAmount, rAmount);
uint256 _tCharity;
if (_type == 0) {
_tCharity = calulateBurnAmount(tAmount);
} else if (_type == 1) {
_tCharity = calculateBuyFee(tAmount);
_tCharity = calculateSellFee(tAmount);
uint256 _rCharity = _tCharity.mul(currentRate);
uint rTransferAmount = rAmount.sub(_rCharity);
uint tTransferAmount = tAmount.sub(_tCharity);
if(_type!=0 && _tCharity!=0) {
_rOwned[taxWallet] = _rOwned[taxWallet].add(_rCharity);
_tOwned[taxWallet] = _tOwned[taxWallet].add(_tCharity);
emit Transfer(sender, taxWallet, _tCharity);
if(_tCharity!=0){
_rOwned[deadAddress] = _rOwned[deadAddress].add(_rCharity);
_tOwned[deadAddress] = _tOwned[deadAddress].add(_tCharity);
emit Transfer(sender, deadAddress, _tCharity);
return (tTransferAmount, rTransferAmount);
function getTokenPrice() public view returns (uint256) {
(uint112 reserve0, uint112 reserve1, ) = IUniswapV2Pair(uniswapV2Pair).getReserves();
address token0 = IUniswapV2Pair(uniswapV2Pair).token0();
(uint112 tokenReserve, uint112 wethReserve) = token0 == address(this) ? (reserve0, reserve1) : (reserve1, reserve0);
require(wethReserve > 0, "WETH reserve is zero");
return uint256(wethReserve) * 10**decimals() / uint256(tokenReserve);
function _getRate() private view returns (uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply.div(tSupply);
function _getCurrentSupply() private view returns (uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
return (rSupply, tSupply);
function calculateBuyFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_buyTax).div(100);
function calculateSellFee(uint256 _amount) private view returns (uint256) {
return _amount.mul(_sellTax).div(100);
function calulateBurnAmount(uint256 _amount)
private
return _amount.mul(_burnPercent).div(100);
function removeAllFee() private {
if (_buyTax == 0 && _sellTax == 0 && _burnPercent ==0 ) return;
_previousBuyTax= _buyTax;
_previousSellTax = _sellTax;
_previousBurnPercent = _burnPercent;
_buyTax = 0;
_sellTax = 0;
_burnPercent = 0;
function restoreAllFee() private {
_buyTax = _previousBuyTax;
_sellTax = _previousSellTax;
_burnPercent = _previousBurnPercent;
function isExcludedFromFee(address account) public view returns (bool) {
return _isExcludedFromFee[account];
function setTaxWallet(address _taxWallet) external onlyGovernance {
require(_taxWallet != address(0), "Tax wallet address cannot be zero");
taxWallet = _taxWallet;
function addWhiteList(address account) public onlyGovernance {
_isExcludedFromFee[account] = true;
function removeWhiteList(address account) public onlyGovernance {
_isExcludedFromFee[account] = false;
function setSwapBurnTax(uint256 tax) external onlyGovernance {
_burnPercent = tax;
function setSwapBuyTax(uint256 tax) external onlyGovernance {
_buyTax = tax;
function setSwapSellTax(uint256 tax) external onlyGovernance {
_sellTax = tax;
function changeGovernanceAddress(address _newAddress) external onlyOwner {
governanceAddress = _newAddress;
function setDailySellLimit(uint256 _limit) external onlyGovernance {
require(_limit > 0, "Daily sell limit must be greater than zero");
dailySellLimit = _limit;
function airDrop(address[] calldata recipients, uint256[] calldata amounts) external onlyGovernance {
require(recipients.length == amounts.length, "Recipients and amounts length mismatch");
for (uint256 i = 0; i < recipients.length; i++) {
_transfer(msg.sender, recipients[i], amounts[i]);
The UniCoin contract is an ERC-20 token with additional functionality for buy/sell fees, limits, and automatic burning of tokens on transactions. It supports Uniswap-based liquidity pools and has mechanisms to prevent excessive selling via daily limits. Additionally, it integrates with a governance model and supports a tax wallet for redistribution purposes.
Governance Role: The governanceAddress holds a special role, having the ability to manage or govern certain aspects of the contract. Fee Exclusion Role: The owner and the contract itself (address(this)) are excluded from fees, which means transactions involving these addresses do not incur taxes. Tax Wallet: The address (taxWallet) receives funds based on the fees applied to transfers.
solidity<br>function withdraw(uint amount) public { <br> require(balances[msg.sender] >= amount); <br> msg.sender.call{value: amount}(""); <br> balances[msg.sender] -= amount;<br>}<br>
The withdraw() function allows a reentrancy attack. Use reentrancy guards or the Checks-Effects-Interactions pattern to mitigate this.
withdraw()
solidity<br>uint256 reward = balances[msg.sender] * 10; <br>totalSupply += reward; <br>
Arithmetic operations are unchecked, which may result in overflows or underflows. Use SafeMath or Solidity v0.8+ built-in checks to prevent this.
solidity<br>for (uint i = 0; i < proposals.length; i++) { <br> // process proposals <br>}<br>
The for loop iterates over a large array, increasing gas costs. Refactor the loop or limit its usage in on-chain operations.
for
Our industry-leading audit methodology and tooling includes a review of your code’s logic, with a mathematical approach to ensure your program works as intended.