EYBlockchain / nightfall_3

a mono-repo containing an optimistic version of nightfall
Creative Commons Zero v1.0 Universal
260 stars 57 forks source link

Westlad/fee fix #1443

Closed Westlad closed 1 year ago

Westlad commented 1 year ago

This PR implements a number of security fixes. We gratefully acknowledge the work of Chain Security in spotting these.

1) Summing input funds and output funds (to show conservation of money) was done across fees and non-fee amounts. This is problematic when they are a different currency. They are now separately summed. 2) Fees in the transform circuit were not correclty constrained. 3) The tokenId was held in a field during some intermediate computations, which can cause an overflow.