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 TONNEL Network #9183

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Add TONNEL Network #9183

merged 5 commits into from
Mar 5, 2024

Conversation

SaberDoTcodeR
Copy link
Contributor

Name (to be shown on DefiLlama):
  • Tonnel Network
Twitter Link:
List of audit links if any:
Website Link:
Logo (High resolution, will be shown with rounded borders):
Current TVL:
  • 775.19 k
Treasury Addresses (if the protocol has treasury)
Chain:
  • TON Blockchain
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)
  • 29091
Short Description (to be shown on DefiLlama):
  • TONNEL uses ZK technology to bring privacy to the SocialFi ecosystem on TON Blockchain which is deeply integrated into Telegram.
Token address and ticker if any:
  • ticker: TONNEL
  • address EQDNDv54v_TEU5t26rFykylsdPQsv5nsSZaH_v7JSJPtMitv
Category (full list at https://defillama.com/categories) *Please choose only one:
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
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):
  • Tornado Cash
methodology (what is being counted as tvl, how is tvl being calculated):
  • Balances of mixer pools are calculated(similar to Tornado Adapter)
Github org/user (Optional, if your code is open source, we can track activity):

@llamatester
Copy link

Error while running adapter at projects/tonnel:

Error: Failed to get https://tonapi.io/v2/accounts/EQASyc8d2DjZHrFevnF432NRLc4qwh6HGUPAbMvbofMkeRZl
Truncated error stack:

    at get (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/helper/http.js:32:11)
    at async getTonBalance (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/helper/chain/ton.js:6:15)
    at async sumTokensAccount (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/helper/chain/ton.js:12:21)
    at async Promise.all (index 7)
    at async sumTokens (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/helper/chain/ton.js:31:3)
    at async getTvl (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/test.js:64:23)
    at async /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/test.js:160:9
    at async Promise.all (index 0)
    at async Promise.all (index 0)

@SaberDoTcodeR
Copy link
Contributor Author

Hi, I think this issue is related to tonapi.io rate limit👀 I guess you run it on whitelist IP so it won't have this issue on prod

@llamatester
Copy link

Error while running adapter at projects/tonnel:

Error: Failed to get https://tonapi.io/v2/accounts/EQBZ0-2-isPEN_lIyg9eqXO_RFWrl_PWIJq5K6SVcUwne23W/jettons?currencies=usd
Truncated error stack:

    at get (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/helper/http.js:32:11)
    at async sumTokensAccount (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/helper/chain/ton.js:15:24)
    at async sumTokens (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/helper/chain/ton.js:32:5)
    at async getTvl (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/test.js:67:23)
    at async /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/test.js:163:9
    at async Promise.all (index 0)
    at async Promise.all (index 0)
    at async /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/test.js:208:3

@SaberDoTcodeR
Copy link
Contributor Author

@g1nt0ki These TONNEL pools are not staking pools👀 These are mixer pools, our staking contract is separate, and I'll add it later.

@g1nt0ki
Copy link
Member

g1nt0ki commented Mar 5, 2024

@g1nt0ki These TONNEL pools are not staking pools👀 These are mixer pools, our staking contract is separate, and I'll add it later.

hi @SaberDoTcodeR we can count it either under staking or not at all :( https://docs.llama.fi/list-your-project/what-to-include-as-tvl

the issue is we cant count your own tokens as tvl, aslo got some links as to what is GRAM & DFC ?

add sleep between tvl and staking to avoid rate limit
@llamatester
Copy link

The adapter at projects/tonnel exports TVL:

ton                       558.45 k

total                    558.45 k 

@llamatester
Copy link

The adapter at projects/tonnel exports TVL:

ton                       569.41 k

total                    569.41 k 

@g1nt0ki
Copy link
Member

g1nt0ki commented Mar 5, 2024

@SaberDoTcodeR unsure why, part of the issue is, tonapi suddenly started this strict rate limiting,

other issue is, you cant do async loop as, staking wont be part of exported object if delayed and hence skipped.

@llamatester
Copy link

The adapter at projects/tonnel exports TVL:

ton-staking               318.14 k
ton                       569.41 k
staking                   318.14 k

total                    569.41 k 

@g1nt0ki g1nt0ki merged commit 17b0801 into DefiLlama:main Mar 5, 2024
1 check passed
@g1nt0ki
Copy link
Member

g1nt0ki commented Mar 5, 2024

@SaberDoTcodeR thanks for the PR

@SaberDoTcodeR
Copy link
Contributor Author

@g1nt0ki, thank you for taking care of rate limit.

Should I now make a PR here?

@g1nt0ki
Copy link
Member

g1nt0ki commented Mar 6, 2024

no, we take care of it

@SaberDoTcodeR
Copy link
Contributor Author

SaberDoTcodeR commented Mar 8, 2024

@g1nt0ki Hi, I think there is an issue with our tracker:(
https://defillama.com/protocol/tonnel-network

YeeeeeHan pushed a commit to parasail-network/DefiLlama-Adapters that referenced this pull request Apr 24, 2024
* Add TONNEL Network

* code refactor, count staked tonnel under staking

* fix address format

add sleep between tvl and staking to avoid rate limit

* fix staking

* code refactor

---------

Co-authored-by: g1nt0ki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants