Functions readMaxValue and readMinValue need to be implemented
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- solidity
- Lĩnh vực
- blockchain
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.)
- Ngôn ngữ chính
- Solidity
- Star
- 3
- Fork
- 3
- Merge trung bình
- 15 giờ 55 phút
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của StabilityNexus/OrbOracle-Solidity
-
[BUG]: Oracle with rewardBps above 1e5 can never accept a funded price submissionCó thể đã có người làm @kansalakshat đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
StabilityNexus/OrbOracle-Solidity#27 · 1 bình luận ·
-
[BUG]: Old prices stay in the feed after someone resubmits (decay is not multiplicative)Có thể đã có người làm @Deepak-negi11 đã nhận 4 ngày trước. Đang mởbug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
StabilityNexus/OrbOracle-Solidity#25 · 1 bình luận ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 73/100
-
Composition of existing oraclesĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
StabilityNexus/OrbOracle-Solidity#4 · 1 bình luận ·
Tất cả issue của StabilityNexus/OrbOracle-Solidity
Issue tương tự
-
Log filters reject `"fromBlock": null` (and `toBlock`/`blockHash`) instead of treating it as unsetĐang mởL1 rpc-api
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
lambdaclass/ethrex#7530 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
LFDT-Lineth/lineth-monorepo#4442 ·
Maintainer thường phản hồi trong vòng 1 ngày