Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 17
Implement SwapPayment model #41
Copy link
Copy link
Closed
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26area:modelspriority:p2type:feature
Description
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26area:modelspriority:p2type:feature
Represents a swap-routed payment where the payer pays in one token and the merchant settles in another. Specific to Shade's cross-asset capabilities.
Proposed Steps:
src/shade/models/swap.py.id,pay_in_token,settle_out_token,amount_in: Decimal,amount_out: Optional[Decimal],routing_path: list[str],slippage_tolerance: float,status,stellar_tx_hash: Optional[str],created_at.SwapStatusenum:pending,swapping,completed,failed,slippage_exceeded.0 < slippage_tolerance < 1.Acceptance Criteria:
SwapPayment.from_dict(...)populates all fields including routing path list.slippage_toleranceoutside(0, 1)raisesValueError.statusis aSwapStatusenum.