NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Data Type Mismatch in newOwners[] Array for Starknet Compatibility.

Summary

A vulnerability was identified in the handling of the newOwners[] array within the Request structure.
The array is defined as uint256[], but it should be of type felt252[] to accurately represent Starknet addresses,
which are uint252. This discrepancy can lead to potential issues in the handling of addresses on Starknet,

Vulnerability Details

The newOwners[] array is currently defined as an uint256[], which is incompatible with Starknet's address format.
Starknet addresses are represented as felt252, which corresponds to uint252. The use of uint256 instead of felt252
may lead to data type mismatches, resulting in potential errors during execution, especially when interfacing with
Starknet contracts.

struct Request {
//...
uint256[] newOwners; // This should be felt252[]
}
struct Request {
//...
new_owners: Span<ContractAddress>,
}

Impact

This vulnerability can lead to incorrect processing of address data on Starknet, potentially causing failures in cross-chain operations.
This may result in losses of assets when transferred to starknet.

Recommendations

Update the newOwners[] array in the Request structure to be of type felt252[] to ensure compatibility with Starknet addresses.

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.