CallDocumentation Index
Fetch the complete documentation index at: https://docs.flashnet.xyz/llms.txt
Use this file to discover all available pages before exploring further.
transferPosition on the FlashnetClient with a pool ID, the recipient’s public key, and shape-specific options. The sender must already hold an active lock on the position.
Signature
lpTokensToTransfer) and V3 (tickLower/tickUpper) options together is rejected before the message is signed.
Transfer a V2 position
lpTokensToTransfer is a decimal string of atomic LP units. The validator rejects:
- Non-digit characters (no sign, no decimal point, no scientific notation, no whitespace).
- Leading zeros (
"01","007"). - Zero or negative values.
lp_shares[sender] - lpTokensToTransfer. If the residual is zero, the server deletes the sender’s lock row in the same transaction. Otherwise the sender’s lock stays at its original expiry.
Transfer a V3 position
tickLower and tickUpper are required. The pair must match an existing position the caller owns. The transfer moves the whole (pool_id, sender, tickLower, tickUpper) row to the recipient and rewrites the matching lp_locks row.
Locking the recipient on V2
A V2 transfer carries the sender’s lock to the recipient only when the recipient has no priorlp_shares in the pool. To deliver locked shares to a recipient who already holds an unlocked position, the recipient must lock first:
existing + transferred) sits under the recipient’s existing lock terms. The sender’s lock metadata is not propagated.
Verify the result
The transfer commits two pieces of state. Read both to confirm:getLpPosition with the recipient’s key and the original tick range; the row should now exist under the recipient. The sender’s row at the same range no longer exists.
Error handling
- No active lock. The sender holds no
lp_locksrow for the source position, or the lock has expired. Set or extend a lock first. - Insufficient lp_shares (V2). The requested amount is greater than
lp_shares[sender]. Read the sender’s balance and adjust. - Position not found (V3). The
(tickLower, tickUpper)pair does not match a position the sender owns. - Self-transfer.
newOwnerPublicKeyequals the caller’s key. Rejected client-side before signing. - Mixed shape. Both
lpTokensToTransferand a tick pair were supplied. Pick one.
Concurrency
Two parallel transfers from the same sender on the same pool serialize through the per-pool batch executor. The first commit wins; the second sees the new state and is rejected withinsufficient lp_shares (V2) or position does not exist (V3). No race lets the sender double-spend the same balance.
Limitations
- V3 transfer moves the entire position at one tick range. Partial V3 transfer requires
decreaseLiquidityfollowed by an off-chain delivery. - The intent is signed once and cannot be revoked. A typo in
newOwnerPublicKeyis recoverable only if the recipient cooperates. - There is no on-chain record of a transfer. State lives in the Flashnet settlement database.