OriginProtocol / OriginProtocol/origin-dollar
Rounding issue on small amounts
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 152
- Forks
- 115
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 17
Description
While investigating ousd_analytics, I found a small issue with small numbers:
The user deposited E 0.001 and got OETH 0.000999999999999999
https://etherscan.io/tx/0x9b005270a8ea48d6ea28f9f72550ba814dd579d73c81596eeaa82296ec5544b3

Funny enough, etherscan rounds it up.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the linked Etherscan transaction and the reported ousd_analytics result for the 0.001 E deposit. Trace where the OETH amount is calculated and identify the intended precision and rounding behavior; the issue is complete when the small-amount conversion no longer loses the reported precision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100