Closed Galuf1 closed 2 years ago
The rules.cpp file maybe needs to be updated to render the redeem tx invalid if there is an incongruity in contract id or amount.
Also we're planning to do a pre-set config for native ecosystem and constrain this feature outside of it so the various edge cases in redemption are limited, there will only be 5 types of dCurrency, sBTC, dUSD, dEUR, dJPY, dCNY.
This is a testing concern and I'm pretty sure the April 2022 work covers this. If we find a similar bug, that would be a new ticket.
Some transaction arguments are not being checked before sending the transaction, so it just sends wrong and then it falls out of consensus.
Example, i issued 50 pegged currencies in contract id 5, and then redeemed 30 in contract 4 (no contracts in reserve there) and it fell out of consensus:
update_tally_map(mks9T1QMm32im7HSb6bABHsmaSDS3i34wV, 6=0x6, -3000000000, ttype=0): before=5000000000, after=2000000000 update_tally_map(mks9T1QMm32im7HSb6bABHsmaSDS3i34wV, 4=0x4, -3000000000, ttype=5) ERROR: insufficient balance (=0) update_tally_map(mks9T1QMm32im7HSb6bABHsmaSDS3i34wV, 4=0x4, -3000000000, ttype=5): before=0, after=0