<!-- canonical: https://0xsimao.com/findings/districtone-invite-fees-cal-storage -->

# Invite fees in FairLauncher::_calInviteFees() may be 0, in which case storage update could be skipped

Low/Info · Three Sigma · Social money games · 13th June, 2024

Finding 3S-D1-N03 of the DistrictOne security review.

- Protocol: https://districtone.io/
- Report: /reports/districtone
- Source: https://cdn.sanity.io/files/qoqld077/production/fd2142f1d189dd29db23dff49d4018d4da9c01d6.pdf

---

### Description

In FairLauncher::_calInviteFees(), state updates are skipped if the directInviter is
address(0), but they could also be skipped if the amount is null, which happens after the
hard cap is reached.

### Recommendation

Skip storage slot updates if the amount is null.

### Status

Acknowledged

---

Related findings:

- [Uneven getPendingAccFundingFees() leading to wrong funding rate update](https://0xsimao.com/findings/ostium-uneven-acc-funding-fees): Ostium
