Off-ledger bot for DEX arbitrage and liquidations on Canton: feasibility questions
- DonLuccaOP
Title: Off-ledger bot for DEX arbitrage and liquidations on Canton: feasibility questions
Hi! I’m a developer with an automated arbitrage/liquidation bot on EVM chains and I’m new on Canton. I’m starting on LocalNet. A few questions:
- Atomic composability: can a third party’s Daml code, in a single transaction, borrow funds, swap on a Canton DEX and repay? Do DEX apps expose interfaces for external atomic swaps, or only their own workflows?
- Do token registries (CC, USDCx, CBTC) support single-step transfers when both sender and receiver sign (token standard V2)? And do payments to a third party inside the same transaction settle, or stay pending?
- Visibility: with privacy by design, how can an external liquidator discover positions close to liquidation? Only if the lending app makes the party an observer, or do apps publish liquidation opportunities?
- What does a transaction cost in traffic, and who pays it: the app user or the validator?
- What is the recommended path for an individual developer to go from LocalNet to DevNet (VPN, SV sponsor)? Are there Super Validators that sponsor independent developers?
Thanks in advance!
- michaelwhite
Atomicity in Daml is transaction-level: if a DEX exposes choices/interfaces and the token contracts authorize each step, a third-party bot can compose borrow→swap→repay in one transaction. If an app only exposes its own workflow, that is an integration question for that app. Token Standard V2 supports transfer offers/acceptance, but “both sign in one step” depends on the concrete implementation. Visibility is the hard constraint: without observer/disclosure or a published opportunity feed, an external liquidator cannot discover positions. Traffic is paid by the validator/app operator under their arrangement, not automatically by the user. For LocalNet→DevNet, ask SV sponsors; sponsorship exists but is discretionary.
- DonLucca
Thanks, this is very helpful! Two follow-up questions to narrow it down:
- Which Canton DEXs/AMMs currently expose public choices or Token Standard interfaces that third-party Daml code can exercise in the same transaction (for example via allocations or transfer instructions)? Any docs or example repos showing a third-party swap?
- Are there lending apps that publish liquidation opportunities, or that allow independent liquidators as observers (open liquidations)? Or is liquidation always limited to the lender or whitelisted parties?
Also, is there a reference example in Splice or the quickstart of a single-transaction pattern (borrow, use funds, repay) written in Daml that I can study on LocalNet?
Thanks again!