BESCHREIBUNG
The target of this audit is the private code repository of bgw-new-staking-evm of bitget. This project implements a secure staking protocol that allows users to stake BWB tokens in customizable pools. The contract Staking enables pool creation with flexible parameters, stake/unstake operations with signature verification, and proportional reward distribution. It incorporates security features like reentrancy guards and pause functionality while maintaining transparent reward calculations. The system provides a reliable DeFi infrastructure for decentralized staking services through careful state management and validation checks.
Please refer to the report for the detailed 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 1 high-risk issue that require prompt attention. In addition, we have identified other non-critical issues as well as recommendations and notes that should be considered. The bgw-new-staking-evm 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.
WICHTIGSTE FESTSTELLUNGEN
Insgesamt haben wir 3 potenzielle Probleme im Smart Contract festgestellt. Darüber hinaus geben wir 6 Empfehlungen und 2 Hinweise. Diese sind nachfolgend aufgeführt:
| ID | Severity | Description | Status |
|---|---|---|---|
| 1 | High | Rewards remain claimable for unstaked orders | Fixed |
| 2 | Low | Incorrect update logic of variable stakeVisible |
Fixed |
| 3 | Low | Lack of updating rewardAmount in function unStakeAndClaim() |
Confirm |
| 4 | - | Remove redundant code | Fixed |
| 5 | - | Add additional check for _orderId |
Fixed |
| 6 | - | Add additional check for _pool.poolId |
Fixed |
| 7 | - | Gas optimization inside low-level call | Fixed |
| 8 | - | Revise code typos | Fixed |
| 9 | - | Revise the timestamp comparison in the function _calcCurrentRewards() |
Fixed |
| 10 | - | Potential centralization risks | - |
| 11 | - | Ensure sufficient BWB token balance for fair reward distribution |
- |
Weitere Einzelheiten finden Sie im Auditbericht.