-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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: factorial tvl #13192
base: main
Are you sure you want to change the base?
add: factorial tvl #13192
Conversation
The adapter at projects/factorial exports TVL:
|
const amountIdx = 4; | ||
const assets = result[assetDicIdx][_kv]["elements"]; | ||
const amount = assets[tonIdx]["tuple"]["elements"][amountIdx]; | ||
const basicPoolTonAmount = amount["number"]["number"]; |
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.
the pooled amount doesnt include ton balance on the contract?
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.
It's included in the contract but not properly tracked when using existing helpers.
I separately extracted only the TON asset from the contract using the get_method(get_pool_data) interface and added it.
@g1nt0ki The existing sumOfToken helper is designed to display wallet balances. However, in lending protocols like ours, this approach doesn’t seem suitable. It would be appeared as the remaining jettons have decreased when borrowing occurs. What do you think? If you agree, �I will update it to extract and display the supplied jetton information from the contract state. (The PR will be submitted soon, so please continue with the listing work without any delays) |
@g1nt0ki I have another question. Since we are dealing with lending, we want to display the borrowed amount separately from TVL. If we return the value with the borrowed key, will it be reflected? In helper/compound.js, they have same concept:
|
hi @bhjiwonoh you can check our evaa implementation, for tvl, we pull token balance. For borrowed, we query from smart contract: https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/evaa/index.js |
NOTE
Please enable "Allow edits by maintainers" while putting up the PR.
package-lock.json
file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CIName (to be shown on DefiLlama):
Factorial
Twitter Link:
https://x.com/FactorialFi
List of audit links if any:
1 done
1 progressing
I will update the audit document link later
Website Link:
https://factorial.finance/
Logo (High resolution, will be shown with rounded borders):
Current TVL:
--- ton ---
USDT 127.24 k
TON 31.42 k
Total: 158.66 k
--- tvl ---
USDT 127.24 k
TON 31.42 k
Total: 158.66 k
------ TVL ------
ton 158.66 k
total 158.66 k
Treasury Addresses (if the protocol has treasury)
Chain:
Ton
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
Short Description (to be shown on DefiLlama):
Factorial is built on The Open Network (TON), utilizing its parallelism and scalability to provide a decentralized, permissionless lending solution
Token address and ticker if any:
Category (full list at https://defillama.com/categories) *Please choose only one:
[Lending]
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
Redstone
Implementation Details: Briefly describe how the oracle is integrated into your project:
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):
Github org/user (Optional, if your code is open source, we can track activity):