feat: update evently prediction markets on MegaETH#18658
feat: update evently prediction markets on MegaETH#18658isonips wants to merge 1 commit intoDefiLlama:mainfrom
Conversation
📝 WalkthroughWalkthroughTwo new configuration modules added for the Evently project on MegaETH: one defining TVL calculation via Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The adapter at projects/evently exports TVL: |
|
The adapter at projects/treasury/evently.js exports TVL: |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
projects/treasury/evently.js (1)
7-9: Prefer explicit USDm treasury token configuration.Given fee accrual is in USDm, consider explicitly adding USDm here (and optionally disabling default token expansion) so treasury accounting doesn’t rely on helper defaults.
Suggested deterministic config
const { treasuryExports } = require("../helper/treasury"); const { nullAddress } = require('../helper/tokenMapping'); +const USDM = '0xFAfDdbb3FC7688494971a79cc65DCa3EF82079E7'; module.exports = treasuryExports({ megaeth: { owners: ['0x21CbC99a2E8c68F1C2955991E07c0C22ea895Da1'], + fetchCoValentTokens: false, tokens: [ nullAddress, + USDM, ], }, })🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@projects/treasury/evently.js` around lines 7 - 9, The treasury config currently only lists nullAddress in the tokens array which allows helper defaults to fill in USDm implicitly; update the tokens array in projects/treasury/evently.js to explicitly include the USDm token identifier (add the USDm token alongside nullAddress) and, if present in the surrounding config, set or add the flag that disables default token expansion (e.g., an expandTokens: false or similar option) so treasury accounting deterministically uses USDm rather than relying on helper defaults.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@projects/evently/index.js`:
- Around line 21-26: Update the methodology string in projects/evently/index.js
to reflect the actual current calculation (i.e., TVL only sums PROFILES_V1),
explicitly state that protocol-owned/treasury balances are excluded from TVL and
tracked separately, and keep the note that EventlyMarketsV3 address is pending;
modify the value assigned to the methodology key (the multi-line string shown)
to this corrected wording so it matches the implemented behavior.
---
Nitpick comments:
In `@projects/treasury/evently.js`:
- Around line 7-9: The treasury config currently only lists nullAddress in the
tokens array which allows helper defaults to fill in USDm implicitly; update the
tokens array in projects/treasury/evently.js to explicitly include the USDm
token identifier (add the USDm token alongside nullAddress) and, if present in
the surrounding config, set or add the flag that disables default token
expansion (e.g., an expandTokens: false or similar option) so treasury
accounting deterministically uses USDm rather than relying on helper defaults.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3a8d2959-6833-4440-80c8-7d144a9f3868
📒 Files selected for processing (2)
projects/evently/index.jsprojects/treasury/evently.js
| methodology: | ||
| "TVL is the total USDM locked in evently smart contracts (Profiles + Prediction Markets V3) on MegaETH. " + | ||
| "Fees: 2.5% per trade via LMSR pricing — 1% to market creator, 1% to protocol treasury, 0.5% to resolver. " + | ||
| "Revenue: 1% of all trading volume goes to the protocol treasury. " + | ||
| "Volume: sum of all USDM traded on prediction markets (TradeExecuted events). " + | ||
| "EventlyMarketsV3 address is pending deployment and will be added upon launch.", |
There was a problem hiding this comment.
Methodology text currently overstates TVL scope.
The implementation only sums PROFILES_V1, but the text says TVL includes Profiles + Markets V3. Please reword to current-state behavior and explicitly state treasury balances are excluded from TVL (tracked separately).
Suggested wording update
- methodology:
- "TVL is the total USDM locked in evently smart contracts (Profiles + Prediction Markets V3) on MegaETH. " +
+ methodology:
+ "TVL is the total USDM currently locked in Evently Profiles on MegaETH; EventlyMarketsV3 will be added after deployment. " +
+ "Protocol treasury balances are excluded from TVL and tracked separately. " +
"Fees: 2.5% per trade via LMSR pricing — 1% to market creator, 1% to protocol treasury, 0.5% to resolver. " +
"Revenue: 1% of all trading volume goes to the protocol treasury. " +
"Volume: sum of all USDM traded on prediction markets (TradeExecuted events). " +
- "EventlyMarketsV3 address is pending deployment and will be added upon launch.",
+ "EventlyMarketsV3 address is pending deployment and will be added upon launch.",Based on learnings: Protocol-owned liquidity should be excluded from TVL calculations and explained in the methodology field.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@projects/evently/index.js` around lines 21 - 26, Update the methodology
string in projects/evently/index.js to reflect the actual current calculation
(i.e., TVL only sums PROFILES_V1), explicitly state that protocol-owned/treasury
balances are excluded from TVL and tracked separately, and keep the note that
EventlyMarketsV3 address is pending; modify the value assigned to the
methodology key (the multi-line string shown) to this corrected wording so it
matches the implemented behavior.
(Needs to be filled only for new listings)
Name (to be shown on DefiLlama):
evently
Twitter Link:
https://twitter.com/eventlymarket
List of audit links if any:
(none yet)
Website Link:
https://evently.market
Logo (High resolution, will be shown with rounded borders):
(à uploader)
Current TVL:
~$0 (EventlyMarketsV3 pending deployment)
Treasury Addresses (if the protocol has treasury)
0x21CbC99a2E8c68F1C2955991E07c0C22ea895Da1(MegaETH, Chain ID 4326)Chain:
MegaETH (Chain ID 4326)
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed):
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed):
Short Description (to be shown on DefiLlama):
evently is a fully onchain prediction markets protocol on MegaETH. Trade outcomes on crypto, politics, culture and more. Powered by LMSR pricing with a hybrid CLOB + AMM architecture. Positions are ERC-1155 tokens settled in USDm.
Token address and ticker if any:
0xFAfDdbb3FC7688494971a79cc65DCa3EF82079E7— USDm (base token, not protocol token)Category (full list at https://defillama.com/categories) *Please choose only one:
Prediction Market
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
None — markets are resolved manually by designated resolvers onchain.
Implementation Details: Briefly describe how the oracle is integrated into your project:
No external oracle. Resolution is triggered by a permissioned resolver address calling the resolve function on-chain. Dispute mechanism planned for V3.
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
https://docs.evently.market
forkedFrom (Does your project originate from another project):
None
methodology (what is being counted as tvl, how is tvl being calculated):
TVL is the total USDm locked in evently smart contracts (EventlyProfiles + EventlyMarketsV3) on MegaETH. Fees: 2.5% per trade via LMSR pricing — 1% to market creator, 1% to protocol treasury, 0.5% to resolver. EventlyMarketsV3 address pending deployment.
Github org/user (Optional, if your code is open source, we can track activity):
https://github.com/isonips/evently
Does this project have a referral program?
No
Summary by CodeRabbit