feat: implement spatial H3 multi-peer liquidity netting and atomic swap engine - #394
feat: implement spatial H3 multi-peer liquidity netting and atomic swap engine#394Opulencechuks wants to merge 12 commits into
Conversation
|
@Opulencechuks is attempting to deploy a commit to the jotelfootball-tech's projects Team on Vercel. A member of the Team first needs to authorize it. |
… in SpatialNettingDashboard
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Opulencechuks your pr has been reviewed and I noticed that the node CI check failed,same as the the vercel front-end deployment and the velo API deployment, kindly fix that and I will review it again |
|
@Opulencechuks yu have made some progress but the node ci check failed and the velo deployment too, fix that and iI will review it again |
|
@Opulencechuks you have made some progress but stilll, the node ci check failed and the velo deployment too, fix that and it will review it again |
|
Hey @Opulencechuks , noticing |
|
please review and merge |
Closes #372
Summary
This PR implements an automated Spatial H3 Multi-Peer Liquidity Netting & Cross-Chain Atomic Swap Engine. Velo's current cash allocation processes requests as isolated point-to-point trades, which leads to capital inefficiency, high transaction fees, and excessive provider collateral lockups in dense geographic areas.
This change introduces an automated multi-hop circular clearing model. It leverages Uber H3 spatial indexing to group participants, Johnson's algorithm for directed graph cycle detection, and PostgreSQL deadlock-free ordered pessimistic locking (
SELECT FOR UPDATE NOWAIT). Furthermore, it updates theatomic-swapandsession-accountSoroban smart contracts to broadcastsecret_revealevents for automated preimage propagation and enforces session quota limits during relayer executions.Testing
The following commands were used to validate the core logic, stress test the pessimistic row locking, and run the Soroban invariant assertions:
Checklist