Audit · firm’s term: audit report
QuillAudits reviewed W Chain (W Chain Bridge) on 13 Dec 2024: 7 findings, 0 critical; 6 marked fixed, 1 open.
Report hosted on quillaudits.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 2 |
| Medium | 0 | 0 | 0 |
| Low | 1 | 0 | 4 |
The claim function checks that the length of the _v array is greater than two-thirds the signers present. With 4 signers it is expected that _v is ( * 4) which yields 2.667 but Solidity rounds down from 2.667 to 2 thereby reducing the effectiveness of the check for signers by 1 signer.
When claiming, the valid_count variable is incremented if the signer is true in the is_signer mapping. Users can exploit this by providing an array of v, r, and s that is populated with a single signer address vrs. Due to the absence of a check to validate that a signer signature has been checked before, the user can repeatedly use one signer address, populate the array to meet the signers ratio, and then claim their funds without appropriate checks. IfW Chain Bridge - Audit Report ww.quillaudits.com 08 w this happens, valid_count can be incremented any number of times till it exceeds the two- thirds of _signers security limit allowing the msg.sender to receive the amount.
There are a couple of getter functions present in the contract which implies that the bridge relies on constantly querying data from the contract. However, blockchain bridges over time, relies on event emission and has a fast way to query data; it is cheaper and quicker to fetch on the client side. Emitting events for critical state changes is an appropriate way to track important transactions performed from the contract.
Access control is a critical part of smart contract security. Within this contract, access control is handled by the Ownable library which allows the owner to relinquish their rights to a new owner in one function call, transferOwnership(). This is risky if the new owner address passed in is malicious or is a victim of an address poisoning attack where some bytes of the address are changed when copied to the clipboard.
For adding and removing signers in WadzBridge, a for loop is used to add or remove addresses from the array - realistically, the array wouldn’t get large enough to be prohibitively expensive. In the current implementation, an array (_signers) and a mapping (is_signer) are used to determine the validity of addresses but the EnumerableSet provides a more efficient route to manipulate addresses in the same format.
There currently is no check in the bridge and claim function that the chainId passed is not the parent chain. With the contract storing the claim data attached to the various chains, a user could pass in the same chainId for the _from_chain and _to_chain causing accounting errors.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (1)
350 projects reviewed · 459 reports · latest Apr 2025
See QuillAudits’s auditsSomething 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