News for hackers. Stuff that matters.
Re:The collapse of the IRON stable coin by Dotnaught on Thursday June 17, 2021 @12:07PM (#27541176)
The line of source code cited in the post isn't immediately evident in the Iron Contracts repo:

require(_share_price > 0, “Invalid share price”);

https://github.com/IronFinance/iron-contracts

Is it in a different repo? Does it exist?

Re:The collapse of the IRON stable coin by tanzann on Thursday June 17, 2021 @01:24PM (#27542068)
Re:The collapse of the IRON stable coin by sva_ on Thursday June 17, 2021 @01:30PM (#27542132)
I think it ultimately boils down to

https://github.com/IronFinance/iron-polygon-contracts/blob/m...

> uint256 private constant PRICE_PRECISION = 1e6;

yikes :D

Re:The collapse of the IRON stable coin by meowface on Thursday June 17, 2021 @12:11PM (#27541229)
Not unlike many package repositories (PyPI etc.) and GitHub, the actual code a smart contract is running doesn't necessarily have any connection to what's in some GitHub repo. The only way to know is to look at what's on the actual blockchain.

(If verified source is published, you can see the actual code; else you'd have to decompile the EVM bytecode. But basically 100% of the time, if verified source isn't provided then it's a scam, so it's safe to just ignore things without source. And, of course, even if verified source is published, there's still a high chance any given contract picked out of a bucket will be a scam, but at least you can review the code and spot the backdoor.)