Sui.

Bài viết

Chia sẻ kiến thức của bạn.

Vens.sui.
Apr 29, 2025
Hỏi đáp Chuyên Gia

AMM Bot trong hệ sinh thái Sui

Các tính năng và chức năng chính của bot AMM trong hệ sinh thái Sui là gì? Làm thế nào để họ cải thiện các cơ chế giao dịch truyền thống và chúng mang lại những lợi thế nào cho người dùng tham gia với các giao thức DeFi trên mạng Sui?

Tôi có cần xây dựng một cái hay tôi có thể sử dụng Turbos Finance chẳng hạn

  • Sui
9
8
Chia sẻ
Bình luận
.

Câu trả lời

8
MiniBob.
Apr 29 2025, 08:36

Nếu bạn đang tìm kiếm một cách nhanh chóng và hiệu quả để tương tác với các chức năng AMM trong hệ sinh thái Sui, bạn không nhất thiết phải xây dựng bot của riêng mình. Các nền tảng như Turbos Finance đã cung cấp các tính năng AMM tiên tiến, bao gồm giao dịch tự động và cung cấp thanh khoản, được thiết kế để nâng cao trải nghiệm người dùng. Tận dụng các giải pháp hiện có như Turbos Finance cho phép bạn tận dụng các công cụ được tối ưu hóa và thử nghiệm mà không cần sự phức tạp của quá trình phát triển.

Nhưng yêu thích nhất của tôi là cái này https://github.com/OmniBTC/Sui-AMM-swap

cmd cho các bài kiểm tra

$ issue XBTC and USDT test coins
XBTC="0x985c26f5edba256380648d4ad84b202094a4ade3::coins::XBTC"
USDT="0x985c26f5edba256380648d4ad84b202094a4ade3::coins::USDT"
SUI="0x2::sui::SUI"

$ sui client publish --gas-budget 10000
package=0xc6f8ce30d96bb9b728e000be94e25cab1a6011d1
global=0x28ae932ee07d4a0881e4bd24f630fe7b0d18a332

$ sui client objects
sui_coin=0x525c0eb0e1f4d8744ae21984de2e8a089366a557
usdt_coin=0x8e81c2362ff1e7101b2ef2a0d1ff9b3c358a1ac9

$ sui client call --gas-budget 10000 \
  --package=$package \
  --module=interface \
  --function=add_liquidity \
  --args $global $sui_coin 1 $usdt_coin 1 \
  --type-args $SUI $USDT
  
lp_sui_usdt=0xdf622fddc8447b0c1d15f8418e010933dd5f0a6c 
pool_sui_usdt=0x5058b90e728df97c4cb5cade5e5c77fcb662a4b9

$ sui client split-coin --gas-budget 10000 \
  --coin-id $lp_sui_usdt \
  --amounts 100000
  
lp_sui_usdt2=0x6cde2fe9277c92e196585fb12c6e3d5aaa4eab34

$ sui client call --gas-budget 10000 \
  --package=$package \
  --module=interface \
  --function=remove_liquidity \
  --args $global $lp_sui_usdt2 \
  --type-args $SUI $USDT

new_usdt_coin=0xc090e45f9461e39abb0452cf3ec297a40efbfdc3
new_sui_coin=0x9c8c1cc38cc61a94264911933c69a772ced07a09

# sui -> usdt
$ sui client call --gas-budget 10000 \
  --package=$package \
  --module=interface \
  --function=swap \
  --args $global $new_sui_coin 1  \
  --type-args $SUI $USDT
  
out_usdt_coin=0x80076d95c8bd1d5a0f97b537669008a1a369ce12

# usdt -> sui
sui client call --gas-budget 10000 \
  --package=$package \
  --module=interface \
  --function=swap \
  --args $global $out_usdt_coin 1 \
  --type-args $USDT $SUI

out_sui_coin=0xaa89836115e1e1a4f5fa990ebd2c7be3a5124d07


$ sui client call --gas-budget 10000 \
  --package=$package \
  --module=interface \
  --function=add_liquidity \
  --args $global $out_sui_coin 100 $new_usdt_coin 1000 \
  --type-args $SUI $USDT
8
Câu trả lời hay nhất
Bình luận
.
harry phan.
Apr 30 2025, 03:03

Này Vens, nếu bạn đang muốn cắm vào các mô-đun gốc của SUI như DeepBook. Turbo và các AMM tương tự đã cung cấp cơ sở hạ tầng hợp đồng thông minh và giao diện frontend, có nghĩa là bạn có thể quay bot (ví dụ: trong Rust hoặc TypeScript bằng Sui SDK) để thực hiện những việc như tự động hoán đổi, chạy chênh lệch giá hoặc quản lý các vị trí LP. Tuy nhiên, nếu bạn muốn kiểm soát nhiều hơn, hãy xây dựng trực tiếp với DeepBook vì lớp thanh khoản gốc của Sui cho phép bạn xây dựng DEX với logic sổ lệnh, tùy chỉnh phí và kiểm soát lưu ký.

Ví dụ: bạn có thể: • Tạo một đối tượng nhóm dùng chung với create_pool, chỉ định các mức tick_size, lot_size và phí. • Thiết lập tài khoản lưu ký thông qua create_account để quản lý số dư tài sản cao Like Create a Pool trên DeepBook

