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

Feat: Add staking TVL calculation for ParagonsDAO #13083

Merged
merged 4 commits into from
Jan 14, 2025

Conversation

0xTea
Copy link
Contributor

@0xTea 0xTea commented Jan 14, 2025

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.


  • If you would like to add a volume adapter please submit the PR here.
  • If you would like to add a liquidations adapter, please refer to this readme document for details.
  1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
  2. Sorry, We no longer accept fetch adapter for new projects, we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
  3. Please fill the form below only if the PR is for listing a new protocol else it can be ignored/replaced with reason/details about the PR
  4. For updating listing info It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
  5. Do not edit/push package-lock.json file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
  6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap

Name (to be shown on DefiLlama):

ParagonsDAO

Twitter Link:

https://x.com/ParagonsDAO

List of audit links if any:

https://github.com/Zellic/publications/blob/master/PDT%20Staking%20V2%20-%20Zellic%20Audit%20Report.pdf
https://hashlock.com/audits/paragonsdao

Website Link:

https://app.paragonsdao.com

Logo (High resolution, will be shown with rounded borders):

paragonsLogo

Current TVL:

10.06 M

Treasury Addresses (if the protocol has treasury)
  '0x111174220De3bf88331b22D2abF38aD0FC8f1151',  // Paragons: Buybacks
  '0x11110A1E22c2b9D147909436D1f58303EEE34971',  // Paragons: Treasury
  '0x11117FA34c8f660B9B804B85eBe891D0c05BF9C9',  // Paragons: Vault
  '0x11116B04C19aC7266c856CdC623B2903e102218d',  // Paragons: Operations
  '0x1111ce4E7142C988F031827319cB84257Ae6Fc29',  // Paragons: Game Cove Treasury
  '0xD9a1bDC9e0574a11D80192708ffF17CFD9D08ad2',  // Paragons: Foundation Treasury
  '0x111128337440C6AD54eb22bd69E51c44A4946347',  // Paragons: Gear
  '0x1111c668fba11EA5fB2b4BCF6d3a2850A334610E',  // Paragons: Portal
  '0x7dFd5BD3Cbc1Aa89Ba7f03A7518D682Fe1f919ab',  // Paragons: Trading
  '0x51c82def6e6b6adf47328385e564f66b5c1e5cf0',  // Paragons: Execution 
  '0xFc747443327936C8d3d5A1Dca4dd45CC94Aa2349',  // Paragons: Execution 
  '0x19b716be72ac362947e3cd474c4dc5b9ddebf170',  // Paragons: Execution 
  '0xeDE45f977bedd1C2e6f9d0F4d5e49558F347332E',  // Paragons: Execution 
  '0xde6789416001dB6F295E47D5C58B9e17DE70cE65',  // Paragons: Execution 
  '0xaEA5BF133e9715c0bcCB930aAc0B2e03016f6fa7',  // Paragons: Hot Wallet 
Chain:

BASE AND ETH MAINNET

Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)

https://www.coingecko.com/en/coins/paragonsdao

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)

https://coinmarketcap.com/currencies/paragonsdao/

Short Description (to be shown on DefiLlama):

We’re a gaming community focused on simplifying web3 gaming for the masses and sharing the assets, analytics, and infrastructure that help you unleash your potential with premier games

Token address and ticker if any:

0x375abb85c329753b1ba849a601438ae77eec9893 ETH
0xeff2a458e464b07088bdb441c21a42ab4b61e07e BASE

Category (full list at https://defillama.com/categories) *Please choose only one:

https://defillama.com/protocols/staking

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):
methodology (what is being counted as tvl, how is tvl being calculated):

TVL of ParagonsDAO corresponds to the staking of PDT tokens in the staking contract.

Github org/user (Optional, if your code is open source, we can track activity):

ParagonsDAO

@llamabutler
Copy link

The adapter at projects/paragons-dao exports TVL:

base-staking              10.06 M
staking                   10.06 M
base                      0

total                    0 

@llamabutler
Copy link

Error while running adapter at projects/paragons-dao:

Error: 
    Unknown chain(s): paragonsdao
    Note: if you think that the chain is correct but missing from our list, please add it to 'projects/helper/chains.json' file
    
Error saving cache: Error: ENOENT: no such file or directory, open '/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/node_modules/@defillama/sdk/build/util/local_cache/zlib-1.0/BlockCache.json'

@llamabutler
Copy link

The adapter at projects/paragons-dao exports TVL:

base-staking              10.00 M
staking                   10.00 M
base                      0

total                    0 

@0xpeluche 0xpeluche self-assigned this Jan 14, 2025
@0xpeluche
Copy link
Contributor

gm, thanks for the PR. Isn't there also staking on Ethereum? Currently, in the PR, only the Base chain is represented.
It is also possible to use a 'staking' helper so the code can be refactored like this https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/helper/staking.js#L10 :

const { staking } = require('../helper/staking');

const stakingContract = '0x51e025cb3ee0b99a84f7fb80994198281e29aa3e';
const stakedToken = '0xeff2A458E464b07088bDB441C21A42AB4b61e07E';

module.exports = {
  methodology: 'TVL of ParagonsDAO corresponds to the staking of PDT tokens in the staking contract.',
  start: 18751707, // Update with the block or timestamp when staking started
  base: {
    tvl: async () => ({}), // leave protocol TVL as empty
    staking: staking(stakingContract, stakedToken),
  },
};

@llamabutler
Copy link

The adapter at projects/paragons-dao exports TVL:

base-staking              10.26 M
staking                   10.26 M
base                      0

total                    0 

@0xTea
Copy link
Contributor Author

0xTea commented Jan 14, 2025

gm, thanks for the PR. Isn't there also staking on Ethereum? Currently, in the PR, only the Base chain is represented. It is also possible to use a 'staking' helper so the code can be refactored like this https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/helper/staking.js#L10 :

const { staking } = require('../helper/staking');

const stakingContract = '0x51e025cb3ee0b99a84f7fb80994198281e29aa3e';
const stakedToken = '0xeff2A458E464b07088bDB441C21A42AB4b61e07E';

module.exports = {
  methodology: 'TVL of ParagonsDAO corresponds to the staking of PDT tokens in the staking contract.',
  start: 18751707, // Update with the block or timestamp when staking started
  base: {
    tvl: async () => ({}), // leave protocol TVL as empty
    staking: staking(stakingContract, stakedToken),
  },
};

Hi have updated for simpler code as suggested and we have sunset staking on mainnet no more rewards are distributed through that contract but there still might be some stakers whom have left there tokens not sure its applies any more

@0xpeluche 0xpeluche merged commit 8434264 into DefiLlama:main Jan 14, 2025
1 check passed
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