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

Add Leveragex.trade #13158

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion projects/javsphere/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ async function tvl(api) {
}

module.exports = {
methodology: `We count the TVL of LeverageX Trading platform leveragex.trade (LPs and Traders). And TVL from staking and freezer of javsphers native token JAV.`,
methodology: `TVL of LeverageX Trading platform leveragex.trade (LPs and Traders). TVL from staking and freezer of javsphers native token JAV.`,
hallmarks: [
[1733837635, "Migration to BASE"],
[1734547635, "Launch of LeverageX.trade"],
],
base: {
tvl,
Expand Down
18 changes: 18 additions & 0 deletions projects/leveragex/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const LEVERAGEX_BASE_EARN = '0xfd916d70eb2d0e0e1c17a6a68a7fbede3106b852'
const LEVERAGEX_BASE_DIAMOND = '0xBF35e4273db5692777EA475728fDbBa092FFa1B3'

async function tvl(api) {
const config = await api.fetchList({ lengthAbi: 'tokensCount', itemAbi: "function tokens(uint256) view returns (address asset, bytes32 priceFeed, uint256 targetWeightage, bool isActive)", target: LEVERAGEX_BASE_EARN })
const tokens = config.map(i => i.asset)
return api.sumTokens({ owners: [LEVERAGEX_BASE_EARN, LEVERAGEX_BASE_DIAMOND], tokens, })
Copy link
Collaborator

Choose a reason for hiding this comment

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

it seems like this counts exactly the same thing as the javsphere adapter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes i removed the javsphere part so we only have LeverageX.

}

module.exports = {
methodology: `TVL of LeverageX Trading platform leveragex.trade (LPs and Traders).`,
hallmarks: [
[1734547635, "Launch of LeverageX.trade"],
],
base: {
tvl,
}
}
Loading