Assessment reports>Definitive LLSD>Discussion>No salts when calculating hashes

No salts when calculating hashes

Currently, the hashes are calculated in the manner below. The hashes have no salts/domains; therefore, if a change were ever introduced that make DepositParams the same size as RedeemParams, the signature supplied for one would also be valid for the other. This is a detail that should be taken into consideration when changing said params.

function encodeDepositParams(DepositParams calldata depositParams) public pure returns (bytes32) {
    return keccak256(abi.encode(depositParams));
}

function encodeRedeemParams(RedeemParams calldata redeemParams) public pure returns (bytes32) {
    return keccak256(abi.encode(redeemParams));
}
Zellic © 2024Back to top ↑