-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add Gloop Protocol Adapter #15553
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
base: main
Are you sure you want to change the base?
Add Gloop Protocol Adapter #15553
Conversation
The adapter at projects/gloop exports TVL:
|
for (let i = 0; i < maxVaults; i++) { | ||
try { | ||
const vaultName = await api.call({ | ||
abi: "function treasuryVaults(uint256) view returns (bytes32)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use this string form of abi throughout the rest of the adapter
token !== "0x0000000000000000000000000000000000000000" | ||
) { | ||
// Get the balance in this vault | ||
const vaultBalance = await api.call({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure that the balance used here is supply - borrow (available liquidity)
api.add(token, vaultBalance); | ||
} | ||
} | ||
} catch (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove all try/catch
// A little after Lending Pool contract was deployed | ||
start: 1744340400, | ||
arbitrum: { | ||
tvl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also export a borrowed
property, summing the borrowed amounts
Name (to be shown on DefiLlama):
Gloop
Twitter Link:
gloopfinance
List of audit links if any:
https://docs.gloop.finance/security-and-risk/audits
https://4294231757-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO8ZzD5wMG29TFZ8cFA1x%2Fuploads%2F5Ar8ogbj5s0gFw6Pltj4%2Fgloop_gmi_audit_final.pdf?alt=media&token=bedacf89-7591-497c-97d7-a495cd3162a0
https://4294231757-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO8ZzD5wMG29TFZ8cFA1x%2Fuploads%2Fgdtx2WAFxZdJF42WV647%2FGM%20Lending%20Audit%20-%20Final.pdf?alt=media&token=d1af5708-d7db-4ea2-9680-d1075986f3f7
https://4294231757-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO8ZzD5wMG29TFZ8cFA1x%2Fuploads%2FHfhMckdsiXIjzSvzkHDg%2F3_14_25_Gloop_Final_Report.pdf?alt=media&token=00fd2e16-495f-47aa-8c0e-f92dd357fb97
Website Link:
https://gloop.finance/
Logo (High resolution, will be shown with rounded borders):
Image is an SVG File.
Current TVL:
99.5k-100k ish,
Chain:
Arbitrum only
Short Description (to be shown on DefiLlama):
A DeFi suite consisting of two flagship products: 1. An index token protocol that allows users to invest in a basket of GMX liquidity providing assets by interacting with the protocol's Index contract. It manages various GM assets, calculates their weights, and allows users to mint, burn, and redeem index tokens.
Token address and ticker if any:
GLOOP: 0x4d48d503ed04d50418C9aBF163b1168FF834E47c
GMI: 0xAad4187a81689AF72d91966c8119756E425cD7CF
Category (full list at https://defillama.com/categories) *Please choose only one:
Lending
methodology (what is being counted as tvl, how is tvl being calculated):
Gloop TVL consists of two parts: (1) GMI Index TVL from totalControlledValue() which tracks GM tokens in the index, and (2) GM Lending TVL from totalUnderlying() for each supported token (GM BTC, GM ETH, GM SOL, USDC) in the lending pools.
Total TVL:
Total Borrowed: call lendingPool.totalBorrows(address), with USDC address as argument
Total Lent: call lendingPool.totalUnderlying(address), with USDC address as argument