Skip to content

Commit 2c2e23e

Browse files
committed
explainer
1 parent 246461b commit 2c2e23e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ docker compose up
138138
### Treasury Management
139139
- `GET /api/checkTreasury` - Get treasury status
140140
- `POST /api/fund/:tokens` - Create write tokens
141+
- `POST /api/consolidate` - Consolidate unused tokens back to treasury
141142

142143
## Security Features
143144

@@ -146,6 +147,42 @@ docker compose up
146147
- **Hash Verification**: SHA-256 file integrity checking
147148
- **Immutable Timestamping**: Blockchain-backed time proofs
148149

150+
## Version History
151+
152+
### v1.3.1 - Fee Structure Update
153+
154+
**Breaking Change**: Updated to accommodate new network fee requirements (100 satoshis/kb)
155+
156+
#### What Changed
157+
- **Increased Token Value**: Each write token now contains 10 satoshis (previously 1 satoshi)
158+
- This ensures sufficient fees for upload transactions under the 100 sats/kb fee model
159+
160+
- **New Consolidation Endpoint**: `GET /consolidate`
161+
- Revokes all existing unused tokens from the database
162+
- Consolidates them back into a single UTXO in the treasury
163+
- Enables clean reissuance with updated token values
164+
165+
#### Migration Path
166+
If you have existing tokens created before v1.3.1:
167+
168+
1. **Consolidate existing tokens**:
169+
```bash
170+
curl http://localhost:3030/consolidate
171+
```
172+
This will gather all unused tokens and return them to the treasury as a single UTXO.
173+
174+
2. **Create new tokens with updated value**:
175+
```bash
176+
curl http://localhost:3030/fund/100
177+
```
178+
New tokens will automatically use the 10 satoshi value.
179+
180+
#### Technical Details
181+
- The consolidation process spends all confirmed, unused hash-locked UTXOs
182+
- Each token is unlocked using its stored secret and combined into one output
183+
- Consolidated UTXOs are marked as spent in the database
184+
- The treasury receives back all satoshis minus network fees
185+
149186
## Development
150187

151188
### Prerequisites

0 commit comments

Comments
 (0)