When providing liquidity from a smart contract, the most important thing to keep in mind is that tokens deposited into a pool at any rate other than the current reserve ratio are vulnerable to being arbitraged. As an example, if the ratio of x:y in a pair is 10:2 (i.e. the price is 5), and someone naively adds liquidity at 5:2 (a price of 2.5), the contract will simply accept all tokens (changing the price to 3.75 and opening up the market to arbitrage), but only issue pool tokens entitling the sender to the amount of assets sent at the proper ratio, in this case 5:1. To avoid donating to arbitrageurs, it is imperative to add liquidity at the current price. Luckily, it's easy to ensure that this condition is met!

Nov 8, 2021, 9:43 PM
Some little talk about it will help, if you don't mind.
Oh.
Nov 8, 2021, 9:47 PM
is it ok ?
Nov 8, 2021, 10:07 PM
Hopefully.
Nov 8, 2021, 10:48 PM
I still learn things and my firsts lines of codes, it was +20 years ago
for solidity, you have a lot to learn about virtual machines, languages and algorithms
but you can write a smart contract tonight if you try :D it won't make you a good developper
debian forever
if it's good for your server, it's good for your desktop. And if you want to have up to date softwares, just make install from git
Nov 8, 2021, 11:12 PM
I had the same issue on Ubuntu which is Debian based...both tell me to use npm audit fix which does nothing but tell me to use it again...
It's saying there are 3 moderate security risks
Not sure if I should worry or not.
Nov 8, 2021, 11:16 PM
install node from the sources
node is not something hard to install
Nov 8, 2021, 11:18 PM
Lol...it's not but it's annoying to not just be able to click a file. That's about the only thing windows has on Linux.
Ease of installation for 90% of things
Correct me if I'm wrong but I clone the most up to date git repository then cd to it and install right?
NM like 99% sure I was right, cloning now lolol
I love a challenge.
Nov 8, 2021, 11:27 PM
yes, you git clone ... ; ./configure β€”prefix ... ; make install
I use prefix to install on a local directory, and I've some lines on my ./bashrc
but I lie ... for solidity and javascript, I work on windows :D I use linux only for my personnal computer and for running this kind of tools. When I work, I use visual studio
yes ?
:D ok I shared here a tool for you to understand that...
you see, your token has a method : decimals
Nov 9, 2021, 12:05 AM
I puted 18 decimals
uint8 private _decimals = 18;
Nov 9, 2021, 12:06 AM
usualy, it's 18 or 6, but really, 18 is a good value. but you have to write your values with 18 digits
because on evm, there is no floating point numbers, we only use integers, so to compute 18 digits bellow ",", we just manipulate "18 digits cents"
I don't know if it's clear (but I know I made some english mistakes)
look here : https://bscscan.com/unitconverter
Nov 9, 2021, 12:08 AM
I don't understand bro
Nov 9, 2021, 12:08 AM
it's like if you write values in cent and not in $. Like $20.59 => 2059
but here, it's not 2 digits but 18
Nov 9, 2021, 12:09 AM
33 000 000 000 in my case 11 digits so yes I puted 18 decimals
but it showing 0.000000033
so I don't understand where I'm wrond :(
Nov 9, 2021, 12:11 AM
look my website...
Nov 9, 2021, 12:11 AM
When I write

uint256 private _tTotal = 1000000000 * 33**;

when I depley it showing 0.000000033

I want to create 33 000 000 000
like that ?
Nov 9, 2021, 12:13 AM
no :D
Nov 9, 2021, 12:13 AM
😭😭😭😭
Nov 9, 2021, 12:14 AM
You’d have to write 330 000 000 000 000 000
I might have messed up the digits there lol I’m sleepy
Nov 9, 2021, 12:14 AM
33000000000000000000000000000
Nov 9, 2021, 12:14 AM
There ya go
Nov 9, 2021, 12:14 AM
i just want to have 33 000 000 000
what i need to write ?
Nov 9, 2021, 12:15 AM
... 33 000 000 000 * (10 ** 18)
(without the spaces)
Nov 9, 2021, 12:15 AM
uint256 private _tTotal = 33000000000*(10**18);
like that ?
i'm trying to understad your website :D
like that bro ?
Nov 9, 2021, 12:18 AM
I won't test it for you but yes I think...
Nov 9, 2021, 12:18 AM
i will test it now ;)
Nov 9, 2021, 12:18 AM
Yeah I mean I can get the explicit read only values on a contract by using call() like the balanceOf() or whatever. What I’m trying to do is to simulate a buy or sell tx without actually sending the tx. Essentially a rug scanner of my own
Nov 9, 2021, 12:19 AM
Oh you can try estimateGas on a contract deployment... and ... fail :D
Nov 9, 2021, 12:20 AM
Yeah thought about that :D be my last resort lol
Nov 9, 2021, 12:20 AM
you can throw error on your contract deployer, and then your python code can catch this error. And you can call estimateGas to do it without paying
I've done it
it works fine but I couldn't figure how to batch this kind of requests on javascript with web3. maybe you will be luckyier in python
Nov 9, 2021, 12:21 AM
fantastic it works
thx brooooooooooooooooo
Nov 9, 2021, 12:22 AM
yw
Nov 9, 2021, 12:22 AM
i'm the next billionaire
πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚
Nov 9, 2021, 12:23 AM
lol you will be the king of the 18 digits currencies...
Nov 9, 2021, 12:23 AM
I’ve found one somewhat working example on the almighty stackoverflow, but it uses BatchRequests in call.request.({}) format. And batch request is not available in web3py for some reason lol
Nov 9, 2021, 12:23 AM
I promise you bro )))))))))))))))))
Nov 9, 2021, 12:23 AM
sux :D for me I've just waited long time, and marked a pause between every transaction, but I've checked every LP of matic and fantom with this kind of hack to check if I can buy and sell tokens, with or without fee.
Nov 9, 2021, 12:24 AM
Yeah that’s kinda what I’m aiming for to check if it’s a honeypot and/or check the buy sell tax to avoid getting rekt. Oh well, thanks anyway mate!
Nov 9, 2021, 12:25 AM
:) yw and I'll be happy to see you here share your experience, I hope you have more to share with us than 18 digits numbers issues :D
Nov 9, 2021, 12:26 AM
Lol hopefully nick will be rich and airdrop some of the tokens to us, so that my issue will be bullshit anyway
Nov 9, 2021, 12:27 AM
i will come back soon bro ))))))))
Nov 9, 2021, 12:27 AM
:D
Nov 9, 2021, 12:27 AM
you can count on me ;)
broooooo just one thing
which function is to lock the token for x time once client bought it ?
Nov 9, 2021, 12:41 AM
I can't answer without reading your contract
Nov 9, 2021, 12:41 AM
once I will get my $33B I'll send to this group 10% :D
https://www.bscscan.com/address/0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3#code
on which line is the lock function ?
Nov 9, 2021, 12:44 AM
I don't think there is one ?
Nov 9, 2021, 12:44 AM
I'd like to disable it if it is "ON"
Nov 9, 2021, 12:44 AM
are you sure ?
Nov 9, 2021, 12:45 AM
not 100 % but on the group they said yes
when you"re buying it is locked so I'm trying to find and unlock
Nov 9, 2021, 12:46 AM
you shouldn't copy/paste a contract without understanding it...
Nov 9, 2021, 12:47 AM
I understand a lot of things ans changed a lot of things
but 18 decimals was huge :D
I will name my next company "18 decimals"
Nov 9, 2021, 12:48 AM
1st day of blockchain programming :D
Nov 9, 2021, 12:49 AM
Lol there are a few more steps than I thought...have to also install the stuff to build the code in the git repo
And if you do 100% don't mainnet it testnet that shit only til you learn enough to not accidentally fuck someone
Nov 9, 2021, 12:50 AM
brooooooooooooooo just 1 day is enough to take $33B
πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚
Nov 9, 2021, 12:51 AM
ok so after reading ... there is no function like that.
Nov 9, 2021, 12:51 AM
And lose it forever because of a bug that burns it..
Nov 9, 2021, 12:51 AM
thank you broooooooooooo 😘😘😘😘😘😘😘
Nov 9, 2021, 12:51 AM
why not ?
a "stable" coin is just a contract made to be stable, and it's easy to do, there is a lot of mechanism for that... you can maybe create a plateform with X $ on bank, and after that, create a token with X on totalSupply, and after that, you can create some liquidity pairs
another method : you have a 1st project, and you create another token : stable coin based on 1st token value (you can burn 1$ of the first token to get 1 of your second)
that's how you create "stable" coin
no
your stablecoin is stable only if there is a mechanism that make it stable... and if you want to "sell" then you need to have a lot of money in front of the sell to keep this price
Nov 9, 2021, 1:00 AM
Oh wow. So you can create it , but you have to peg it to real liquidity to be able to swap
right ?
Nov 9, 2021, 1:01 AM
yes either in $ or with something else, maybe with an algo between your collateral and the money
but if you juste create a shitcoin with the name "my own dollar", it won't work
Nov 9, 2021, 1:02 AM
🀣🀣🀣🀣 yeah I get it now
If it were that simple everyone would do it
Nov 9, 2021, 1:03 AM
there is no magic, you can't create money, you can just PAY gas to create token...
Nov 9, 2021, 1:04 AM
Yes
That’s true
Utility first. I get it now
Nov 9, 2021, 1:04 AM
and there is not 1/100th of the code to make arbitrage :D
yes 2nd time this code pop here today, and look the import of ipfs, it's the hacker wallet
you rly think that it's so easy to do it ? just copy and make free money ? :D
...
show me your arbitrage tx ?
lol can you show me the bscscan link of your arbitrage transaction ?
because if you've earn 500 bnb in only one arbitrage transaction, and just "like that" after watching a scam on youtube, I suck your dick.
it DOES NOT !
you can't make 300 000$ in 1 transaction from a video youtube...
you see... and with the rights settings, I can have "binance" and "bnb" here...
but it's netsnet, I'n not that rich
you can make 500 bnb in few month with arbitrage, but it's realy hard to do it because there is a lot of developpers fighting for every opportunity... and only 1 winner
so you have to be the smartest, the fastest, hard to do...
Nov 9, 2021, 1:28 AM
So I finally got it installed also the reason npm audit fix --force doesn't even work is because it's not npm or node that is bugged its some of the dependencies apparently.
For future reference you can install npm-check-updates and then run the command ncu which informed me all of my dependencies match the latest package versions.
And if it says any are outdated apparently ncu u updates them.
Also easiest way to install ganache gui on Linux seems to be a .appimage....why can't all files be installed this way? Seems counterproductive to take hours just figuring out setup of environment. I also have 20 years of computer experience with over 8 of coding experience in object oriented language and nothings ever been this hard even on windows til I started trying to do blockchain/solidity...are they doing this on purpose to keep people out...because seriously 😒 pain in the ass when you just want to pound some keys on an IDE
I've got it but seriously if I had that much trouble imagine how everyday people must feel.
Or just someone who knows regular js
Nov 9, 2021, 2:31 AM

Β© 2024 Draquery.com All rights reserved.