[0] https://docs.iron.finance/iron-finance-on-polygon/titan-dist...
[1] https://www.coingecko.com/en/coins/iron-titanium-token
edit:
On further inspection, it seems like they'd just need to get the price up to the 6th digit[3]. I'm not sure it's feasible though.
[3] https://github.com/IronFinance/iron-polygon-contracts/blob/m...
How on earth does something like this happen?
Screwing up the maximum supply seems like an enormous blunder while I kinda understand the assumption that “price > 0” if they’re supposed to be backed by 75% usdc.
It doesn't need to be. It's basically a bug in the code. They didn't consider TITAN price being 0 to be possible, so they didn't write their code in a way to handle it correctly.
A random guess for why they had the price > 0 check. They might have had code like this:
// Returns (usdc_to_withdraw, titan_to_withdraw)
def GetWithdrawalAmounts(iron_to_withdraw):
usdc_price = 1 // guaranteed: USDC price in USD (aka USD/USDC)
titan_price = GetTitanPrice() // TITAN price in USD (aka USD/TITAN)
iron_price = GetIronPrice() // IRON price in USD (aka USD/IRON)
usdc_to_withdraw = iron_to_withdraw * iron_price * 0.75 / usdc_price
assert titan_price > 0
titan_to_withdraw = iron_to_withdraw * iron_price * 0.25 / titan_price
return (usdc_to_withdraw, titan_to_withdraw)
If you look at it like that, it's pretty obvious why they have the assertion that titan_price > 0. Without that assertion there's a divide by 0.If you want to handle the ability to withdraw USDC even if the TITAN price is 0, you have to make the code more complicated. Likely not just this function, but the system as a whole, because it'll mess up all the accounting.
"[EDIT: I’ve since learned that the developer(s?) behind this are already the laughing stock of the DeFi community, having wrecked each of their 3 previous projects (now 4) — though this might be their biggest hit yet]"
This is exactly what crypto-enthusiasts claim is going to happen to the US Dollar and I've never heard mention of crypto taking pity on fiat by offering to give them crypto when the bottom finally falls out of fiat.
So why should anyone else be responsible for people who took a calculated risk that blew up in their face?
Yes, this sucks for them. But this shit happens. Don't throw good money after bad.
A calculated risk is that you put money into something which may end up losing all of its value; not that your collateral becomes locked in a safe with an accidentally lost key. They had a reasonable expectation that even if the value was totally lost, they wouldn't have their collateral locked forever. Their investment, yes, but not their collateral.
Sure, one always has to account for extreme scenarios when doing anything, like the risk of a critical flaw in the code. But to give another extreme gambling scenario:
Let's say you put your car up as collateral for a huge gambling bet. You of course take a calculated risk that if you lose the bet, you lose your car. Then let's say you back out of the bet after putting up the collateral, or you even win the bet, but there was a mixup at the casino and they thought you lost the bet and they took your car without you realizing it and it's on another continent now.
In both scenarios, you hope that you can at least get some kind of compensation from the people you entrusted the collateral to, since it was just a complete fuckup on their part. You know you're not guaranteed to get anything, but I think it's reasonable to try to ask for compensation. If you just took a bet and the value plummeted, then you know it's tough luck for you and just a standard high-risk high-reward scenario that you ended up on the losing side of, but this is something else.
(At least if I'm understanding this properly and the collateral really was purely collateral. Seems to be a bit complicated because they were attempting to make a... stablecoin... pegged to an intentionally volatile asset, somehow.)
>This is exactly what crypto-enthusiasts claim is going to happen to the US Dollar
It's mostly just Bitcoin maximalists who think that, and they're a small subset of people who own Bitcoin. This is Binance Smart Chain (basically a copy of Ethereum), and I'm sure some BSC/Ethereum users believe something similar, but it's a much smaller percentage than even Bitcoin's small percentage.
Also, I don't think they think every dollar is secretly embedded with nanobots that'll encase the bill in titanium after someone at the Fed trips and falls on a big red button, which is what would be analogous to this. I think they think the dollar will lose most or all of its value due to hyperinflation. I think that's a completely unfounded belief based on an unfounded philosophy, but it's a different and entirely unrelated thing.
They literally handed their money to a computer program that works outside of human control and cannot be interfered with... which means if something goes wrong no one can intervene and sort it out. This is a risk they took willingly. It's not the first time a computer program malfunctions, and won't be the last.
That's true in general, but in this rare case anyone's USDC can actually theoretically be recovered in full if the price ever manages to get just barely above 0 for a period of time and they pull it out during such a period.
If nothing can be done, you have to just take the loss. But here something can actually be done, and it's not like it's infeasible. Just hard.
If it's possible, what would make it difficult? Or what would make it impossible?
I kind of thought that there isn't normally any requirement for any particular volume of trading to set a price.
Similarly the expectation for anyone trading crypto surely has to be that it’s a risky volatile asset class where you can lose all your money in a variety of exciting new ways, and if you are parking some of that money in dollar stablecoins some of that expectation ought to carry over. If you want to put your money somewhere safe, there are banks and money-market funds and Credit Suisse supply-chain funds, and if any of them go bust then that is a potential financial-stability problem. If you want to put your money somewhere safe for crypto, there are stablecoins, and if any of them go bust then that is a brief distraction from the crypto exchanges losing their customers’ money in other ways."
Profit.
There are a lot of people with USDC locked up in the contract and they might be willing to pay a share of it to unlock it.
Reasons why this might NOT work:
1. The oracle "broadcasts" the price to the network, which other services may rely on. Broadcasting a false price could hurt those services, and the oracle would lose credibility.
2. The oracle's price is somehow tied into other blockchain mechanics (i.e. it can only report a price that the network consensus agrees is true)
I'm not sure how #2 could be true, since the purpose of an oracle is to provide information that the blockchain can't determine on its own.
EDIT: More info on the price oracle in use here: https://docs.iron.finance/mechanism/pricing-oracle
Still not sure the exact mechanism, but #1 seems to be the concern. Chainlink can't readily tamper with the price feed that may be in use by others.
edit: Nevermind, I misread. It's -0.0961, apparently.
[1] https://www.cnbc.com/2020/04/26/why-oil-prices-went-negative...
I don’t know what the Oracle is using but it would be amusing if something else means the price is “stuck” at zero once it hits zero.