background
logo

Security Audit Report for WenCore

项目简介

WEN Protocol is a decentralized, censorship-resistant, and community-owned protocol that enables users to secure loans using Liquidity Staking Derivatives (LSDs) as collateral. These loans have minimal fees and provide up to 7x leverage, with repayments made in wenUSD. The Wen Protocol codebase is derived from Liquity, retaining its features while also supporting multiple LSDs as collateral. In addition, the protocol also introduces a staking module where users can deposit esWen to receive rewards.

The core contracts covered in this audit include all the source code excluding testing code. The iterative audit covers the code in the initial version, as well as subsequent versions to fix discovered issues, as detailed in our audit report. Please note that external dependencies are assumed reliable and are therefore excluded from the audit scope.

Our audit methodology employs automated vulnerability scans, manual verification, and business logic analysis to uncover potential security issues coupled with gas and code quality optimization recommendations. In summary, we have found that the codebase contains several critical issues that require prompt attention. In addition, we have identified other non-critical issues as well as security suggestions that should be considered.The Wen Protocol team has addressed these issues promptly. It is important to note that our audit covers only the final reported versions of the codebase. Any subsequent updates would require a re-evaluation.

关键发现

我们在该智能合约中共发现 18 个潜在问题,另有 2 条建议与 1 条说明,明细如下:

高风险:7
中风险:10
低风险:1
建议:2
说明:1
ID Severity Description Category Status
1 High Incorrect Calculation of Staking Rewards in esWenstaking DeFi Security Fixed
2 Medium Front-Running of Reward Distribution in submit() DeFi Security Confirmed
3 Medium Improper Check of Input in setRewardEndTime() DeFi Security Fixed
4 Medium Precision Loss of Rewards in claim() DeFi Security Fixed
5 High Transferable esWen Token DeFi Security Fixed
6 High Incapable Collateral Token within Protocol DeFi Security Fixed
7 High Losses of Stakers in Stability Pool due to Flash Loan Liquidation DeFi Security Fixed
8 High Incorrect Update of System Variable lastCollateralError_Offset DeFi Security Fixed
9 Medium Timely Redistribution of Liquidated Collateral and Debt among Troves DeFi Security Confirmed
10 Medium Potential Centralization Issues DeFi Security Confirmed
11 Medium The Last Trove with Bad Debt can Influence the TCR DeFi Security Fixed
12 Medium Potential Revert in Batch Liquidation of Troves DeFi Security Fixed
13 Medium Incorrect Rounding Direction in shareBurnt() DeFi Security Confirmed
14 Medium Lack of Check in Function setMaxSystemDebt() DeFi Security Fixed
15 Low Conflicts of Updating rewardEndTime During Initialization of LPStakingPool DeFi Security Confirmed
16 High Inappropriate Parameter Settings in initLockSettings DeFi Security Fixed
17 Medium Lack of Check in Function setMCR() DeFi Security Fixed
18 High Incorrect Calculation of Debt Interest Recommendation Fixed
19 - Incorrect Function Name Recommendation Fixed
20 - Inconsistency between Implementation and Comments Recommendation Fixed
21 - Contract Supports Multiple Collateral Assets and Relies on Timely Updates from the Price Oracle Note Confirmed

更多细节见审计报告

迈出走向安全的第一步

立即联系我们,获取 BlockSec 的专业代码审计服务,在协议上线之前把安全性提上来!