You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CurrencyReserves sync() can be overwritten — settlement manipulation vector #1069
hey, noticed that sync() can be called multiple times within a single transaction with no access control. Each call overwrites the previous currency and reserves:
In _settle(), the paid amount is computed as reservesNow - reservesBefore. If sync() is called again between take() and settle(), the reserves snapshot is overwritten, potentially manipulating the settlement amount.
While NonzeroDeltaCount provides a safety net, the unrestricted sync() combined with transient storage creates a complex attack surface.
Is this a known design trade-off? Or should sync() be restricted?
Activity
linear-code commentedon Aug 20, 2026
PROTO-1513
angguntrie3-lgtm commentedon Aug 21, 2026
thanks for tracking this internally. Let me know if you need any additional details or PoC.