-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Add PumpSpace adapter (Avalanche) with V2 + V3 TVL and token mapping support #16805
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?
Conversation
|
The adapter at projects/pumpspace exports TVL: |
|
Who mints bTETHER and what backs it? |
Thanks for the question! bTETHER (bUSDT) is a fully backed wrapped version of USDt (Tether) on Avalanche. Anyone can mint 1:1 by depositing native USDt. The underlying USDt is deposited into Benqi and Euler to earn low-risk yield, and each vault issues receipt tokens representing the collateral. Benqi vault: 0x7D336B49879a173626E51BFF780686D88b8081ec Euler vault: 0x61E8f77eD693d3edeCBCc2dd9c55c1d987c47775 Users can redeem 1:1 for USDt anytime (with a 0.02% unmint fee). |
|
The adapter at projects/pumpspace exports TVL: |
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
projects/aquabank/index.js
Outdated
| ' TVL = USDt underlying represented by Benqi/Euler receipt tokens held in vaults (Benqi: shares*exchangeRate/1e18, Euler: convertToAssets). Staking = bUSDT deposited in BankStaking contracts, reported as USDt via 1:1 mapping.', | ||
| avax: { | ||
| tvl, | ||
| staking, |
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 this as it is doublecounting the underlying in tvl
projects/pumpspace/index.js
Outdated
| // Map wrapped/local tokens to canonical core assets for pricing/aggregation. | ||
| // - bUSDT → USDt (Tether on Avalanche) | ||
| // - WAVAX proxy (0xAB4f...) → canonical WAVAX (0xB31f...) | ||
| function transformAddress(addr) { |
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.
we will add support for these assets so this transform will no longer be required DefiLlama/defillama-server#10877
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
|
Aquabank I’ve removed staking and kept only tvl as requested to avoid double-counting the USDt underlying. PumpSpace – transformAddress I saw your note that support will be added in server (DefiLlama/defillama-server#10877), thanks! One question: if I remove the bUSDT → USDt mapping right now, TVL undercounts because bUSDT isn’t priced as USDt yet. In local tests I see a drop (e.g. usdt 411.46k → 298.30k) when the mapping is removed. The WAVAX proxy → WAVAX mapping can be safely removed (WAVAX gets picked up correctly), but bUSDT still needs the temporary transform until the server-side alias is live. |
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
|
|
||
| // Protocol receipt tokens (convertible to USDt underlying) | ||
| const BENQI_RECEIPT = '0xd8fcDa6ec4Bdc547C0827B8804e89aCd817d56EF' | ||
| const EULER_RECEIPT = '0xa446938b0204Aa4055cdFEd68Ddf0E0d1BAB3E9E' |
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.
we price both of these too, you can just export a balance of the receipt tokens, no need for conversion
projects/pumpspace/index.js
Outdated
| }) | ||
| } | ||
|
|
||
| async function v3FactoryTVL(ts, _block, { [CHAIN]: block }) { |
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 check projects/helper/sushi-trident.js helpers, I think there is some code duplication here
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.
- getTridentTVL() for the Trident/V3 factory
projects/pumpspace/index.js
Outdated
| } | ||
|
|
||
|
|
||
| async function v2FactoryTVL(api) { |
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 check const { getUniTVL } = require('./helper/unknownTokens') I think there is code duplication here
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.
- getUniTVL() for the PumpSpace V2 factory
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
|
|
Thanks for the earlier review @waynebruce0x! Could you please let me know if any further action is needed from my side before merging? Appreciate your time and support as always 🙏 |
projects/aquabank/index.js
Outdated
| } | ||
|
|
||
| // 4) Add both underlyings as USDt | ||
| if (benqiUnderlying > 0n) api.add(USDt, benqiUnderlying) |
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.
we price these vault receipt tokens, you can just export a balance of the receipt tokens, no need for conversion
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.
Got it, thanks! 👍
I’ve updated the adapter to export the raw balances of the Benqi and Euler receipt tokens directly,
removing the manual USDt conversion since they’re already priced server-side.
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
|
On the Aquabank UI it looks like theres more like 600k$ in TVL - what causes the discrepancy? Is it possible for us to count the underlying deposits to Euler and Benqi instead? |
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
|
The adapter at projects/aquabank exports TVL: |
|
The adapter at projects/pumpspace exports TVL: |
Thanks for flagging the discrepancy! Our UI aggregates the USDt collateral that backs bUSDT across our Benqi/Euler vaults. Per your suggestion, I’ll export the raw balances of the vault receipt tokens held by our vault contracts (no manual conversion), so the server can price them directly:
The adapter will sum |
NOTE
Please enable "Allow edits by maintainers" while putting up the PR.
package-lock.jsonfile 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):
PumpSpace
Twitter Link:
https://x.com/pumpspace10000
List of audit links if any:
https://www.cyberscope.io/audits/pumpspace?assessmentIndex=1https://github.com/cyberscope-io/audits/blob/main/pumpspace/dexAudit.pdf
https://github.com/cyberscope-io/audits/blob/main/pumpspace/audit.pdf
Website Link:
https://pumpspace.io/
Logo (High resolution, will be shown with rounded borders):
https://img.pumpspace.io/aquaspace_logo.png
Current TVL:
$ 2,048,553
Treasury Addresses (if the protocol has treasury)
N/A
Chain:
Avalanche (AVAX)
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
None yet — awaiting listing approval.
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)
None yet — awaiting listing approval.
Short Description (to be shown on DefiLlama):
PumpSpace is a decentralized liquidity platform on Avalanche supporting both V2 and V3 AMM models, offering multi-token farms and on-chain yield optimization for community-driven tokens.
Token address and ticker if any:
0x08c4b51e6Ca9Eb89C255F0a5ab8aFD721420e447 Pearl Token (Stargate) PEARL
0xaD4CB79293322c07973ee83Aed5DF66A53214dc6 Shell Token (Stargate) SHELL
0x6c960648d5F16f9e12895C28655cc6Dd73B660f7 BWPM Vault (Stargate) sBWPM
0x6214D13725d458890a8EF39ECB2578BdfCd82170 AquaDolpin Vault (Stargate) sADOL
0x1ea53822f9B2a860A7d20C6D2560Fd07db7CFF85 Clam Token (Stargate) CLAM
0x4ED0A710a825B9FcD59384335836b18C75A34270 Krill Token (Stargate) KRILL
0x3C594084dC7AB1864AC69DFd01AB77E8f65B83B7 bTether bUSDT
0xAB4fBa02a2905a03adA8BD3d493FB289Dcf84024 Wrapped AVAX v10 WAVAX
Category (full list at https://defillama.com/categories) *Please choose only one:
DEXes (Decentralized Exchanges)
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:
PumpSpace relies on its native pool price oracles and TWAP mechanisms embedded within the V3/Trident architecture for price feeds and fair on-chain asset valuation.
forkedFrom (Does your project originate from another project):
v2 : uniswap, v3:Sushi Trident
methodology (what is being counted as tvl, how is tvl being calculated):
TVL is calculated by summing up all token reserves from PumpSpace V2 and V3 (Trident) AMM factories on Avalanche.
To ensure accurate valuation, several address mappings are applied:
bUSDT → USDt (Tether) to aggregate stablecoin liquidity.
WAVAX proxy (0xAB4f...) → canonical WAVAX (0xB31f...).
These mappings prevent duplicate counting of wrapped assets.
Staking values represent single-asset staking of SHELL from the Shell MasterChef contract.
Github org/user (Optional, if your code is open source, we can track activity):