Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Incentives + Noracle #826

Merged
merged 315 commits into from
May 9, 2024
Merged

Conversation

eladmallel
Copy link
Collaborator

No description provided.

eladmallel and others added 30 commits October 3, 2023 13:04
in case the DAO wants to start the spend or burn sooner
in case the settlements were warmed up, the timestamp in change to 1
and the previous check would fail
to reduce diff
and it's easier to debug in many cases
it's not bit-packed when placed after the auction struct
and for now we prefer to not force it into the auction struct

esp. since bigger gas savings are coming from descriptor storage read optimizations
because we hit the contract size limit, this commit has a POC for
reducing it.
all the admin functions are replaced with a fallback function that
delegate calls the admin lib.
getPrices(n)
    - returns exactly `n` latest auction prices
    - skips auctions with no bids
    - skips nounder noun ids
    - reverts if auction should have data but doesn't
    - reverts if not enough items in history (not need to trim)
    -> either returns array of n-length or reverts

getSettlements(n, skipEmptyValues)
    - returns up to `n` latest settlement (in case we reach id 0)
    - includes auction with no bids (blockTimestamp will be > 1)
    - skips nounder noun ids if skipEmptyValues = true, otherwise return raw
    - skip unset data if skipEmptyValues = true, otherwise return raw

getSettlements(x, y, skipEmptyValues)
    - returns settlements for ids [x,y)
    - includes auction with no bids (blockTimestamp will be > 1)
    - skips nounder noun ids if skipEmptyValues = true, otherwise return raw
    - skip unset data if skipEmptyValues = true, otherwise return raw
davidbrai added 15 commits April 8, 2024 12:14
cache storage vars
moved the voting ended check into `proposalDataForRewards`.
otherwise, a proposal that hasn't yet finished voting may get filtered out
due to not meeting the quorum requirements and the `nextProposalIdToReward`
could be set to a proposalId after it.
This would cause that proposal to not get rewards.
…ix-1

Fix for rewards contract following audit
…an-set-descriptor

allow admin to set rewards descriptor
return ds.proposalsV3(proposalId);
}

/**
* @notice Get a range of proposals, in the format of a samller struct tailored to client incentives rewards.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"samller" -> "smaller"?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, fixed

@davidbrai davidbrai merged commit 2b17f53 into master May 9, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants