package calculation_validation import ( "math/big" "time" ) // OpportunityTestData represents extracted opportunity data from logs type OpportunityTestData struct { ID string Timestamp time.Time TransactionHash string NetProfitETH *big.Float NetProfitUSD *big.Float EstimatedProfit *big.Float ProfitMargin float64 IsExecutable bool RejectReason string Confidence float64 Path []string SwapSequence []SwapCalculation ThresholdCheck *ThresholdCheck } // SwapCalculation represents a V3 swap calculation from logs type SwapCalculation struct { AmountIn *big.Int AmountOut *big.Int Fee uint32 FinalOut *big.Int } // ThresholdCheck represents a profit threshold validation type ThresholdCheck struct { NetProfit *big.Float MinThreshold *big.Float Passed bool } // ValidationResult represents the result of validating a calculation type ValidationResult struct { OpportunityID string ExpectedProfit *big.Float CalculatedProfit *big.Float Difference *big.Float PercentError float64 IsValid bool Errors []string Warnings []string } // TestReport represents a summary of validation tests type TestReport struct { Timestamp time.Time TotalOpportunities int ValidCalculations int InvalidCalculations int AveragePercentError float64 MaxError *big.Float ValidationResults []*ValidationResult }