Open hats-bug-reporter[bot] opened 1 month ago
How did alice cause it to be denyed? This poc does not increase time by the time needed for send batch unlock requests to pass, so it is expected to fail
Yes you're right. I thought why it is failing at first. Didn't come to that conclusion that's why submitted the issue. Yes after increasing the time test passes
Thank you for your submission. add let sess = helpers::update_days(sess, 4);
before let sess = helpers::call_send_batch_unlock_requests(
and the test pass
Github username: @aga7hokakological Twitter username: 0xagathokako Submission hash (on-chain): 0x774e345adb4a718e338a882b21b7d163a92433251cc47f00f9934670a39588b6 Severity: high
Description: Description\ In vault contract a malicious user can cause denial for unlocking of tokens by requesting for unlocking of 1 AZERO token.
Attack Scenario\ STEP:
1: All the users stake their tokens in protocol. Say Alice(malicious), Bob, Charlie. Each of them stakes 1M AZERO
2: Then Alice observes first batching and she tries to withdraw some of her AZERO. Charlie and Bob requests for unlocking 0.5M AZERO and Alice requests almost all 999999 AZERO. Keeping 1 AZERO in the protocol.
3: Now when Charlie and Bob requests for unlocking remaining 0.5M AZERO. Alice who has 1 AZERO in protocol also requests for unlocking of tokens.
4: Now there are 2 batches but when the function is called it'll revert.
Attachments
Considering implementing check for minimal withdrawal of AZERO tokens