feat(stake): treasury conta o MOR pendente (25% da Gnars acumulando) - #226
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
O "Rendeu pro tesouro" mostrava a fee do vault (que acumula on-chain) mas só o MOR já realizado (claimado→dividido→distribuído) — 0 até a 1ª distribuição. Resultado: o número parecia travado em 0 MOR. Agora o readGnarsMor soma um 3º tier: os 25% da Gnars sobre o MOR ainda NÃO claimado, pendente nos pools da Morpheus (getLatestUserReward por staker oficial, via Etherscan proxy eth_call). A cifra sobe conforme o MOR acumula — coerente com a fee do vault, também não-realizada. Segue a mesma política de preço (se tem MOR e não consegue precificar, o wrapper lança). Sem UI nova. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sktbrd
force-pushed
the
feat/treasury-accruing-mor
branch
from
July 28, 2026 07:08
909e0be to
bee10bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
O card "Rendeu pro tesouro" mostrava
$fee · 0 MORe parecia travado. A fee do vault acumula on-chain (não-realizada), mas ognarsMorcontava só o MOR realizado — claimado → dividido → distribuído. Como ninguém distribuiu ainda, ficava 0 MOR até a primeira distribuição (aí pularia, sem nunca "subir aos poucos").Fix
gnarsMorEarnedagora soma 3 tiers (Gnars = 25% em todos):getLatestUserRewardpor staker oficial, via Etherscan proxyeth_call, datacenter-safe).O tier 3 mantém a cifra viva: sobe conforme o MOR acumula, espelhando a fee do vault (também não-realizada), em vez de ler 0.
Efeito hoje (dados reais)
Staker oficial (haxixe) tem 0.0051 MOR pendente → Gnars 25% = 0.0013 MOR ≈ $0.003. O total sai de
$0.000123→~$0.0032, e o "0 MOR" vira "0.0013 MOR" (ofmtMorjá usa 4 casas). Pequeno porque os depósitos são de teste — mas agora live e honesto.Verificação
tsc✓ ·eslint✓ ·next build✓. Valor esperado conferido on-chain.🤖 Generated with Claude Code