Findings:
- [CRITICAL[ infinite money printing glitch (see below)
- Fixed by fixing bug in AssociateDebt module which allowed for markets which were not in range to assign debt to an account. Tests added. https://github.com/Synthetixio/synthetix-v3/commit/eea624a739090ff5ace028de4ea25ffc1c926e96
- [CRITICAL] LegacyMarket.sol does not implement the
onERC721Received
function. As a result, callingmigrate
will always revert as minting an account token to itself will fail.- added
onERC721Received
function https://github.com/Synthetixio/synthetix-v3/commit/5fe3425b23b3c0c6e21cbab42b25f7832fcfde54
- added
- [CRITICAL] Accounts with an unhealthy collateralization ratio cannot be migrated. During migration, the call to
associateDebt
will validate that the debt association does not put the account into a state that can be liquidated. As a result, an account on v2 that should be liquidated cannot be moved to v3 if the collateralization ratios are the same between the two systems.- our in-house k