Cell Structure
The cell structure of swapping sUDT/sUDT is almost same with swapping sUDT/CKB with minor changes.
Swap Request Cell#
Swap request cell is used for selling or buying assets.
Field description :
Same with sUDT/CKB swap request cell
Liquidity Request Cell#
Liquidity request cell is used for add liquidity to liquidity pool or remove liquidity from liquidity pool by liquidity provider.
Field description : (total size: 235 bytes)
Same with sUDT/CKB liquidity request cell
Info Cell#
Info cell represents the current state of liquidity pool.
Field description :(total size: 250 bytes)
lock scripthash(ckb | asset_sudt_type_hash)(size: 32 bytes): The order of sUDT in here follows dictionary order
Pool Cell#
Pool cell is used for fund custody.
Field description : (total size: 186 bytes)
capacitydata: The amount of sUDT in liquidity pool.type script: sUDT type.lock script: Same with info cell lock.