- Home
- Skills
- Michavie
- Mx Ai Skills
- Protocol
protocol_skill
2
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill michavie/mx-ai-skills --skill protocol- SKILL.md48.8 KB
Overview
This skill captures expert knowledge of the MultiversX protocol, focused on sharding, consensus (SPoS), ESDT token standards, and cross-shard behavior. It is designed to support architectural decisions, debugging of complex failures, and secure dApp design. Use it to reason about performance trade-offs, gas, and asynchronous execution semantics.
How this skill works
The skill explains how adaptive state sharding assigns accounts to shards, how cross-shard transactions flow via the metachain, and how finality and validator rotation operate under SPoS. It details ESDT as a protocol-level token model, Arwen WASM execution semantics, and the async callback pattern required for cross-shard calls. It also summarizes key constants and gas implications for storage, byte size, and cross-shard operations.
When to use it
- Designing smart contracts that must tolerate cross-shard asynchrony and callbacks
- Reviewing protocol-level code or proposals that affect sharding, consensus, or ESDT behavior
- Debugging cross-shard failures where caller state and remote execution diverge
- Optimizing gas and storage usage for contracts and token operations
- Planning sovereign chain gateways, deposits, and withdrawal security models
Best practices
- Always design for asynchronous cross-shard calls: use callbacks and explicit rollback logic
- Minimize storage writes and payload bytes to reduce gas; prefer transient computation when possible
- Reserve gas for both the remote execution and the callback; account for cost on both shards
- Wait for finality before trusting off-chain effects; use configurable rounds or finalized subscriptions
- Place critical system contracts on the metachain and keep application logic shard-aware
Example use cases
- Implementing a marketplace where item transfers may cross shards and require robust callbacks
- Auditing a token issuance flow to ensure ESDT roles and local mint/burn permissions are correct
- Designing a gateway for a sovereign chain to securely mint/burn tokens based on cross-chain proofs
- Tuning contract storage layout and payload size to lower per-transaction gas costs
- Troubleshooting a multi-step workflow that fails intermittently due to callback handling
FAQ
Cross-shard calls are asynchronous; the remote execution completes in a later block. Callbacks let the caller observe success or failure and compensate or revert state changes explicitly.
Are ESDT tokens implemented as smart contracts?
No. ESDT tokens are native protocol-level assets with balances in account state and special roles for minting, burning, and management.