archethic-foundation / archethic-foundation/dex
LP Token estimation in fiat : Why an exception if prices are = 0 ?
Open
question
- Dominant language
- Dart
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
In `DexTokensProviders.estimateTokenInFiat` why have we an exception if prices are = 0
Normally, if tokens from LP have no price, LP Price = 0
```
if (fiatValueToken1 == 0 && fiatValueToken2 == 0) {
throw Exception();
}
```
Contributor guide
Research direction
Start at the DexTokensProviders.estimateTokenInFiat entry point and inspect the branch that throws when both fiatValueToken1 and fiatValueToken2 are zero. Confirm how LP tokens with no prices are represented elsewhere, then verify that the zero-price case follows the intended behavior without raising an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100