Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrav committed Mar 21, 2024
1 parent 3234402 commit 1aab8a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ const updateRicoStats = async () => {
const parUsd = parseFloat(formatUnits(parRay * xauRay / RAY, 27)).toFixed(2)
const marUsd = parseFloat(formatUnits(marRay * xauRay / RAY, 27)).toFixed(2)
const lag = now - tau
const newParRay = grow(parRay, wayRay, lag)
let newWayRay = wayRay
if (marRay < parRay) {
if (marRay < newParRay) {
newWayRay = minBigInt(cap, grow(wayRay, how, lag))
} else if (marRay > parRay) {
} else if (marRay > newParRay) {
const iCap = RAY * RAY / cap
const iHow = RAY * RAY / how
newWayRay = maxBigInt(iCap, grow(wayRay, iHow, lag))
Expand Down
5 changes: 3 additions & 2 deletions main.unmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ const updateRicoStats = async () => {
const parUsd = parseFloat((0,formatUnits/* formatUnits */.b)(parRay * xauRay / RAY, 27)).toFixed(2)
const marUsd = parseFloat((0,formatUnits/* formatUnits */.b)(marRay * xauRay / RAY, 27)).toFixed(2)
const lag = now - tau
const newParRay = grow(parRay, wayRay, lag)
let newWayRay = wayRay
if (marRay < parRay) {
if (marRay < newParRay) {
newWayRay = minBigInt(cap, grow(wayRay, how, lag))
} else if (marRay > parRay) {
} else if (marRay > newParRay) {
const iCap = RAY * RAY / cap
const iHow = RAY * RAY / how
newWayRay = maxBigInt(iCap, grow(wayRay, iHow, lag))
Expand Down

0 comments on commit 1aab8a9

Please sign in to comment.