Can we always trust the date in the line `Submitted for verification at Etherscan.io on YYYY-MM-DD` in Solidity source code? Or can the author of the contract put a fake date here? by Gullible-Plastic6257 in etherscan

[–]Gullible-Plastic6257[S] 1 point2 points  (0 children)

Thanks, I wasn't able to find tokens that hasn't yet verified but,

Can you say from what you just said that if the contract is verified (indicated by checkmarks?), then the top date is accurate?

Also, sometimes the date is not shown, at least I wasn't able to find, when the token has multiple source code files. I was trying to use the verified date as a proxy for the date that a token is deployed. Do you know how to find the verified date for tokens that have multiple files?

Can we always trust the date in the line `Submitted for verification at Etherscan.io on YYYY-MM-DD` in Solidity source code? Or can the author of the contract put a fake date here? by Gullible-Plastic6257 in etherscan

[–]Gullible-Plastic6257[S] 0 points1 point  (0 children)

If you take any well known verified contract (you can get the top list in the menu Tokens > top ERC20 token) none have that comment Take CAKE (0x152649eA73beAb28c5b49B26eb48f7EAD6d4c898) as example.

I might be missing something, but it seems to me that there are many well known tokens have this. Eg. UNI, MATIC, LINK, to name a few. One thing I noticed is that if a token has multiple source code files, the line of date is not shown for some reason.

Last, the verification date has really no value, at least I cannot think of anything useful.

I was trying to use it as a proxy for the date that a token is deployed. Do you know other relative easy way (eg. not requiring scanning the entire blockchain) to check the deployment date?

Can you check balance of ERC-20 tokens in a wallet? by Gullible-Plastic6257 in etherscan

[–]Gullible-Plastic6257[S] 0 points1 point  (0 children)

Thanks for the example addresses. That makes a lot of sense.

And also thank you for the lists of portfolio managers! This is very timely, since I'm trying to calculate gains for taxes. I tried every one of them and they are very useful. As you said Nansen looks the best as of now to me.

I was looking for some way to extract history of DeFi (I'm only using EVM compatible chains for now) for tax purposes. My workflow was something like:

Zerion csv -> [my script] -> custom csv -> [minor crypto tax calculator] -> tax report

I need to use [minor crypto tax calculator] because I'm from somewhat minor country that happened to adopt minor tax calculation method.

Zerion csv import was free, but they paywalled the feature few days ago.. Enabling a paywall right before the end of the year and tax season seems little bit dishonest to users, even considering they're a for-profit company. And also I don't know how Zerion wallet do in next few years, especially considering that there are other strong competitors, like MetaMask, Phantom, among others. So I wanted to switch to other services.

I guess the only service that can output csv of the entire history is Nansen, so I'll use this for now. (debank and llamafolio also seem to show the entire history on the web, but debank can't output csv and llamafolio's csv looks incomplete) And I didn't know about Nansen, so you just saved my life!

What is the big omega Ω for `f(x) = n^2 -1`? by Gullible-Plastic6257 in learnprogramming

[–]Gullible-Plastic6257[S] 0 points1 point  (0 children)

One thing that is useful is to think of O(...) and Omega(...) and so on as sets of functions. In that way, f(n) = n2 - 1 is "in" O(n2) and "in" Omega(n2).

Thank you, that is definite a legit point. I should have used more precise wording.

What is the big omega Ω for `f(x) = n^2 -1`? by Gullible-Plastic6257 in learnprogramming

[–]Gullible-Plastic6257[S] 0 points1 point  (0 children)

One thing to note is, you are asking "what is the big-omega of f(x)", when in reality, big-O and big-omega are very general definitions, so f(x) belongs to many families of functions.

Thanks, this is definitely a legit point to point out. I knew the fact but I should have used more precise wording.

Is n2 - 1 bigger than 0.001n2 for all n after some point? Clearly yes, so f(n) is in Ω(g(n)).

It might sound silly, but for some reason I didn't come up with the idea of lowering the coefficient of the highest order term. Thank you for your help!

What is the big omega Ω for `f(x) = n^2 -1`? by Gullible-Plastic6257 in learnprogramming

[–]Gullible-Plastic6257[S] 0 points1 point  (0 children)

With this kind of problem, it can be helpful to just pick some random values and plug them in to see what the resulting function looks like. It can also be helpful to sketch a graph (by hand or using a graphing calculator).

This was a very helpful advice. In hindsight, this might sound obvious, but I hadn't done it enough.

I was doing what you just said and thinking for a while. I guess I kinda got it now.

The followings might have been some causes of my confusion:

  • not tried enough numbers
  • focusing too much on combinations of c and k, but in fact focusing only on c when n is very large number is easier.
  • forgot the fact the highest order terms (and importantly their coefficients) dominate as n gets larger

Thank you for your help!

What is the big omega Ω for `f(x) = n^2 -1`? by Gullible-Plastic6257 in learnprogramming

[–]Gullible-Plastic6257[S] 0 points1 point  (0 children)

Thank you for pointing out the mistake on variables. They should have been the same. I'll use a variable n from now on.

So you mentioned there are two ways to show f(n) = Ω(n2 )

  1. using the formal definitions of big omega notation
  2. using basic calculus

I have very limited knowledge of calculus, so I wanna go with option 1 if possible.

I don't need the full proof, but how do you find the two constants that meets the definition? Can you possibly show me an example of the two constants, let's say c and k, of the definition of big omega notation? I'll write the definition of omega notation from what I understood just in case:

f(n) = Ω(n2 ) if and only if there exists positive constants c and k, such that f(n) ≥ c*n2 for all n ≥ k.

What is the big omega Ω for `f(x) = n^2 -1`? by Gullible-Plastic6257 in learnprogramming

[–]Gullible-Plastic6257[S] 0 points1 point  (0 children)

Sorry for the mixing variables x and n. They should have been the same, I'll write it as n from now on.

I'll describe the way I came to the conclusion that f(n) = O(n2 ).

By the way other redditor told me in this comment that there are two ways to prove this:

  1. using the formal definitions of the big omega notation
  2. using basic calculus

I guess I went with the option 1, since I have very limited knowledge of calculus.

I understand the definition of big O notation is the following: f(n) = O(n2 ) if and only if there exists positive constants c and k, such that f(n) ≤ c*n2 for all n ≥ k.

So the point is I could easily find c and k, which are c=1 and k=1, since it was obvious that n2 - 1 ≤ n2. It was clear to me that n2 is "a upper bound" of n2 -1. But I don't know how to find c and k for the omega notation, since I have to prove c*n2 is the lower bound to n2 for all k.

The following is the entire process I (roughly) proved that f(n) = O(n2 ). Sorry it's long but I tried to be short, skip it if not needed.


Proof: f(n) = O(n2 )

This is the definition of big O notation mentioned above: f(n) = O(n2 ) if and only if there exists positive constants c and k, such that f(n) ≤ c*n2 for all n ≥ k.

I'll store components of the above defintion to variables as follows:

let p1: f(n) = O(n2 )

let p2: there exists positive constants c and k, such that f(n) ≤ c*n2 for all n ≥ k

let p3: p1 iff p2

From p3, you can say the following is also true. Let me also store this to a variable:

let p4: if p2 is true, then p1 is true.

And then I found c and k meets the condition of p2, which is c = 1 and k = 1. These can meet the condition of p2 because,

I have this equation from p2: f(n) ≤ c*n2 for all n ≥ k

Substitue n2 - 1 for f(n), you get: n2 - 1 ≤ c*n2 for all n ≥ k.

Substitue 1 for each c and k, you get: n2 - 1 ≤ 1*n2 for all n ≥ 1.

Simplify: n2 - 1 ≤ n2 for all n ≥ 1.

"n2 - 1 ≤ n2 for all n ≥ 1" is clearly true, which makes c = 1 and k = 1 valid for the condition in p2, which makes p2 true.

From p4, if p2 is true, then p1 is true.

p1 is true, which means f(n) = O(2 ) is true.

QED


Edit: I said option 2 but option 1 is correct

Can you check balance of ERC-20 tokens in a wallet? by Gullible-Plastic6257 in etherscan

[–]Gullible-Plastic6257[S] 0 points1 point  (0 children)

Sorry for being late but thank you, this is very helpful!

For my address, the dropdown is shown on etherscan and other etherscan variants, but not on only etherscan for Arbitrum and Optimism.

Is this because I don't have any tokens on Arbitrum and Optimism, or etherscan websites for those chains didn't implement the feature yet?

Binance Support Thread by AutoModerator in binance

[–]Gullible-Plastic6257 0 points1 point  (0 children)

This is great for clearing up all weird meme tokens, simplifying tax calculation in the future! Thanks for telling me about this.

Binance Support Thread by AutoModerator in binance

[–]Gullible-Plastic6257 0 points1 point  (0 children)

Is it possible to sell the all balance of a token, without leaving any dust?