OriginProtocol / OriginProtocol/origin-dollar
OIP-8 Per Block Yield
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 152
- Forks
- 115
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 17
Description
The oTokens could have per block yield. Like aTokens, the balanceOf would constantly be moving up, our current rebaseRatio would also move block by block.
For gas efficiency, we would want to avoid writes to "global" variables during this. A write to an extra per account variable during a transfer could be okay.
We'd want these balance increases to be time capped, with an end. For example, increase to X from Y over Z time. For precision we would want to work off these totals rather than using a rate per block or rate per second.
Tokens to research look at are the different aTokens, sFrxETH.
👍 We should be able to ensure exact transfers by doing math in balance space (as we've already explored in PR #1680)
👍 This would also unlock making rebases happen less frequently, or disconnected from the daily calendar. This would benefit OUSD, since we would not need to rebase as often. This would benefit OETH because we might only rarely actually need the incentivized rebasing if we had had an organic rebase in the last X hours.
😢 This would probably make CEX exchange support even harder than it already is. However, anyone supporting sFrxETH or aTokens will already be dealing with this. It probably makes DEX yield support easier.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PR #1680 and the referenced aTokens and sFrxETH implementations, then trace balanceOf, rebaseRatio, and transfer behavior in this repository. Done requires a settled design for capped per-block yield, account updates, gas behavior, and exact-transfer semantics, followed by corresponding contract tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100