cardano-foundation / cardano-foundation/cardano-rosetta-java
Clarify deposit/refund operations are implicit
- Dominant language
- Java
- Stars
- 26
- Forks
- 15
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
### Context & versions
cardano-rosetta-java 1.3.x - Cardano-specific operations
### Problem
Misunderstanding about deposits/refunds - they are NOT paid from/to stake accounts directly.
### Key clarification
**Deposits are NOT paid from stake accounts** - they're paid implicitly by the transaction (like fees):
- Deposit amount comes from the difference between inputs and outputs
- It's not a transfer from stake account to somewhere
- Similar to fees - implicit in the UTXO model
### Current behavior vs expected
```json
// WRONG understanding:
{
"type": "deposit",
"account": {"address": "stake1..."}, // ❌ NOT a transfer from stake account
"amount": {"value": "-2000000", ...}
}
// CORRECT understanding:
// Deposit is implicit - paid by whoever signs the transaction
// The 2 ADA just "disappears" from inputs-outputs difference
// Similar to how fees work
```
### Withdrawals are different
```json
// Withdrawal IS explicit - from stake account to transaction
{
"type": "withdrawal",
"account": {"address": "stake1..."}, // ✅ Actually from stake account
"amount": {"value": "100000000", ...} // ✅ Added to transaction outputs
}
```
### Tasks
- [ ] Document that deposits/refunds are implicit (like fees)
- [ ] Clarify they're NOT transfers from stake accounts
- [ ] Further discuss if explicit deposit/refund operations are even needed
- [ ] Document the difference between deposits (implicit) and withdrawals (explicit)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.