Submitted by cmichel
The TracerPerpetualSwaps.settle function updates the users last index to currentGlobalFundingIndex, however a comment states:
The code for the else branch also updates the last index to currentGlobalFundingIndex - 1 instead of currentGlobalFundingIndex.
The impact is that it might be possible for first-time depositors to skip having to pay the first funding rate period as the accountLastUpdatedIndex + 1 < currentGlobalFundingIndex check will still return false when the funding rates are updated the next time.
Recommend to check if setting it to currentGlobalFundingIndex or to currentGlobalFundingIndex - 1 is correct.
raymogg (Tracer) confirmed but disagreed with severity
