atoma-network / atoma-contracts

Smart contracts repository for the Atoma Network
2 stars 0 forks source link

Review: Potential issue with `settle_dispute` logic #61

Closed jorgeantonio21 closed 5 months ago

jorgeantonio21 commented 5 months ago

In https://github.com/atoma-network/atoma-contracts/blob/main/sui/packages/atoma/sources/settlement.move#L514

we are dividing the node index by 32, I understand we are progressing in 32-byte chunk, but in line 505 above, we set the i = 1, in which case, it should potentially be 32, otherwise we are checking the first node submission once again, and we have potentially already checked that the first node was malicious..

porkbrain commented 5 months ago

Agreed, fixing in #51