sui client call \ --package <DEEPBOOK_PACKAGE_ID> \ --module deepbook \ --function create_pool \ --type-args 0x2::sui::SUI 0x2::usdc::USDC \ --args 1000000 1000000 <CREATION_FEE_OBJECT> \ --gas-budget 10000000

Trước khi đặt lệnh giới hạn, bot của bạn cần thiết lập tài khoản giám sát:

sui client call \
  --package <DEEPBOOK_PACKAGE_ID> \
  --module deepbook \
  --function create_account \
  --gas-budget 5000000

Tiền gửi SUI (tài sản cơ bản):

sui client call \
  --package <DEEPBOOK_PACKAGE_ID> \
  --module deepbook \
  --function deposit_base \
  --type-args 0x2::sui::SUI 0x2::usdc::USDC \
  --args <POOL_ID> <SUI_COIN_OBJECT> <ACCOUNT_CAP_ID> \
  --gas-budget 3000000

Gửi USDC (tài sản báo giá):

sui client call \
  --package <DEEPBOOK_PACKAGE_ID> \
  --module deepbook \
  --function deposit_quote \
  --type-args 0x2::sui::SUI 0x2::usdc::USDC \
  --args <POOL_ID> <USDC_COIN_OBJECT> <ACCOUNT_CAP_ID> \
  --gas-budget 3000000

Đặt lệnh giới hạn

sui client call \
  --package <DEEPBOOK_PACKAGE_ID> \
  --module deepbook \
  --function place_limit_order \
  --type-args 0x2::sui::SUI 0x2::usdc::USDC \
  --args <POOL_ID> <CLIENT_ORDER_ID> <PRICE> <QUANTITY> 0 true <EXPIRE_TS> 0 <CLOCK_ID> <ACCOUNT_CAP_ID> \
  --gas-budget 5000000

Đặt lệnh thị trường

sui client call \
  --package <DEEPBOOK_PACKAGE_ID> \
  --module deepbook \
  --function place_market_order \
  --type-args 0x2::sui::SUI 0x2::usdc::USDC \
  --args <POOL_ID> <ACCOUNT_CAP_ID> <CLIENT_ORDER_ID> <QUANTITY> true <BASE_COIN_ID> <QUOTE_COIN_ID> <CLOCK_ID> \
  --gas-budget 5000000

Hoán đổi giữa cơ sở và báo giá

sui client call \
  --package <DEEPBOOK_PACKAGE_ID> \
  --module deepbook \
  --function swap_exact_base_for_quote \
  --type-args 0x2::sui::SUI 0x2::usdc::USDC \
  --args <POOL_ID> <CLIENT_ORDER_ID> <ACCOUNT_CAP_ID> <QUANTITY> <SUI_COIN_OBJECT> <USDC_COIN_OBJECT> <CLOCK_ID> \
  --gas-budget 5000000

Nếu không

sui client call \
  --package <DEEPBOOK_PACKAGE_ID> \
  --module deepbook \
  --function swap_exact_quote_for_base \
  --type-args 0x2::sui::SUI 0x2::usdc::USDC \
  --args <POOL_ID> <CLIENT_ORDER_ID> <ACCOUNT_CAP_ID> <QUANTITY> <CLOCK_ID> <USDC_COIN_OBJECT> \
  --gas-budget 5000000
12
Bình luận
.
Momemtum.
Sep 6 2025, 16:29

AMM bots on Sui enable automated, programmatic trading and liquidity management. Their core functionalities include providing liquidity, rebalancing portfolios, executing arbitrage strategies, and optimizing trade execution. They significantly improve upon traditional mechanisms by offering continuous, 24/7 operation, minimizing human error and emotional biases, and leveraging Sui's high throughput and low latency for faster transaction settlement and lower gas fees. For users, this translates to enhanced capital efficiency, better price discovery, reduced slippage, potential for passive income from LP fees, and access to more sophisticated trading strategies without constant manual intervention. You typically don't need to build one from scratch unless you have a highly custom strategy; platforms like Turbos Finance already offer the infrastructure for trading and liquidity provision, and third-party tools or protocols often provide advanced bot functionalities you can leverage or subscribe to.

4
Bình luận
.
dhaholar.
Aug 26 2025, 20:13

An AMM bot in the Sui ecosystem is essentially an automated agent that interacts with liquidity pools to optimize trades, provide liquidity, or capture arbitrage opportunities. Since Sui’s object-centric design allows for fast parallel execution and lower gas fees, AMM bots can run more efficiently than on many other chains. Their key features usually include real-time monitoring of liquidity pools, automated token swaps based on predefined strategies, arbitrage detection across pools or protocols, liquidity provision and rebalancing, and gas-optimized execution to minimize costs. Compared to traditional trading mechanisms that rely on order books, AMM bots benefit from Sui’s high throughput and deterministic transaction finality, offering users faster trades, predictable pricing, and less slippage when liquidity is deep. For DeFi users, this means better access to yield opportunities, improved market efficiency, and a more trustless environment where strategies can run without intermediaries.

You don’t necessarily need to build one yourself unless you want a custom strategy. Platforms like Turbos Finance already provide AMM infrastructure, including swap, liquidity pools, and farming tools that effectively give you access to bot-like benefits without coding your own. However, if you want advanced features such as arbitrage across multiple Sui-based AMMs or custom market-making strategies, building your own bot on top of Sui’s Move smart contracts could be worthwhile.

0
Bình luận
.

Bạn có biết câu trả lời không?

Hãy đăng nhập và chia sẻ nó.