Skip to content

Add TR.ENERGY yield adapter (TRON) #1896

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

trxadm
Copy link

@trxadm trxadm commented Jun 2, 2025

TR.ENERGY is a non-custodial platform on TRON that automates energy delegation.
Users stake TRX on their own wallets and delegate energy rights to our hotspot to save on transaction costs.

This adapter returns estimated APY and TVL for the TRX staking via TR.ENERGY based on on-chain balances and TRX price.

Hotspot: TMP3f4UtGBc3dMAj7eA2afzyULaehN3uhZ
Website: https://tr.energy
Explorer: https://tronscan.org/#/address/TMP3f4UtGBc3dMAj7eA2afzyULaehN3uhZ

@llamatester
Copy link

Error while running trenergy.js adapter:

Test Suites: 2 failed, 2 total
Tests: 0 total
Snapshots: 0 total
Time: 0.764 s
Ran all test suites.

Nb of pools: 1
 

Sample pools:
┌─────────┬────────────────┬────────┬────────────┬────────┬────────────┬─────────┐
│ (index) │ pool           │ chain  │ project    │ symbol │ tvlUsd     │ apyBase │
├─────────┼────────────────┼────────┼────────────┼────────┼────────────┼─────────┤
│ 0       │ 'trenergy-trx' │ 'Tron' │ 'trenergy' │ 'TRX'  │ 43719907.4 │ 18.36   │
└─────────┴────────────────┴────────┴────────────┴────────┴────────────┴─────────┘
}

@slasher125
Copy link
Collaborator

slasher125 commented Jun 4, 2025

@trxadm i think there is a misunderstanding about how the yield server works. pls check the readme (no need to add test scripts, we have these!)

hardcoded staking values and apr??

trxadm added 3 commits June 13, 2025 14:00
Add dynamic TRX price from core.tr.energy and calculate TVL from total_energy.
Fetch TRX/USDT rate from core.tr.energy instead of hardcoding
Delete test.js
@trxadm
Copy link
Author

trxadm commented Jun 13, 2025

thanks for the comments!

We’ve removed the test script and replaced the hardcoded values with live data:

TRX/USDT rate is now fetched from https://core.tr.energy/api/config

TVL is dynamically calculated from total_energy in https://core.tr.energy/api/energy-stats

Final TVL = total_energy / 10.52 × TRX price from the config API

All logic is now based on live API data, no hardcoded values remain

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