Could someone tell me what this variable does and what I want to set it to?
uint256 private numTokensSellToAddToLiquidity = ;
Here is the only function it is used in the contract:
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");
if(from != owner() && to != owner())
require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
// is the token balance of this contract address over the min number of
// tokens that we need to initiate a swap + liquidity lock?
// also, don't get caught in a circular liquidity event.
// also, don't swap & liquify if sender is uniswap pair.
uint256 contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance >= _maxTxAmount)
{
contractTokenBalance = _maxTxAmount;
}
bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled
) {
contractTokenBalance = numTokensSellToAddToLiquidity;
//add liquidity
swapAndLiquify(contractTokenBalance);
}
//indicates if fee should be deducted from transfer
bool takeFee = true;
//if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
takeFee = false;
}
//transfer amount, it will take tax, burn, liquidity fee
_tokenTransfer(from,to,amount,takeFee);
}
May 18, 2021, 4:25 AM
can someone explain what value I should put for numTokensSellToAddToLiquidity:
uint256 private _tTotal = 3141592653589793238;
uint256 public _maxTxAmount = ((_tTotal * 2)/100)
uint256 private numTokensSellToAddToLiquidity = ;
uint256 private _tTotal = 3141592653589793238;
uint256 public _maxTxAmount = ((_tTotal * 2)/100)
uint256 private numTokensSellToAddToLiquidity = ;
could someone help pls? This is the final variable in my contract i need help with
May 18, 2021, 5:55 AM
Put any amount you want.
When the balance of your contract reaches that amount swap and liquify will be triggered.
When the balance of your contract reaches that amount swap and liquify will be triggered.
May 18, 2021, 5:57 AM
are there pros and cons to higher or lower numbers? Is there a standard percentage of total supply people generally use?
is the balance of the contract its own wallet address? When it hits that number its automatically added to pancakeswap? Is that how that works?
May 18, 2021, 5:58 AM
If the number is too low, the swap will be triggered very frequently. That will put burden of extra gas fees on transfers.
If it is too high then, huge price drop will happen after swap.
If it is too high then, huge price drop will happen after swap.
Balance of the token contract address
May 18, 2021, 5:59 AM
ah i see
is there a general percentage of total supply people use for that number? For example 1% of total supply? or 10%?
May 18, 2021, 6:00 AM
Follow the Safemoon. Keep it 0.01% of _tTotal
May 18, 2021, 6:00 AM
wow that seems like a very small amount
could I simply do this?
uint256 private numTokensSellToAddToLiquidity = ((_tTotal)/10000)
uint256 private numTokensSellToAddToLiquidity = ((_tTotal)/10000)
May 18, 2021, 6:04 AM
Not too small actually.
Think it that way.
You max transaction amount is 2% of total Supply. You liquidity fee might be <=5%.
So, in a max transaction you are adding 0.1% of _tTotal tokens in the contract. But you are not always going to transfer max amount. The transfer amounts will be much smaller than that.
Think it that way.
You max transaction amount is 2% of total Supply. You liquidity fee might be <=5%.
So, in a max transaction you are adding 0.1% of _tTotal tokens in the contract. But you are not always going to transfer max amount. The transfer amounts will be much smaller than that.
✅
May 18, 2021, 6:08 AM
wait my math is so bad... do i divide by 10000 or by 1000 to get 0.01% of total supply
May 18, 2021, 6:09 AM
10000
May 18, 2021, 6:10 AM
my liquidity fee is actually 7%, does that change what i should set this value to in any way?
May 18, 2021, 6:10 AM
Not needed. 0.01% is okay.
May 18, 2021, 6:11 AM
with a maximum transaction of 2% and a liquidity fee of 7%, when someone makes a max transaction, this means there will be a larger amount of tokens going to the contract than the threshold for adding to liquidity. Would this break that function or would it still just trigger adding that whole amount to liquidity?
May 18, 2021, 6:12 AM
It triggers liquidity addition in the same transaction itself. It gets interesting if the transaction is for removing liquidity. It will go into a circular liquidity (which is commented in the original code) and fails the transaction
May 18, 2021, 6:44 AM
After I launch my coin and manually add 5 BNB to liquidity, should I lock the liquidity permanently?
May 18, 2021, 6:51 AM
to make investors gain confidence in the safety of ur coin, yes
May 18, 2021, 6:54 AM
Basically this just makes it impossible for me to ever pull the 5bnb out again correct?
And which service should I use to lock it? How come some coins only lock it for 3 months or 3 years or 5 years?
May 18, 2021, 6:55 AM
u can lock it on a time basis, for example 1 year or 2 years
u can explore dxsale or unicrypt
there are many services provided online
May 18, 2021, 7:03 AM
Is it only locking the initial liquidity or ALL liquidity in the token?
May 18, 2021, 7:03 AM
tht depends on how many percent you are locking
May 18, 2021, 7:04 AM
What’s standard these days?
Locking 100% of the coin forever?
May 18, 2021, 7:05 AM
i do see ppl lock for 2-3 years
May 18, 2021, 7:06 AM
Can it screw you over if you lock it forever? Like is there ever any valid reason to need access to liquidity?
What does burning liquidity mean?
How can you burn the liquidity of your token before renouncing rights and what does it mean? Like are you burning the BNB you put into liquidity or what? Should I just lock liquidity with dxsale instead?
May 18, 2021, 7:13 AM
u are essentially throwing the money away if u lock the liquidity forever. its an investment into ur own coin
May 18, 2021, 7:19 AM
Ok that’s what I’m looking to do. Do you guys think 6BNB is enough initial liquidity for a coin with no pre sale?
May 18, 2021, 7:20 AM
depends on ur supply and the price u wan to set
May 18, 2021, 7:26 AM
Actually I don't understand when the tokens go to contract balance. Sometimes happens, other times no
May 18, 2021, 7:42 AM
Is 6BNB enough initial liquidity for a token with no pre sale?
May 18, 2021, 7:55 AM
10+
Find a pledge whale
May 18, 2021, 8:00 AM
What’s the risk of less than 10?
And what’s a pledge whale?
May 18, 2021, 8:01 AM
Less sale soon lol
May 18, 2021, 8:01 AM
What does that mean?
May 18, 2021, 8:02 AM
Someone who backs the project as per say rich businessman friend of Ryoshi in SHIB😂
May 18, 2021, 8:02 AM
Ohhhh
But what’s the reasoning for needing 10+ BNB initial liquidity?
May 18, 2021, 8:02 AM
10 ETH at that time end of 2020 I think
May 18, 2021, 8:03 AM
Can anyone tell me what happens if I launch a coin and put $3500 worth of BNB into liquidity and then I buy $3000 of the coin?
Roughly how much of the coin will I get? Roughly how much will the price rise? Is this bad for the coin?
May 18, 2021, 8:04 AM
Depend on the initial take in/out
May 18, 2021, 8:04 AM
100% of the coin in pancakeswap and 0% team wallet
7% liquidity tax 3% redistribution tax
May 18, 2021, 8:05 AM
You should send some to Mark Cuban's wallet lol
May 18, 2021, 8:08 AM
It always does. But won't be quite visible since it doesn't emit that transfer event
May 18, 2021, 8:33 AM
yes infact you have to check with balancOf
May 18, 2021, 8:34 AM
And lp addition happens only when contract have that said min amount
May 18, 2021, 8:34 AM
I can't understand why bsc sometimes shows bep20 balance and other times no
May 18, 2021, 8:34 AM
It always shows in the end, but I guess there is some delay
May 18, 2021, 8:35 AM