3 ms·
> Their docs state that there should be a max supply of 1 billion iron titan tokens[0]. But according to coingecko, there are over 27 trillion in circulation[1]
by rank0 5y ago
> Their docs state that there should be a max supply of 1 billion iron titan tokens[0]. But according to coingecko, there are over 27 trillion in circulation[1].
How on earth does something like this happen?
- crooked-v 5y agoWell, we can already see they screwed up a basic piece of code in the IRON smart contract, so is that really so surprising?
- rank0 5y agoI suppose yes and no. 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.
- Thorrez 5y agoYou might be confused. The "price > 0" refers to the price of TITAN. TITAN isn't backed by USDC at all. IRON is (ideally) backed by 75% USDC and 25% TITAN.
- rank0 5y agoOh you're right I am confused. I actually don't even understand the point of the price check in the first place. Why does the USDC portion of IRON tokens need to be locked in the smart contract based on TITAN price anyways?
- Thorrez 5y ago>Why does the USDC portion of IRON tokens need to be locked in the smart contract based on TITAN price anyways? 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.
- Paradigma11 5y agoFrom the article: "[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]"