Phoenix-Protocol-Group / phoenix-contracts

Source code of the smart contracts of the Phoenix DeFi hub DEX protocol
GNU General Public License v3.0
10 stars 7 forks source link

PHOAM-026: Anyone can call the fund_distribution function #359

Closed gangov closed 4 months ago

gangov commented 4 months ago

Description

The fund_distribution function does not enforce authorization, thereby allowing anyone to call it as long as its input parameters are valid. After thorough analysis, Coinspect could not determine a risky scenario where this lack of authorization can be abused as long as the curve max_complexity is kept relatively low. This will prevent an adversary from filling up the DataKey storage space.

Recommendation Unless otherwise necessary, consider allowing only the contract owner or manager to call this function.