You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the security audit there is a recommendation to explicitly limit the number of iterations assuming that it is not possible to distribute fees to number of validators that exceed some X:
There is no simple way to say what should be a limit since the method refers on the functionality implemented in a particular fee manager.
Let's think of an approach that could estimate possible gas usage of the method onFeeDistribution and recommend a maximum of the validators that can be used for the particular bridge. For example, it could be a script that will deploy particular set contracts (as per the user deployment configuration) but in a local testnet, then the script will run some tests and estimate maximum number of validators handled by distributeFeeProportionally, then this estimation should be recommended to be set up in BaseBridgeValidators to limit _addValidator method properly.
The text was updated successfully, but these errors were encountered:
As per the security audit there is a recommendation to explicitly limit the number of iterations assuming that it is not possible to distribute fees to number of validators that exceed some
X
:https://github.com/poanetwork/poa-bridge-contracts/blob/786be68cd69526e561dd5654844ac373cda7a539/contracts/upgradeable_contracts/ValidatorsFeeManager.sol#L41-L53
There is no simple way to say what should be a limit since the method refers on the functionality implemented in a particular fee manager.
Let's think of an approach that could estimate possible gas usage of the method
onFeeDistribution
and recommend a maximum of the validators that can be used for the particular bridge. For example, it could be a script that will deploy particular set contracts (as per the user deployment configuration) but in a local testnet, then the script will run some tests and estimate maximum number of validators handled bydistributeFeeProportionally
, then this estimation should be recommended to be set up inBaseBridgeValidators
to limit_addValidator
method properly.The text was updated successfully, but these errors were encountered: