Assessment reports>Echelon>Discussion>Minor issues with DUST_THRESHOLD

Minor issues with DUST_THRESHOLD

In meridian_executor/executor.move, the execute_deposit function will send the amount to the admin if the remaining balance after processing is less than DUST_THRESHOLD.

This is not a security issue, but a user can consider this is a loss of funds. so Echelon should be given ample notice.

Also, since DUST_THRESHOLD is set to 1000 while BPS_AMOUNT is 10000, the precision error can be up to 10,000 or less. We recommend setting the DUST_THRESHOLD equal to BPS_AMOUNT to prevent this issue.

vector::for_each(refund_assets, |asset| {   
    assert!(fungible_asset::amount(&asset) < DUST_THRESHOLD, ERR_MERIDIAN_EXECUTOR_TOO_MUCH_ASSET_SUPPLIED);
    primary_fungible_store::deposit(manager::manager(), asset);
});
Zellic © 2025Back to top ↑