literally one line of code in the ERC20 token standard could have saved untold losses
I can already hear the optimizoooors "but noooooo, the extra gas you're adding, we have to minimise opcodes sirrrr."
think about the tradeoffs implicit in what you're saying: we think it's better to have sharp edges in this mission critical software that's going to handle billions of dollars because it's cheaper in the happy path.
my whole thing is, the sad path will happen, and when it does, the users who lost money will have no recourse and it will have been our fault as developers for not putting these basic checks in.
DAI: 4.39m tokens sent to self
USDT: 305,000 tokens sent to self
Maker: $1.58m tokens sent to self
There's a lot more tokens where this happened and twitter only lets me upload 4 pics. and yeah it's not a sev1, drop everything and fix it kind of issue, it's just more of a critique that no one put the thought into saying, hmmm here's a basic problem and let's work together as an ecosystem to fix it so users don't keep losing money in completely preventable ways.
I'm working on fixing this because no else has.
Show original



1.92K
1
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.