Skip to content

docs(cookbook): add guide and examples for resource and inclusion fees (#2344) - #2868

Closed
jdjioe5-cpu wants to merge 1 commit into
stellar:mainfrom
jdjioe5-cpu:docs/issue-2344-fees-and-resources-cookbook
Closed

jdjioe5-cpu wants to merge 1 commit into
stellar:mainfrom
jdjioe5-cpu:docs/issue-2344-fees-and-resources-cookbook

Conversation

@jdjioe5-cpu

Copy link
Copy Markdown

Summary

Resolves #2344.

Adds a comprehensive cookbook guide (\cookbook/fees-and-resources.mdx) explaining the differences between Stellar inclusion fees and Soroban resource fees, and demonstrating when each CLI fee argument and command should be used.

Contents Included

  • Fee Types Overview:
    • Inclusion Fee: Validator inclusion economics, surge pricing, minimum 100 stroops base fee, unit explanation (stroop vs XLM).
    • Resource Fee: Soroban VM compute resources (CPU instructions, memory, ledger read/write bytes/entries) and breakdown into non-refundable vs refundable fees (storage rent, return values, event deposits).
  • Quick Reference Table:
    • Comparison of --inclusion-fee, --fee\ (deprecated), --resource-fee, --instruction-leeway, --cost, \stellar fees stats, \stellar fees use, \stellar fees unset, and \stellar tx fetch fee.
  • Hands-On Recipes & Examples:
    1. Setting custom inclusion fees for congestion/surge pricing (--inclusion-fee).
    2. Inspecting detailed Soroban resource consumption and cost breakdowns on stderr (--cost).
    3. Adding instruction leeway for contracts with dynamic execution paths (--instruction-leeway).
    4. Manually overriding simulated resource fees (--resource-fee).
    5. Fetching real-time network fee percentiles from RPC (\stellar fees stats).
    6. Setting persistent default inclusion fees globally or dynamically (\stellar fees use\ / \stellar fees unset).
    7. Auditing past transaction fees and refunded storage rent deposits (\stellar tx fetch fee).
  • Best Practices & Troubleshooting:
    • Development defaults, Mainnet gas optimization tips, and common error resolution (\ x_insufficient_fee, \ExceededBudget).

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Oct 23, 2026
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add cookbook examples for resource and inclusion fees

2 participants