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
Description: Description
In the setAtomDepositFractionOnTripleCreation function of the EthMultiVault contract, there's no check to ensure that the atomDepositFractionOnTripleCreation value is divisible by 3. This could lead to a small amount of ETH being left in the protocol when creating triples, as the value is meant to be equally distributed among three atoms.
Attack Scenario\
While not a direct security vulnerability, this oversight can lead to the following issues:
Small amounts of ETH could accumulate in the protocol over time due to rounding errors.
The actual distribution of ETH to the three atoms in a triple may be slightly uneven.
Over a large number of transactions, this could result in a noticeable discrepancy between expected and actual ETH distribution.
Attachments
// SPDX-License-Identifier: MITpragma solidity^0.8.0;
import"./EthMultiVault.sol";
contractEthMultiVaultFractionTest {
EthMultiVault public vault;
constructor(address_vaultAddress) {
vault =EthMultiVault(_vaultAddress);
}
function testFractionDivisibility(uint256newFraction) external {
// Assume this contract has admin rights
vault.setAtomDepositFractionOnTripleCreation(newFraction);
uint256 setFraction = vault.tripleConfig().atomDepositFractionOnTripleCreation;
uint256 remainder = setFraction %3;
require(remainder ==0, "Fraction not perfectly divisible by 3");
}
}
Revised Code File (Optional)
function setAtomDepositFractionOnTripleCreation(uint256atomDepositFractionOnTripleCreation) external onlyAdmin {
// Ensure the value is divisible by 3uint256 adjustedFraction = (atomDepositFractionOnTripleCreation /3) *3;
tripleConfig.atomDepositFractionOnTripleCreation = adjustedFraction;
emitAtomDepositFractionUpdated(adjustedFraction);
}
The text was updated successfully, but these errors were encountered:
The report highlights that there is no check to ensure atomDepositFractionOnTripleCreation is divisible by 3, potentially leading to small amounts of ETH being left in the protocol.
Label:invalid
Comment:
Since the value of atomDepositFractionOnTripleCreation is fixed and can only be set by the admin, we do not consider this a security vulnerability. At best, it can be considered a low-priority enhancement, primarily since the accumulated difference will be so negligible that it doesn’t have any practical impact. No fix is needed if the value divisible by 3 is used in the deploy script.
Github username: --
Twitter username: --
Submission hash (on-chain): 0x45af594e37907786efc19eea5046d4b897518936ba6dc1ee0e011e4b1bfa26dd
Severity: low
Description:
Description
In the
setAtomDepositFractionOnTripleCreation
function of the EthMultiVault contract, there's no check to ensure that theatomDepositFractionOnTripleCreation
value is divisible by 3. This could lead to a small amount of ETH being left in the protocol when creating triples, as the value is meant to be equally distributed among three atoms.Attack Scenario\
While not a direct security vulnerability, this oversight can lead to the following issues:
Attachments
The text was updated successfully, but these errors were encountered: