General
Documetation - https://docs.envelop.is/tech/smart-contracts/protocol/v1/wrapperv1
Known Issues/Identified Issues:
- There are no more than 25 slots in wNFT
- There is a whitelist of assets that are managed only by the admin.
- Recommendations from the audit - https://github.com/dao-envelop/envelop-protocol-v1/blob/master/audit/20230420_iber_envelop_audit_rev2.pdf
At Envelop, we classify bugs on a widely used scale. For version 1 of the protocol, we identify the following directions of attack:
Critical
- Blocking to user unwrapping of wNFT and getting collateral
- User`s funds losing during wrapping or adding collateral
- Withdrawing tokens of collateral without unwrapping of own or someone else's wNFT
- Withdrawing original NFT without unwrapping of own or someone else's wNFT
- Getting collateral tokens during unwrapping of wNFT more than was added in it
- Increasing amount of collateral tokens in accounting registers of smart contracts
- Decreasing amount of collateral tokens in accounting registers of smart contracts
- Changing owner of smart contracts
- Withdrawing native tokens from smart contracts addresses of protocol
- Withdrawing ERC20 tokens from smart contracts addresses of protocol
- Withdrawing ERC721 or ERC1155 tokens from smart contracts addresses of protocol
High
- Unauthorized Adding address of smart contract in whiteList
- Unauthorized Adding address of smart contract in blackList
Medium
- Unbounded gas consumption
- Increasing of gas consumption with every next operation
- Blocking possibility to wrap NFT
- Blocking possibility to add collateral to wNFT
Low
- Creation of conditions to get-methods return wrong data
IN-SCOPE: SMART CONTRACT VULNERABILITIES
- We are looking for evidence and reasons for incorrect behavior of the smart contract, which could cause unintended functionality:
- Stealing or loss of funds
- Unauthorized transaction
- Transaction manipulation
- Attacks on logic (behavior of the code is different from the business description)
- Reentrancy
- Reordering
- Over and underflows
OUT OF SCOPE: SMART CONTRACT VULNERABILITIES
- Theoretical vulnerabilities without any proof or demonstration
- Old compiler version
- The compiler version is not locked
- Vulnerabilities in imported contracts
- Code style guide violations
- Redundant code
- Gas optimizations
- Best practice issues