Submitted by cmichel
The Unlock.recordKeyPurchase function is called on each key purchase (MixinPurchase.purchase) and mints UDT tokens to the referrer.
The amount to mint is based on the transactions gas price which is controlled by the caller (purchaser):
Tokens can be minted by purchasing a key with themself as the referrer at a high transaction gas price.
Depending on the UDT price on external markets, it could be profitable to buy a key at a high gas price, receive UDT and then sell them on a market for a profit.
The amount minted should be more predictable and not depend on the users gas price input.
Consider declaring an average gas price storage variable that is set by a trusted party and use this one instead.
julien51 (Unlock Protocol) disagreed with severity and commented:
0xleastwood (judge) commented:
