defi-basel-framework
所属分类:DeFi
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2023-09-24 15:26:26
上 传 者:
sh-1993
说明: 硕士论文“去中心化金融协议的资本充足率”的源代码,
(Source code for the Master Thesis, "Capital Adequacy Ratios of Decentralized Finance Protocols",)
文件列表:
.env.example (139, 2023-11-06)
LICENSE (1070, 2023-11-06)
Master_Thesis.pdf (16227815, 2023-11-06)
data/ (0, 2023-11-06)
data/base.py (839, 2023-11-06)
data/models.py (3224, 2023-11-06)
data/protocols/ (0, 2023-11-06)
data/protocols/0x.json (72, 2023-11-06)
data/protocols/0xbitcoin.json (71, 2023-11-06)
data/protocols/1inch-network.json (1077, 2023-11-06)
data/protocols/1world.json (72, 2023-11-06)
data/protocols/aave.json (3927, 2023-11-06)
data/protocols/aavegotchi.json (72, 2023-11-06)
data/protocols/abracadabra.json (976, 2023-11-06)
data/protocols/abyss.json (72, 2023-11-06)
data/protocols/adtoken.json (73, 2023-11-06)
data/protocols/aelf.json (73, 2023-11-06)
data/protocols/aeternity.json (71, 2023-11-06)
data/protocols/agrello.json (71, 2023-11-06)
data/protocols/aichain.json (71, 2023-11-06)
data/protocols/aidcoin.json (72, 2023-11-06)
data/protocols/airswap.json (73, 2023-11-06)
data/protocols/alchemix.json (1393, 2023-11-06)
data/protocols/alien-worlds.json (72, 2023-11-06)
data/protocols/alongside-crypto-market-index.json (71, 2023-11-06)
data/protocols/amlt.json (73, 2023-11-06)
data/protocols/amp.json (72, 2023-11-06)
data/protocols/ampleforth.json (73, 2023-11-06)
data/protocols/angle.json (71, 2023-11-06)
data/protocols/ankr.json (73, 2023-11-06)
data/protocols/apecoin.json (73, 2023-11-06)
data/protocols/appcoins.json (73, 2023-11-06)
data/protocols/arcblock.json (72, 2023-11-06)
data/protocols/auctus.json (73, 2023-11-06)
data/protocols/aurora.json (72, 2023-11-06)
data/protocols/axie-infinity.json (73, 2023-11-06)
data/protocols/babb.json (72, 2023-11-06)
data/protocols/balancer.json (30676, 2023-11-06)
... ...
# Master Thesis
Source code for the Master Thesis,
*Capital Adequacy Ratios of Decentralized Finance Protocols*
## Prerequisites
### Install Docker Compose
This codebase uses Docker Compose, see [the installation guide](https://docs.docker.com/compose/install/) to install Docker and Docker Compose.
The structure of the Compose file assumes that the Docker supports version 3.x Compose files, see [the Compose and Docker compatibility matrix](https://docs.docker.com/compose/compose-file/compose-file-v3/) if you have problems running the compose commands.
### Environment Variables
You need to create a `.env` file that contains the following variables:
```.env
# Ethereum
ETHERSCAN_TOKEN=[Your Etherscan API token]
# PostgreSQL
POSTGRES_USER=[Username for PostgreSQL]
POSTGRES_PASSWORD=[Password for PostgreSQL]
POSTGRES_HOST=[Hostname for PostgreSQL, e.g. "localhost" or "host.docker.internal"]
POSTGRES_DB=[Database name in PostgreSQL]
POSTGRES_PORT=[Port number for PostgreSQL]
```
where you need to replace the square brackets "[ ]" with the actual variables, e.g., `POSTGRES_PORT=5432`.
The Etherscan API key is not mandatory for running this code base, but Etherscan applies stricter rate limits when not including the API key in the queries.
So either you could [create the key for free](https://docs.etherscan.io/getting-started/viewing-api-usage-statistics) or increase [the backoff parameters in the tracker](services/tracker/src/transfers.py#L25-L26)
You can copy paste the `.env.example` file and use this as a template.
## Usage
To run all services:
```bash
docker-compose up --build
```
If you are hosting the PostgreSQL in another host, you may want to run only the `tracker` and `server` services:
```bash
docker-compose up --build tracker server
```
近期下载者:
相关文件:
收藏者: