Skip to content

Commit 3ab227a

Browse files
docs: add resource feecomparison to fees documentation (#1583)
Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>
1 parent aa02c2f commit 3ab227a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

docs/learn/fundamentals/fees-resource-limits-metering.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ All smart contract transactions require a resource fee in addition to an inclusi
2727

2828
`Transaction Fee (Tx.fee) = Resource Fee (sorobanData.resourceFee) + Inclusion Fee`
2929

30+
Transactions that do not execute a smart contract can be thought of as having a resource fee of zero (`resourceFee == 0`). Conversely, for smart contract transactions, you can subtract the resource fee from the total transaction fee to derive the equivalent classic transaction fee component, which is the inclusion fee.
31+
3032
![Soroban Fees](/assets/diagrams/soroban_fees.png) _\* Diagram: Solid line boxes are what is actually present in the transaction, while dotted lines are derivable._
3133

3234
Smart contracts on Stellar use a multidimensional resource fee model that charges fees for several resource types using [network-defined rates](../../networks/resource-limits-fees.mdx). The resource fee is calculated based on the resource consumption declared in the transaction and can fluctuate based on a mutable storage write fee (more on that in the [Storage Dynamic Pricing section](#dynamic-pricing-for-storage) below). If the transaction attempts to exceed the declared resource limits, it will fail. If the transaction uses fewer resources than declared, there will be no refunds [(with a couple of exceptions)](#refundable-and-non-refundable-resource-fees).

0 commit comments

Comments
 (0)