Calling move_to(account, Resource{...})
without checking exists<Resource>(account)
will abort if the resource already exists, so your set_secret
works only once per account and then permanently fails on updates — a denial of service for ordinary updates.
First call: set_secret(owner, bytes)
→ move_to
creates resource → succeeds.
Second call by same owner: move_to
tries to create resource again → abort with RESOURCE_ALREADY_EXISTS (Move runtime abort).
The transaction that aborts will revert any side effects in that transaction (no partial changes).
Likelihood:
Impact:
Users cannot update their secret once set, reducing functionality. This also causes the test to fail after the first run.
First call: set_secret(owner, bytes)
→ move_to
creates resource → succeeds.
Second call by same owner: move_to
tries to create resource again → abort with RESOURCE_ALREADY_EXISTS (Move runtime abort).
The transaction that aborts will revert any side effects in that transaction (no partial changes).
Replace the single unconditional move_to
in set_secret
with the following logic:
If a Vault
exists at the owner address → update in-place using borrow_global_mut<Vault>(addr)
.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.