primitivefinance / DFMM

Smart contracts of the DFMM protocol
https://www.primitive.xyz/blog/dfmm_protocol
18 stars 6 forks source link

Fix/dynamic library rounding #106

Closed clemlak closed 3 months ago

clemlak commented 4 months ago

Cf https://github.com/cantinasec/review-primitive-excalibur/pull/7#discussion_r1536607090.

clemlak commented 4 months ago

Some tests are not passing anymore because of the implemented fix adding the remainder to the initial amount. Let's see how we can work this out.

This problem could lead to issues in NTokenG3M for example: if we update the weights the sum might be > 1e18 and transactions on that block will revert or the pool might be vulnerable.