cardano-foundation / cardano-foundation/cardano-rosetta-java

Document that fees are implicit in Rosetta

Open
#572 0 comments 0 reactions 1 assignee Claimed by @linconvidal View on GitHub
documentation
Dominant language
Java
Stars
26
Forks
15
Avg merge
5d 3h
Merged PRs (30d)
2

Description

### Context & versions
cardano-rosetta-java 1.3.x - Fee handling in UTXO model

### Problem
Need to clearly document that fees are implicit, not explicit operations.

### Key clarification
**Fees are implicit in UTXO models** - this is correct behavior:
- Fees = sum(inputs) - sum(outputs) - deposits + withdrawals + refunds
- No explicit fee operations needed
- Fees are "burned" (go to rewards virtual pot, not transferred between addresses)
- This is WHY explicit fee operations aren't needed

### Example with withdrawal
```
Stake account: 100 ADA rewards
Withdrawal: 100 ADA
Transaction fee: 0.17 ADA

Result:
- Stake balance: 0 (100 ADA withdrawn)
- Added to outputs: 100 ADA
- Fee comes from: inputs - outputs difference (NOT from withdrawal)
- If only withdrawal with no other inputs: transaction would fail (*double check)
```

### Tasks
- [ ] Document how to set implicit fees
- [ ] Explain the formula: fee = inputs - outputs - deposits + withdrawals + refunds
- [ ] Add examples showing fee calculation, also including with withdrawals

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.