-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
200 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Bridge Aggregator | ||
|
||
Standard table definitions for bridge aggregator protocols that route users across different bridge protocols. | ||
|
||
## Version: 1.0.0-alpha | ||
|
||
### Tokens | ||
|
||
List of tokens supported by the bridge aggregator. | ||
|
||
| Property | Description | Type | | ||
|-------------------------|-----------------------------------------------------------|--------| | ||
| chain_id | The blockchain ID where the token resides. | number | | ||
| token_address | The contract address of the token. | string | | ||
| token_name | The name of the token. | string | | ||
| token_symbol | The symbol of the token. | string | | ||
| decimals | The decimal places of the token. | number | | ||
|
||
### Token Snapshot | ||
|
||
Snapshot of token-level metrics in the aggregator. | ||
|
||
| Property | Description | Type | | ||
|-------------------------|-----------------------------------------------------------|--------| | ||
| timestamp | The timestamp of the snapshot. | number | | ||
| block_date | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots). | date | | ||
| chain_id | The blockchain ID where the token resides. | number | | ||
| token_address | The contract address of the token. | string | | ||
| volume_amount | The total volume of the token bridged, decimal normalized. | number | | ||
| volume_usd | The total volume in USD. | number | | ||
| fees | The fees collected in token amount, decimal normalized. | number | | ||
| fees_usd | The fees collected in USD. | number | | ||
| incentive_amount | The amount of incentives distributed, decimal normalized. | number | | ||
| incentive_usd | The amount of incentives distributed in USD. | number | | ||
|
||
### Bridge Transactions | ||
|
||
Transaction-level data for bridge aggregator operations. | ||
|
||
| Property | Description | Type | | ||
|-------------------------|-----------------------------------------------------------|--------| | ||
| timestamp | The timestamp of the transaction. | number | | ||
| source_chain_id | The source chain ID. | number | | ||
| destination_chain_id | The destination chain ID. | number | | ||
| source_transaction_hash | The transaction hash on the source chain. | string | | ||
| destination_transaction_hash | The transaction hash on the destination chain. | string | | ||
| source_user_address | The user's address on the source chain. | string | | ||
| destination_user_address | The user's address on the destination chain. | string | | ||
| input_tokens | Array of token addresses used as input. | [string] | | ||
| input_token_amounts | Array of input token amounts, decimal normalized. | [number] | | ||
| input_token_fees | Array of fees paid in input tokens, decimal normalized. | [number] | | ||
| output_tokens | Array of token addresses received as output. | [string] | | ||
| output_token_amounts | Array of output token amounts, decimal normalized. | [number] | | ||
|
||
> Note: This markdown file is auto-generated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
{ | ||
"schema": "Bridge Aggregator", | ||
"description": "Standard table definitions for bridge aggregator protocols that route users across different bridge protocols.", | ||
"protocolCategory": ["Bridge Aggregator"], | ||
"version": "1.0.0-alpha", | ||
"tables": [ | ||
{ | ||
"label": "Tokens", | ||
"tableName": "bridge_aggregator_tokens", | ||
"aggregation": "none", | ||
"uniqueKey": ["chain_id", "token_address"], | ||
"description": "List of tokens supported by the bridge aggregator.", | ||
"properties": { | ||
"chain_id": { | ||
"description": "The blockchain ID where the token resides.", | ||
"type": "number" | ||
}, | ||
"token_address": { | ||
"description": "The contract address of the token.", | ||
"type": "string" | ||
}, | ||
"token_name": { | ||
"description": "The name of the token.", | ||
"type": "string" | ||
}, | ||
"token_symbol": { | ||
"description": "The symbol of the token.", | ||
"type": "string" | ||
}, | ||
"decimals": { | ||
"description": "The decimal places of the token.", | ||
"type": "number" | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "Token Snapshot", | ||
"tableName": "bridge_aggregator_token_metrics", | ||
"aggregation": "daily", | ||
"uniqueKey": ["chain_id", "token_address", "block_date"], | ||
"description": "Snapshot of token-level metrics in the aggregator.", | ||
"properties": { | ||
"timestamp": { | ||
"description": "The timestamp of the snapshot.", | ||
"type": "number" | ||
}, | ||
"block_date": { | ||
"description": "The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots).", | ||
"type": "date" | ||
}, | ||
"chain_id": { | ||
"description": "The blockchain ID where the token resides.", | ||
"type": "number" | ||
}, | ||
"token_address": { | ||
"description": "The contract address of the token.", | ||
"type": "string" | ||
}, | ||
"volume_amount": { | ||
"description": "The total volume of the token bridged, decimal normalized.", | ||
"type": "number" | ||
}, | ||
"volume_usd": { | ||
"description": "The total volume in USD.", | ||
"type": "number" | ||
}, | ||
"fees": { | ||
"description": "The fees collected in token amount, decimal normalized.", | ||
"type": "number" | ||
}, | ||
"fees_usd": { | ||
"description": "The fees collected in USD.", | ||
"type": "number" | ||
}, | ||
"incentive_amount": { | ||
"description": "The amount of incentives distributed, decimal normalized.", | ||
"type": "number" | ||
}, | ||
"incentive_usd": { | ||
"description": "The amount of incentives distributed in USD.", | ||
"type": "number" | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "Bridge Transactions", | ||
"tableName": "bridge_aggregator_transactions", | ||
"aggregation": "transaction", | ||
"uniqueKey": ["source_transaction_hash", "destination_transaction_hash"], | ||
"description": "Transaction-level data for bridge aggregator operations.", | ||
"properties": { | ||
"timestamp": { | ||
"description": "The timestamp of the transaction.", | ||
"type": "number" | ||
}, | ||
"source_chain_id": { | ||
"description": "The source chain ID.", | ||
"type": "number" | ||
}, | ||
"destination_chain_id": { | ||
"description": "The destination chain ID.", | ||
"type": "number" | ||
}, | ||
"source_transaction_hash": { | ||
"description": "The transaction hash on the source chain.", | ||
"type": "string" | ||
}, | ||
"destination_transaction_hash": { | ||
"description": "The transaction hash on the destination chain.", | ||
"type": "string" | ||
}, | ||
"source_user_address": { | ||
"description": "The user's address on the source chain.", | ||
"type": "string" | ||
}, | ||
"destination_user_address": { | ||
"description": "The user's address on the destination chain.", | ||
"type": "string" | ||
}, | ||
"input_tokens": { | ||
"description": "Array of token addresses used as input.", | ||
"type": "[string]" | ||
}, | ||
"input_token_amounts": { | ||
"description": "Array of input token amounts, decimal normalized.", | ||
"type": "[number]" | ||
}, | ||
"input_token_fees": { | ||
"description": "Array of fees paid in input tokens, decimal normalized.", | ||
"type": "[number]" | ||
}, | ||
"output_tokens": { | ||
"description": "Array of token addresses received as output.", | ||
"type": "[string]" | ||
}, | ||
"output_token_amounts": { | ||
"description": "Array of output token amounts, decimal normalized.", | ||
"type": "[number]" | ||
} | ||
} | ||
} | ||
] | ||
} |