5 matches found
Lender.sol amountIn is used as returned for Pendle
Lines of code Vulnerability details uint256 returned; // Add the accumulated fees to the total uint256 fee = calculateFeea; feesu += fee; address memory path = new address; path0 = u; path1 = principal; // Swap on the Pendle Router using the provided market and params returned =...
Funding.getAmountOut returns zero when there is no discount set
Lines of code Vulnerability details Impact User provided asset funds will be lost, i.e. 100% to be frozen in the contract, as the system will not give away any Citadel in return. The issue is that when Funding's funding.discount is zero the getAmountOut will return zero for any given assetAmountI...
Wrong design of swap() results in unexpected and unfavorable outputs
Handle WatchPug Vulnerability details The current formula to calculate the amountOut for a swap is: function calculateSwap uint256 amountIn, uint256 reserveIn, uint256 reserveOut public pure returns uint256 amountOut // x Y X uint256 numerator = amountIn reserveIn reserveOut; // x + X ^ 2 uint256...
PoolCommitter.sol#commit() Calculation of amountOut is wrong
Handle WatchPug Vulnerability details else if commitType == CommitType.LongBurn // long burning: pull in long pool tokens from committer // A theoretical amount based on current ratio. Used to get same units as minimumCommitSize uint256 amountOut = PoolSwapLibrary.getWithdrawAmountOnBurn...
commit burn yields wrong amountOut computation
Handle cmichel Vulnerability details The PoolCommitter.commit function first adds the amount to the shadow pool shadowPoolscommitType = shadowPoolscommitType + amount and then computes the amountOut with this updated value already: PoolSwapLibrary.getWithdrawAmountOnBurn IERC20tokens1.totalSupply...