-
Notifications
You must be signed in to change notification settings - Fork 3
fix: infer hardcoded oracle assumptions in path warnings #499
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
Changes from all commits
98406d7
9bb8d17
30c771d
02f5db2
f5d7d9a
4bf763e
ed14c90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,11 +9,15 @@ export type SingleChainERC20Basic = { | |
| address: string; | ||
| }; | ||
|
|
||
| // a token can be "linked" to a pegged asset, we use this to estimate the USD value for markets if it's not presented. | ||
| // A token can be linked to a loose reference asset. USD, ETH, and BTC currently | ||
| // have price fallback sources; the broader enum is also used to explain oracle | ||
| // path assumptions when scanner feeds use an anchor symbol instead of the token. | ||
| export enum TokenPeg { | ||
| USD = 'USD', | ||
| ETH = 'ETH', | ||
| BTC = 'BTC', | ||
| XRP = 'XRP', | ||
| HYPE = 'HYPE', | ||
|
Comment on lines
+19
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separate oracle anchors from price-estimation pegs.
Also applies to: 786-786, 829-829 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| export type ERC20Token = { | ||
|
|
@@ -27,7 +31,8 @@ export type ERC20Token = { | |
| isFactoryToken?: boolean; | ||
| source?: TokenSource; | ||
|
|
||
| // this is not a "hard peg", instead only used for market supply / borrow USD value estimation | ||
| // Not a hard-peg guarantee. It may backfill market USD values only when a | ||
| // supported reference price exists, and it may label oracle path assumptions. | ||
| peg?: TokenPeg; | ||
| }; | ||
|
|
||
|
|
@@ -781,6 +786,7 @@ const supportedTokens = [ | |
| address: '0x5555555555555555555555555555555555555555', | ||
| }, | ||
| ], | ||
| peg: TokenPeg.HYPE, | ||
| }, | ||
| { | ||
| symbol: 'UETH', | ||
|
|
@@ -823,6 +829,7 @@ const supportedTokens = [ | |
| img: require('../imgs/tokens/cbxrp.png') as string, | ||
| decimals: 6, | ||
| networks: [{ chain: base, address: '0xcb585250f852C6c6bf90434AB21A00f02833a4af' }], | ||
| peg: TokenPeg.XRP, | ||
| }, | ||
| { | ||
| symbol: 'cbADA', | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.