14 lines
451 B
Python
14 lines
451 B
Python
from typing import Dict, List
|
|
from .primitives import LocalArbProblem
|
|
|
|
|
|
def map_to_ir(lp: LocalArbProblem) -> Dict:
|
|
# Simple IR mapping that preserves essential fields in a canonical form
|
|
return {
|
|
"type": "LocalArbProblem",
|
|
"asset_pair": [lp.asset_pair[0], lp.asset_pair[1]],
|
|
"target_mispricing": lp.target_mispricing,
|
|
"liquidity_budget": lp.liquidity_budget,
|
|
"latency_budget": lp.latency_budget,
|
|
}
|