Move.

Bài viết

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

acher.
Aug 26, 2025
Thảo Luận

Optimizing Shared Objects in DeFi Protocols

Shared objects are essential for liquidity pools and AMMs, but they often become hotspots. Have you found good ways to reduce contention? Do you use sharding, secondary owned objects, or off-chain batching to keep throughput high?

  • Move CLI
  • Move
  • Smart Contract
  • Move Bug
1
1
Chia sẻ
Bình luận
.

Câu trả lời

1
shamueely.
Aug 26 2025, 23:18

In Move-based DeFi protocols on Sui, you reduce contention on shared objects by minimizing direct writes to hotspots and structuring your design to allow parallel execution. One approach is sharding shared state into multiple smaller owned objects, so different transactions can interact with separate shards without conflicts. Another strategy is using secondary owned objects that track user-specific balances or positions, only aggregating to the main pool periodically. Off-chain batching can also help: you collect multiple operations off-chain and commit them in a single transaction to reduce the number of writes to the shared object. Move’s resource safety ensures you can’t accidentally duplicate assets during these optimizations, while Sui’s parallel execution handles non-conflicting transactions efficiently. These patterns help liquidity pools and AMMs scale without bottlenecks. You can read more here: Sui Shared Objects.

// Example: splitting a pool into shards
resource struct LiquidityShard has key {
    balances: table<address, u64>,
}

1
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ó.

Move is an executable bytecode language used to implement custom transactions and smart contracts.

242Bài viết541Câu trả lời
Sui.X.Peera.

Kiếm phần của bạn từ 1000 Sui

Tích lũy điểm danh tiếng và nhận phần thưởng khi giúp cộng đồng Sui phát triển.

Chiến dịch phần thưởngTháng Tám