Functions readMaxValue and readMinValue need to be implemented
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- solidity
- 領域
- blockchain
調査の方向性
Start by locating readMaxValue and readMinValue in the Solidity contracts, then read the existing value-submission and history logic. Confirm how N and gamma are represented before implementing the described historical traversal and update behavior; done means both functions return the highest or lowest value from the N most recent stored averages.
索引モデルが issue の本文から書いたものです。
説明
These two functions are important for protocols such as Djed Shu.
There are different ways in which we could implement them. Here is a reasonable and simple one:
-
We keep an array of historical average values.
-
When
readMaxValueis called, we traverse theNmost recent values from this array and return the highest average price found. -
When
readMinValueis called, we traverse theNmost recent values from this array and return the lowest average price found. -
Let
tbe the timestamp of the most recent entry in the history array. Whenever a new value is submitted at time at'andt' > t + gamma, the new average should be pushed into the history array.
The reason for having a minimal interval gamma is that we want the maximum and minimum value to be values over a significant period of time.
(I have a simple idea to optimize the traversals by caching some results. But let's implement the non-optimized version first, which traverses the history on every call to read...Value . Later we can discuss the caching optimization.)
- 主要言語
- Solidity
- スター
- 3
- フォーク
- 3
- 平均マージ
- 15時間 55分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
StabilityNexus/OrbOracle-Solidity のほかの issue
-
[BUG]: Oracle with rewardBps above 1e5 can never accept a funded price submission対応中かも @kansalakshat が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
StabilityNexus/OrbOracle-Solidity#27 · コメント 1 件 ·
-
[BUG]: Old prices stay in the feed after someone resubmits (decay is not multiplicative)対応中かも @Deepak-negi11 が 4 日前に担当しました。 オープンbug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
StabilityNexus/OrbOracle-Solidity#25 · コメント 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 73/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
StabilityNexus/OrbOracle-Solidity#4 · コメント 1 件 ·
StabilityNexus/OrbOracle-Solidity の issue をすべて見る
似ている issue
-
Log filters reject `"fromBlock": null` (and `toBlock`/`blockHash`) instead of treating it as unsetオープンL1 rpc-api
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
lambdaclass/ethrex#7530 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
LFDT-Lineth/lineth-monorepo#4442 ·
メンテナーはふだん 1 日以内に返信