Submitted by MrPotatoMagic, also found by 0xCiphky, 0xNirix, Tigerfrake, typicalHuman, 0xc0ffEE, DigiSafe, eLSeR17, onthehunt11, rscodes, Jorgect, 20centclub, dimah7, Gosho, and Beosin
The Cred.sol contract provides a buyShareCredFor() function which anyone can use to buy shares for another curator. We also know that once a share is bought, the curator needs to serve a 10 minute share lock period before being able to sell those tokens.
The issue is that an attacker can purchase 1 share every 10 minutes on behalf of the curator to DOS them from selling. As we can see on the bonding share price curve docs here, the price to buy 1 share starts from 2.46 USD and barely increases. Each share bought = 10 minutes of delay for the victim user.
Delaying the user from selling is not the only problem though. During these delays, the price of the share can drop, which could ruin a users trade strategy causing to incur more loss.
Refer to the price curve here for cost of shares.
Consider removing the buyShareCredFor() function since it does more harm than good.
Timing
ZaK3939 (Phi) confirmed and commented:
cats (warden) commented:
MrPotatoMagic (warden) commented:
kuprum (warden) commented:
0xDjango (judge) commented:
Note: For full discussion, see here.
