Summary
Allow a position holder to transfer their open position to another Stellar address. Useful for portfolio restructuring, OTC desk transfers, and DeFi composability.
Proposed Design
Add transfer_position(position_key: Bytes, new_owner: Address) to exchange_router.
- Requires auth from the current position owner
- Rewrites the position's
owner field in data_store
- New owner can then manage (increase, decrease, close) the position
- Emits
PositionTransferred { key, from, to }
Security Considerations
- New owner cannot refuse the transfer (push model) — document this UX risk
- Consider a pull model: new owner must accept within N ledgers
- Referral code attribution follows the position (not the new owner's code)
Acceptance Criteria
Affected Contracts
exchange_router, order_handler, data_store
Summary
Allow a position holder to transfer their open position to another Stellar address. Useful for portfolio restructuring, OTC desk transfers, and DeFi composability.
Proposed Design
Add
transfer_position(position_key: Bytes, new_owner: Address)toexchange_router.ownerfield indata_storePositionTransferred { key, from, to }Security Considerations
Acceptance Criteria
Affected Contracts
exchange_router,order_handler,data_store