Incident,
28 PancakeSwap LP tokens.
Source: De.Fi incident database.
- Audits before it
- 0.
- Audits since
- 2, the latest dated 13 Jun 2023.
As of 3 Nov 2026, xWIN Finance has 2 audit reports by 1 security firm on Trustblock; the latest is by CertiK, dated 13 Jun 2023. Those reports list no open critical findings. It also holds 1 incident (latest 24 Jun 2021).
Record last updated . It holds audits, findings and contracts up to Nov 2026, and incidents up to Oct 2026. Trustblock does not review code.
Newest first
| Audit | Security firm | Date | Scope | Critical findings | Report |
|---|---|---|---|---|---|
| xWin Finance (Audit 2) | Security firm: CertiK | Date: | Scope: Files named in the report | 2 critical findings, fixed | Open · skynet.certik.com |
| Xwin Finance | Security firm: CertiK | Date: | Scope: Files named in the report | No open critical findings | Open · skynet.certik.com |
Statuses are the security firm’s own, from each report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 2 |
| High | 6 | 1 | 7 |
| Medium | 2 | 0 | 12 |
| Low | 11 | 0 | 50 |
In the contract `ToppyMysteriousNFT` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority. 
Open the reportIn the contract `ToppyMarketPlace` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority.  In the contract `ToppyMarketPlace` the role `adminExecutor` has authority over the functions shown in the diagram below. Any compromise to the `adminExecutor` account may allow the hacker to take advantage of this authority. 
Open the reportIn the contract `ToppyMaster` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority. 
Open the reportIn the contract `ToppyStaking` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority. 
Open the reportIn the contract `ToppyStandardNFT` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority. 
Open the reportIn the contract `ToppySupportPayment` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority. 
Open the reportThe order of external call and storage manipulation must follow the check-effect-interaction pattern.
Open the reportOnly one token is minted in the contstructor, no new tokens minted in the contract. The function `farmTokenByAdmin` can only deposit one token to `_xwinDefi`. `totalSupply` is used in `farmTokenByAdmin` and `unFarmTokenByAdmin` functions is always `1*10**18`.
Open the reportThe `systemReTrade()` function can be executed when there is a remaining buy or close-buy, but the `systemReTrade()` function does not take into account price fluctuations before reTrade. This can lead to a situation where the function is executed without considering the current market conditions, potentially resulting in unfavorable trades. ```solidity function systemReTrade() external onlyExecutor nonReentrant { TradeQueue memory tr = tradeQueue; require(tr.nextTrade && tr.nextTradeBlock <= block.number, "not allow to retrade yet"); if(tr.nextTrade){ _systemTrade(tr.tradeType); } } ```
Open the reportPerforming integer division before multiplication truncates the low bits, losing the precision of calculation. ```solidity=125 uPerBlock = uPerBlock / (blocksPerDay * 365); ``` ```solidity=133 pendingMFee = pendingMFee + (totalblock * uPerBlock); ``` --- ```solidity=128 uint256 uPerBlockPlatform = supply / (10000 - platformFee) * 10000; ``` --- ```solidity=130 uPerBlockPlatform = uPerBlockPlatform / (blocksPerDay * 365); ``` ```solidity=134 pendingPFee = pendingPFee + (totalblock * uPerBlockPlatform); ``` --- ```solidity=225 uint256 redeemratio = amount * 1e18 / getFundTotalSupply(); ``` ```solidity=229 uint256 entitled = redeemratio * totalBase / 1e18; ``` --- ```solidity=262 uint256 redeemratio = redeemUnit * 1e18 / getFundTotalSupply(); ``` ```solidity=265 uint256 totalOutput = redeemratio * getBalance(baseCcy) / 1e18; ``` --- ```solidity=675 uint256 ratioNoReg = notRecognizedShare * 10000 / _shares; ``` ```solidity=680 uint256 partialProfit = ratioNoReg * (profitPerUnit / _unitprice) * swapOutput / 10000; ``` --- ```solidity=687 uint256 anotherProfit = ratioReg * profitPerUnit / _unitprice * swapOutput / 10000; ``` --- ```solidity=266 uint redeemratio = _shares * 1e18 / totalSupply(); ``` ```solidity=272 withdrawStable = redeemratio * stableBal / 1e18; ``` --- ```solidity=93 uint amountPerblock = stablecoinBal / swapDuration; ``` ```solidity=94 uint toSwapQty = amountPerblock * blockDiff; ``` --- ```solidity=186 uint redeemratio = _shares * 1e18 / totalSupply(); ``` ```solidity=187 uint totalRefund = stableBalB4 * redeemratio / 1e18; ``` --- ```solidity=202 uint redeemratio = _shares * 1e18 / totalSupply(); ``` ```solidity=203 uint totalRefund = stableBalB4 * redeemratio / 1e18; ``` --- ```solidity=314 uint redeemratio = (_shares * 1e18) / totalSupply(); ``` ```solidity=320 withdrawStable = (redeemratio * stableBal) / 1e18; ``` --- ```solidity=358 uint256 estimatedDailyReward = emmission * blocksPerDay * user.shares / totalShares; ``` ```solidity=359 estimatedDailyRate = estimatedDailyReward * 1e18 / user.amount; ``` --- ```solidity=369 uint256 estimatedReward = emmission * 365 * blocksPerDay * user.lockedShares / totalLockedShares; ``` ```solidity=370 apr = estimatedReward * 10000 / user.amount; ``` --- ```solidity=381 newShares = _amount * totalShares / totalXWINBalance(); ``` ```solidity=385 uint256 estimatedDailyReward = emmissionCompound * blocksPerDay * newShares / (totalShares + newShares); ``` --- ```solidity=392 uint256 estimatedReward = emmissionBonus * 365 * blocksPerDay * newLockedShares / (totalLockedShares + newLockedShares); ``` ```solidity=394 estimatedBonusApr = estimatedReward * 10000 / _amount; ``` --- ```solidity=178 uint256 cakeReward = multiplier * xwinPerBlock * pool.allocPoint / totalAllocPoint; ``` ```solidity=179 accCakePerShare = accCakePerShare + (cakeReward * 1e18 / lpSupply); ``` --- ```solidity=225 uint256 cakeReward = multiplier * xwinPerBlock * pool.allocPoint / totalAllocPoint; ``` ```solidity=229 pool.accCakePerShare = pool.accCakePerShare + (cakeReward * 1e18 / lpSupply); ``` --- ```solidity=394 uint xwinReward = xwinPerBlock * pool.allocPoint / totalAllocPoint; ``` ```solidity=395 uint accCakePerShare = xwinReward * 1e18 / lpBal; ``` --- ```solidity=403 uint256 userRatio = user.amount * 1e18 / pool.totalDeposit; ``` ```solidity=404 uint256 rewardPerBlockUser = xwinPerBlock * pool.allocPoint * userRatio / totalAllocPoint; ``` --- ```solidity=107 uint256 redeemratio = _amount * 1e18 / totalSupply(); ``` ```solidity=110 uint totalRefund = redeemratio * targetBalB4 / 1e18; ``` --- ```solidity=149 uint balanceStakingTokenInUSD = balanceStakingToken == 0 ? 0 : (balanceStakingToken * exchangeRateStaking / 1e18) * exRateTargetBase / getDecimals(address(targetToken)); ``` --- ```solidity=168 uint accruedCompInUSD = exRateLendingBase * accruedComp / getDecimals(address(stablecoinUSDAddr)); ``` ```solidity=169 uint percentage = accruedCompInUSD * 10000 / fundValueInUSD; ``` --- ```solidity=107 uint256 redeemratio = _amount * 1e18 / totalSupply(); ``` ```solidity=110 uint totalRefund = redeemratio * targetBalB4 / 1e18; ``` --- ```solidity=149 uint balanceStakingTokenInUSD = balanceStakingToken == 0 ? 0 : (balanceStakingToken * exchangeRateStaking / 1e18) * exRateTargetBase / getDecimals(address(targetToken)); ``` --- ```solidity=168 uint accruedCompInUSD = exRateLendingBase * accruedComp / getDecimals(address(stablecoinUSDAddr)); ``` ```solidity=169 uint percentage = accruedCompInUSD * 10000 / fund
Open the reportIn the `xWinSwapV3` contract, the `internalSwap` currently uses `priceMaster.getPrice()` to fetch the price for token swaps on Uniswap V3. However, it's not clear which price oracle is being used behind this operation since the codebase currently doesn't seem to include a contract or logic implementing a Time-Weighted Average Price (TWAP) oracle for the Uniswap v3 pool.
Open the reportThe `safeTokenTransfer()` function transfers the reward token to users. Users may receive fewer reward tokens than they are entitled to according to the code `_amount = bal < _amount ? bal : _amount`. However, there is no way to enable users to claim their missing tokens at a later time. ```solidity=216 function safeTokenTransfer(IERC20Upgradeable rewardToken, address _to, uint256 _amount) internal { uint bal = rewardToken.balanceOf(address(this)); _amount = bal < _amount ? bal : _amount; uint devFeeTotal = _amount * devFee / 10000; rewardToken.safeTransfer(devAddress, devFeeTotal); rewardToken.safeTransfer(_to, _amount - devFeeTotal); } ```
Open the reportThe function `performUpkeep()` performs a trade if `getTriggerStopLoss() == true`, where `getTriggerStopLoss()` checks the current price of `targetToken` and compares it with `stopLossPrice`. ```solidity function performUpkeep(bytes calldata /*performData*/) external override { require(getTriggerStopLoss(), "no stop loss condition found"); ... _systemTrade(1); } ``` ```solidity function getTriggerStopLoss() public view returns (bool) { if ((targetToken.balanceOf(address(this)) > 0) && ReadyToTrade()){ uint rate = xWinPriceMaster.getPrice(address(targetToken), address(stablecoin)); return rate <= stopLossPrice; } return false; } ``` As the oracle used in `xWinPriceMaster.getPrice()` may be susceptible to price manipulations, any user can force a system trade.
Open the reportThe `calculateFavor()` function may contain a rounding error, particularly during the calculation of `tmp`. This is because the values of amount and `diff` could potentially be smaller than `1e18`, which may lead to truncation of the decimal places during integer division, resulting in a loss of precision. ```solidity=341 function calculateFavor(uint256 amount, uint256 startTimestamp, uint256 endTimeStamp) private pure returns (uint256 favor) { uint256 diff = 1 + (endTimeStamp - startTimestamp) / 86400; if (diff > 365) { diff = 365; } uint256 tmp = amount * diff * diff / 1e18; tmp = (Babylonian.sqrt(tmp) * 1e18) * 5000 / 81600; favor = tmp / 1e18; if (favor > 5000) { favor = 5000; } } ```
Open the reportIn the `_convertFrom18()` and `_convertTo18()` functions, if the token used in these two functions has more than 18 decimals, the functions will unintentionally revert. ```solidity function _convertFrom18(uint value, address token) internal view returns (uint){ if(value == 0) return 0; uint diffDecimal = 18 - ERC20Upgradeable(token).decimals(); return diffDecimal > 0 ? (value / (10**diffDecimal)) : value; } ``` ```solidity function _convertTo18(uint value, address token) internal view returns (uint){ uint diffDecimal = 18 - ERC20Upgradeable(token).decimals(); return diffDecimal > 0 ? (value * (10**diffDecimal)) : value; } ```
Open the reportThe `xWinPriceMaster` contract will utilize the Chainlink Price Oracle for specific tokens. The audit team recommends clients carefully validate the `price` and `updatedAt` results. The best practice for Chainlink Price Oracle can be to configure the application to detect and respond to extreme price volatility or prices outside your acceptable limits. For example, the data feed aggregator includes both `minAnswer` and `maxAnswer` values. These variables prevent the aggregator from updating the `latestAnswer` outside the agreed range of acceptable values. If the actual is lower than `minAnswer` or higher than `maxAnswer`, the chainlink oracle will not be accurate anymore.
Open the reportThe owner can call `setDurationExtension` to update `durationExtension`, the input parameter `_durationExtension` can be any value including zero. If `durationExtension` is zero, it may affect the process of `English Auction`. The fix commit added the upper limit, lower limit is also needed. ```=js require(_durationExtension <= 86400, "max duration extension 24hours"); ```
Open the reportSolidity v0.8.0 and later versions check underflow/overflow by default, and therefore the library `SafeMath` is not necessary. Source: [link](https://docs.soliditylang.org/en/v0.8.7/080-breaking-changes.html)
Open the reportWhy admin executor can cancel user's `listing_`?
Open the reportAttached through a shared contract address. Our incident data ends in Oct 2026.
28 PancakeSwap LP tokens.
Source: De.Fi incident database.
The reports name a repository or files. Open a report to see its scope.
Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.
Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.
<head><script src="https://widget.trustblock.run/project-widget.min.js" defer></script></head><body><divdata-tb-project-widgetdata-tb-project-slug="xwin-finance"></div></body>
Paste the code where the label should appear. It uses no API credit and updates by itself.
Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us