In case we get negative balances, which happens sometimes e.g. in balancer and seems to be due to some rounding issues within the protocol, we simply clip the balance at 0 so we never emit negative balances as tycho-indexer the upstream system will interpret the balance bytes as unsigned integers.
Tycho Substreams SDK
Some shared functionality that is used to create tycho substream packages.
Protobuf Models
Protobuf models are manually synced from the tycho-indexer repository whenever they
changed.
To generate the rust structs run the following command from within the ./proto
directory:
buf generate \
--path tycho \
--template ../substreams/crates/tycho-substreams/buf.gen.yaml \
--output ../substreams/crates/tycho-substreams/