semiotic-ai / timeline-aggregation-protocol

A fast, efficient and trust-minimized unidirectional micro-payments system.
Apache License 2.0
14 stars 3 forks source link

Overflow of value aggregate could potentially cause loss of funds to the indexer #14

Closed ColePBryan closed 1 year ago

ColePBryan commented 1 year ago
          Overflow danger here. However it is up to the indexer to make sure that it won't happen I suppose.

This comment should probably be spun off into an issue, as it is a non-trivial fix?

_Originally posted by @aasseman in https://github.com/semiotic-ai/timeline_aggregation_protocol/pull/3#discussion_r1119368214_

ColePBryan commented 1 year ago

One remaining issue is the overflow check is done by the gateway, while the indexer would be the one harmed. This really should never be an issue since an overflow would only legitimately happen if the indexer was owed more GRT than exists. I'll spin this out to an issue and we can discuss if it needs any further resolutions later.