Move `ConversionRate` out of `account::oracle` into a shared module

Open Beginner friendly
#3,841 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Locate ConversionRate in crates/miden-standards/src/account/oracle/types.rs. Identify a shared module (e.g., a new common or types module) where it can be moved. Update imports in both the oracle and fee standard modules (fee::convert_amount likely uses it). Run tests to ensure no regressions.

Written by the indexing model from the issue text.

Description

standards

As discussed in this comment: https://github.com/0xMiden/protocol/pull/3561#discussion_r3834672363

ConversionRate is in crates/miden-standards/src/account/oracle/types.rs, inside the price oracle component's module. However, it is not oracle-specific, a rate is a general-purpose value type, and the fee standard already applies the same concept through fee::convert_amount.

So, we should Move ConversionRate out of account::oracle into a module that both the "oracle" and the "fee standard" can depend on.

Dominant language
Rust
Stars
133
Forks
168
Avg merge
2d 3h
Merged PRs (30d)
93

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 0xMiden/protocol

All issues in 0xMiden/protocol

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.