Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amr080/smart-derivatives
XFT's algorithmic post-trade process against SDC state machine
https://github.com/amr080/smart-derivatives
alex alexander-reed blockchain bonds crypto defi fintech market-making onchain options reed rwa stocks synthetics tokenization web3 x-financial-technologies xfintech xft
Last synced: about 2 months ago
JSON representation
XFT's algorithmic post-trade process against SDC state machine
- Host: GitHub
- URL: https://github.com/amr080/smart-derivatives
- Owner: amr080
- Created: 2024-06-02T21:52:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-14T04:40:16.000Z (7 months ago)
- Last Synced: 2024-06-14T05:43:20.709Z (7 months ago)
- Topics: alex, alexander-reed, blockchain, bonds, crypto, defi, fintech, market-making, onchain, options, reed, rwa, stocks, synthetics, tokenization, web3, x-financial-technologies, xfintech, xft
- Homepage: https://linktr.ee/xft.reed
- Size: 127 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# X Financial Technologies
ERC-6123, Smart Derivative Contract
![XFT Smart Derivatives](Smart%Derivative%Sequence%Diagram.jpg)
## Description
The reference SDC implementation can be unit tested with Hardhat to understand the trade process logic.
### Compile and run tests with Hardhat
We provide the essential steps to compile the contracts and run the provided unit tests.
### Provided Contracts and Tests
- `contracts/ISDC.sol` - Interface contract
- `contracts/SDC.sol` - SDC abstract contract for an OTC Derivative
- `contracts/SDCPledgedBalance.sol` - SDC full implementation for an OTC Derivative
- `contracts/IERC20Settlement.sol` - Interface (extending the ERC-20) for settlement tokens used in `SDCPledgedBalance`.
- `contracts/ERC20Settlement.sol` - Mintable settlement token contract implementing `IERC20Settlement` for unit tests
- `test/SDCTests.js` - Unit tests for the life-cycle of the sdc implementation### Compile and run tests with Hardhat
Install dependencies:
```shell
npm i
```Compile:
```shell
npx hardhat compile
```Run all tests:
```shell
npx hardhat test
```### Configuration files
- `package.js` - Javascript package definition.
- `hardhat.config.js` - Hardhat config.### Used javascript-based testing libraries for solidity
- `ethereum-waffle`: Waffle is a Solidity testing library. It allows you to write tests for your contracts with JavaScript.
- `chai`: Chai is an assertion library and provides functions like expect.
- `ethers`: This is a popular Ethereum client library. It allows you to interface with blockchains that implement the Ethereum API.
- `solidity-coverage`: This library gives you coverage reports on unit tests with the help of Istanbul.