Skip to main content
TL;DR: Wallet positions are now verified via RPC after swaps to ensure clients always see accurate balances, and fee calculations use BigInt for full precision.

RPC Balance Verification After Swaps

After a swap is processed, balances are now re-verified directly from the chain via RPC:
  • Clients receive an accurate position update even when on-chain state differs from computed state
  • Catches edge cases where computed deltas diverge from actual token balances

Fee Precision with BigInt

Total fees paid in native tokens are now computed using non-exponential integer strings:
  • Eliminates floating-point precision errors in large-value fee calculations
  • totalFeesPaidNativeRaw now uses lossless BigInt serialization

Net Loss Seller Handling

Improved transaction recipient logic to handle β€œnet loss seller” patterns:
  • Correctly attributes wallet positions even when the seller nets a loss across legs
  • New test coverage for BSC swap recipient edge cases

Shipped by Delox