Submitted by 0xTheC0der
Once a yang (collateral asset) is suspended on Opus, the following holds true according to the documentation:
Therefore, a user will naturally deposit healthier collateral to their trove to maintain its threshold, while withdrawing the unhealthy/suspended collateral as it loses value on Opus, effectively replacing the collateral.
However, this is not possible because the underlying assets of a yang are immediately frozen once suspended. Its clear from the documentation that no more deposits of suspended collateral can be made, but this accidentally also affects the withdrawals.
The abbot::withdraw() method calls sentinel::convert_to_yang() which in turn calls sentinel::assert_can_enter():
One can see that the assertion will be triggered once the suspension status is Temporary or Permanent.
As a consequence, a yangs underlying assets are frozen once suspended:
The following PoC demonstrates that a yangs underlying assets cannot be withdrawn once suspended.
Add the test case below to src/tests/abbot/test_abbot.cairo and run it with snforge test test_withdraw_suspended_fail.
Replace the accidental assert_can_enter(..) check with those that are really necessary at this point:
Invalid Validation
tserg (Opus) confirmed
0xsomeone (judge) commented:
