XChain Platform Action - DEPOSIT
This action transfers tokens from the broadcasting address into a contract’s custody via its derived address.
PARAMS
| Name | Type | Description |
|---|---|---|
VERSION |
String | Format Version |
CONTRACT_ACTION_INDEX |
Integer | Action index of the deployed contract |
TICK |
String | Ticker name or Ticker ID |
QUANTITY |
String | Amount of TICK to deposit |
Formats
Version 0
VERSION|CONTRACT_ACTION_INDEX|TICK|QUANTITY
Examples
DEPOSIT|0|12345|MYTOKEN|1000
Deposit 1000 MYTOKEN into contract 12345 (credits C:BTC:12345 on Bitcoin; the prefix varies by chain: C:BTC:, C:LTC:, C:DOGE:)
DEPOSIT|0|12345|^99|500
Deposit 500 of the token with TICK_ID 99 into contract 12345
Rules
- Available on all chains
- The contract identified by
CONTRACT_ACTION_INDEXmust exist and be in an active state SOURCEaddress must hold a sufficient balance ofTICKto coverQUANTITY- From the
CONTROLLER_CUSTODY_GUARDflag day, a deposit runs the token’stransferorallcontroller guard and then the depositor’s own address controller guard. The guarded move is from the depositor (SOURCE) to the contract custody addressC:<CHAIN>:<index>, where<index>isCONTRACT_ACTION_INDEX. See the controller guard model. - The metered guard gas for both runs is paid by
SOURCEinGASand burned. On BTC the action fails withinsufficient funds (guard gas)whenSOURCEcannot cover the reservation; on other chains no reservation is taken, that verdict never occurs, and the charge is capped atSOURCE’s balance (see Controller-Bound Tokens: Gas). - An unbound token moved by an unbound address runs neither guard and pays no guard gas.
QUANTITYmust be a positive value with valid decimal format for the token
Notes
- Deposited tokens are credited to the contract’s derived address (
C:<CHAIN>:<CONTRACT_ACTION_INDEX>) in the standard ledger; a debit is created for SOURCE and a credit for the derived address - The contract’s balance is tracked in the standard
balancestable, the same as any other address. There is no separate custody table. - Use
WITHDRAWto return tokens from the contract back to the contract owner. Only the contract deployer (the address that originally broadcast theDEPLOY) may callWITHDRAW; no other address can withdraw from the contract. From theOWNER_WITHDRAW_OPT_INflag day, a deployer’s call still needs the contract’s meta to declareownerWithdraw: true(or a DEPLOY from before the activation); see WITHDRAW before depositing into a contract that does not opt in. - Use
^(caret) as a prefix when passingTICK_IDfor theTICKfield (e.g.^1234=TICK_ID1234) - Contracts may use deposited balances in method logic triggered via
EXECUTE, emitted actions spend from the derived address
Copyright © 2025–2026 Dankest, LLC
Based on XChain Platform by Dankest, LLC – https://dankest.llc
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-or-later) with a commercial license available for proprietary use.
You may use, modify, and distribute this material under the terms of the License. See LICENSE and NOTICE for full terms. See the licensing overview.