Skip to content

Fix morpho decimal place issue#134

Merged
taylanpince merged 3 commits intomasterfrom
sync-pool-tokens
Mar 25, 2026
Merged

Fix morpho decimal place issue#134
taylanpince merged 3 commits intomasterfrom
sync-pool-tokens

Conversation

@matt416
Copy link
Copy Markdown
Contributor

@matt416 matt416 commented Mar 25, 2026

The sync tool was incorrectly using the underlying asset decimals as the vault decimals, so while while USDC has 6 decimals, the vaults had 18, incorrectly showing the total user asset value to be significantly inflated

matt416 added 3 commits March 24, 2026 22:01
sync-morpho-v1-tokens.ts fetches from Morpho v1 API (vaults endpoint),
same filtering as v2: top 20 by TVL per chain, major assets only.
V1 vaults have significantly higher TVLs (up to $445M).
16 new vaults added across 5 chains.

Add protocol tagging and Morpho/trails token sync scripts

- sync-aave-tokens.ts: Add protocol:"aave" to all new and existing
  aTokens (4 new, 273 tagged across 9 chains)
- sync-morpho-tokens.ts: Fetch top 20 Morpho vaults per chain by TVL
  from Morpho GraphQL API, filtered to major assets (41 added)
- sync-trails-earn-pool-tokens.ts: Read pools.json as trails source,
  deduping against aave/morpho tokens (106 added, 94 deduped)

Rename pools.json to trails-earn-pools-data.json
@matt416 matt416 requested a review from taylanpince March 25, 2026 12:58
@taylanpince taylanpince merged commit a6619d6 into master Mar 25, 2026
2 checks passed
@taylanpince taylanpince deleted the sync-pool-tokens branch March 25, 2026 18:10
taylanpince pushed a commit that referenced this pull request Apr 30, 2026
* Add tools to get morpho vaults, and sync static trails earn list

sync-morpho-v1-tokens.ts fetches from Morpho v1 API (vaults endpoint),
same filtering as v2: top 20 by TVL per chain, major assets only.
V1 vaults have significantly higher TVLs (up to $445M).
16 new vaults added across 5 chains.

Add protocol tagging and Morpho/trails token sync scripts

- sync-aave-tokens.ts: Add protocol:"aave" to all new and existing
  aTokens (4 new, 273 tagged across 9 chains)
- sync-morpho-tokens.ts: Fetch top 20 Morpho vaults per chain by TVL
  from Morpho GraphQL API, filtered to major assets (41 added)
- sync-trails-earn-pool-tokens.ts: Read pools.json as trails source,
  deduping against aave/morpho tokens (106 added, 94 deduped)

Rename pools.json to trails-earn-pools-data.json

* Restore the removed tokens lost in rebase

* Fix morpho vault decimals
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.

2 participants