ApsisInventory is the vault: it holds all float, receives plain deposits, and is the only contract that pays value out. ApsisRouter carries every entry point that swaps or takes a signature — aggregator deposits, permit and permit2 variants, gasless witness deposits, same-chain swaps, partner funding — and forwards the resulting funds into the inventory. The router is UUPS-upgradeable by the owner; the inventory is not upgradeable.
Solana is covered separately in SVM program. Prefer the
router_address from the quote over these constants. A plain cross-chain deposit binds to the inventory, a swap deposit is sent to the router returned by GetSwapInstructions, and a same-chain swap binds to the router.
Inventory deposit entry points
Deposit and leave the funds in the vault.
Router deposit entry points
depositWithSwapAndPermit and depositWithSwapAndPermit2 take the same arguments plus the respective signature parameters. Permit variants attempt the permit and ignore its failure, so an already-consumed permit does not revert the deposit. Token pulls credit what was actually received, so fee-on-transfer amounts are accounted at the vault, not assumed.
Two witness variants back gasless orders: depositTokenWithPermit2Witness and depositWithSwapAndPermit2Witness take an owner plus a permit2 SignatureTransfer witness signature binding the quote hash (and, for swaps, the bridge token and floor), so an operator wallet can submit the deposit on the signer’s behalf. They are called by the operator’s relayer, not by integrators.
Same-chain swap
minAmountOut and capped at amountOut; the referrer share and any surplus are forwarded to the vault. swapAndForwardWithPermit and swapAndForwardWithPermit2 add the signature parameters. See Same-chain swaps.
Partner funding
BuildPartnerFunding, emitting PartnerFunding. The indexer credits the partner’s balance from the event. See PartnerApi funding.
Voucher redemption
referrer from the vault. See Referral program.
Operator functions
Restricted to the owner or registered executors, listed for completeness.Events
The indexer matches
Deposit and SameChainSwap against stored quotes by quoteHash.