Smart Contract -> Backend:
Eventlog: Swap
Two fields: BALN Fee and LP Fee (charged in fromToken)
Maintain a rolling 24 hour sum of BALN Fee and LP Fee for both tokens in the pool
Backend -> Frontend:
Quote Token: Sum{BALN Fee, LP Fee} $$ value +
Base Token: Sum{BALN Fee, LP Fee} $$ value
Green Box:
Smart Contract -> Backend
Eventlog: Swap
Fields: fromValue
Maintain a rolling 24 hour sum of fromValue for both tokens in the pool
Red Box:
Smart Contract -> Backend: Eventlog: Swap Two fields: BALN Fee and LP Fee (charged in fromToken) Maintain a rolling 24 hour sum of BALN Fee and LP Fee for both tokens in the pool
Backend -> Frontend: Quote Token: Sum{BALN Fee, LP Fee} $$ value + Base Token: Sum{BALN Fee, LP Fee} $$ value
Green Box:
Smart Contract -> Backend Eventlog: Swap Fields: fromValue Maintain a rolling 24 hour sum of fromValue for both tokens in the pool
Backend -> Frontend Sum{fromValue base $$ value, fromValue quote $$ value}