Rayaa
banner
0xrayaa.bsky.social
Rayaa
@0xrayaa.bsky.social
Playing with Rust 🦀 and Solidity 🪨 !
Smart Contract Auditor.
Bug Bounty Hunter.
I do agree with you!
Human r most vulnerable :)
November 28, 2024 at 6:44 PM
An simple que in auditors mind will be :
What if both have different lengths ?

But In Rust, the zip method only iterates until one of the iterators is exhausted.

here comes the problem! :
Here, the third element in payouts (30) is ignored because multipliers has fewer elements.
November 28, 2024 at 10:56 AM
'Zips up' two iterators into a single iterator of pairs.

zip() returns a new iterator that will iterate over two other iterators, returning a tuple where the first element comes from the first iterator, and the second element comes from the second iterator.
November 28, 2024 at 10:56 AM