zlsecure3 / review_star

0 stars 0 forks source link

`Airdop::airdrop` can airdrop unlimitted amount that greater than the `maxmium_supple`. #9

Open zlsecure3 opened 1 year ago

zlsecure3 commented 1 year ago

subject

Airdop::airdrop can airdrop unlimitted amount that greater than the maxmium_supple.

description

There is an invariant that the to be airdropped amount plus the supplied should less than or equal to maxmium_supply, but this line of code have the reverse logic.

assert!(amount + credit_service.supplied >= credit_service.maxmium_supply,SUPPLY_OVERFLOW);

The impact is that Airdop::airdrop can airdrop unlimitted amount that greater than the maxmium_supple.

recommendation

change the implementation to:

assert!(amount + credit_service.supplied <= credit_service.maxmium_supply,SUPPLY_OVERFLOW);

locations

severity

Critical

damage

exploitability

category

Logic


system_generated: auditor:jayphbee submission_id:1464760280

zlsecure3 commented 1 year ago

grading (edit)


submission_id:1464760280


review_type:GRADING


result: TBD-yes,no


rating: TBD-123


comment: TBD-Rejected,Accepted by Secure3.


severity: TBD-Critical,Medium,Low,Informational


category:


description: