PiFinance by KOSASIH is licensed under Creative Commons Attribution 4.0 International
The core backend implementation of the PiFinance platform, including the stablecoin mechanism, smart contracts for savings and loans, and the peer-to-peer lending system.
PiFinance-Core is a decentralized finance (DeFM application designed for managing stablecoins. It provides features for minting, burning, trading stablecoins, and monitoring system health. Built on the Ethereum blockchain, it aims to facilitate seamless financial transactions in a secure and efficient manner.
git clone https://github.com/KOSASIH/PiFinance-Core.git
cd PiFinance-Core
npm install
Create a .env
file in the root directory and configure your environment variables. You can use the provided .env.example
as a reference.
npm start
Once the application is running, you can interact with it through the API endpoints. Use tools like Postman or cURL to make requests.
curl -X POST http://localhost:3000/mint -H "Content-Type: application/json" -d '{"amount": 100}'
Method | Endpoint | Description |
---|---|---|
POST | /mint |
Mint stablecoins |
POST | /burn |
Burn stablecoins |
POST | /liquidity/add |
Add liquidity to the pool |
GET | /health |
Check the health of the application |
GET | /metrics |
Get application metrics |
To run the tests for the application, use the following command:
npm test
You can also generate a coverage report with:
npm run coverage
The application includes built-in monitoring features. Metrics can be accessed at the /metrics
endpoint, and health checks can be performed at the /health
endpoint.
Contributions are welcome! Please follow these steps:
git checkout -b feature/YourFeature
).git commit -m 'Add some feature'
).git push origin feature/YourFeature
).This project is licensed under the Apache 2.0 License. See the LICENSE file for details.