diff --git a/README.md b/README.md index fbe6ca0..cbc8450 100644 --- a/README.md +++ b/README.md @@ -93,8 +93,15 @@ The Angle's Transmuter and savings smart contracts have been audited by Code4ren The Parallelizer and savings contracts have been audited by: -- Bailsec in April/March 2025, find the final audit report - [here](./docs/audits/Bailsec%20-%20Parallel%20Protocol%20-%20V3%20Core%20-%20Final%20Report.pdf) +#### Bailsec + +Bailsec in April/March 2025, find the final audit report +[here](./docs/audits/Bailsec%20-%20Parallel%20Protocol%20-%20V3%20Core%20-%20Final%20Report.pdf) + +#### Certora + +Certora by formal verification in April/March 2025, find the final audit report +[here](./docs/audits/Certora_Report_Parallel_Parallelizer_BridgeToken_final.pdf) ## Development diff --git a/contracts/parallelizer/facets/RewardHandler.sol b/contracts/parallelizer/facets/RewardHandler.sol index a74f57c..6cedd41 100644 --- a/contracts/parallelizer/facets/RewardHandler.sol +++ b/contracts/parallelizer/facets/RewardHandler.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.28; -import { IRewardHandler } from "interfaces/IRewardHandler.sol"; - import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import { IRewardHandler } from "interfaces/IRewardHandler.sol"; + import { AccessManagedModifiers } from "./AccessManagedModifiers.sol"; import { LibDiamond } from "../libraries/LibDiamond.sol"; diff --git a/contracts/parallelizer/facets/Swapper.sol b/contracts/parallelizer/facets/Swapper.sol index 1a4f0a5..4be63c8 100644 --- a/contracts/parallelizer/facets/Swapper.sol +++ b/contracts/parallelizer/facets/Swapper.sol @@ -209,11 +209,11 @@ contract Swapper is ISwapper, AccessManagedModifiers { if (amountIn > 0 && amountOut > 0) { ParallelizerStorage storage ts = s.transmuterStorage(); if (mint) { - _checkHardCaps(collatInfo, amountOut, ts.normalizer); uint128 changeAmount = (amountOut.mulDiv(BASE_27, ts.normalizer, Math.Rounding.Ceil)).toUint128(); // The amount of stablecoins issued from a collateral are not stored as absolute variables, but // as variables normalized by a `normalizer` collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(changeAmount); + _checkHardCaps(collatInfo, 0, ts.normalizer); ts.normalizedStables = ts.normalizedStables + changeAmount; if (permitData.length > 0) { PERMIT_2.functionCall(permitData); diff --git a/docs/audits/Certora_Draft_Report_Parallel_Parallelizer_BridgeToken.pdf b/docs/audits/Certora_Draft_Report_Parallel_Parallelizer_BridgeToken.pdf new file mode 100644 index 0000000..88d6dcd Binary files /dev/null and b/docs/audits/Certora_Draft_Report_Parallel_Parallelizer_BridgeToken.pdf differ diff --git a/docs/audits/Certora_Report_Parallel_Parallelizer_BridgeToken_final.pdf b/docs/audits/Certora_Report_Parallel_Parallelizer_BridgeToken_final.pdf new file mode 100644 index 0000000..d866b9b Binary files /dev/null and b/docs/audits/Certora_Report_Parallel_Parallelizer_BridgeToken_final.pdf differ