Skip to content

Commit

Permalink
Update ERC-6123: Refactor rename SDC.sol to SDCSingleTrade.sol
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
cfries authored Aug 1, 2024
1 parent 80c2da0 commit e21527a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ERCS/erc-6123.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ The interface design and reference implementation are based on the following con
- The interface specification is generic enough to handle the case that parties process one or even multiple financial transactions (on a netted base)
- Usually, the valuation of financial trades (e.g. OTC Derivatives) will require advanced valuation methodology to determine the market value. This is why the concept might rely on an external market data source and hosted valuation algorithms
- A pull-based valuation-based oracle pattern can be implemented by using the provided callback pattern (methods: `initiateSettlement`, `performSettlement`)
- The reference implementation `SDC.sol` is based on a state-machine pattern where the states also serve as guards (via modifiers) to check which method is allowed to be called at a particular given process and trade state
- The reference implementation `SDCSingleTrade.sol` considers a single trade and is based on a state-machine pattern where the states also serve as guards (via modifiers) to check which method is allowed to be called at a particular given process and trade state
- The interface allows the extension to multiple trades with common (netted) settlement.

### State diagram of trade and process states

Expand All @@ -254,7 +255,7 @@ Life-cycle unit tests based on the sample implementation and usage of [ERC-20](.

## Reference Implementation

An abstract contract class SDC.sol as well as a full reference implementation SDCPledgedBalance.sol for an OTC-Derivative is provided and is based on the [ERC-20](./eip-20.md) token standard.
An abstract contract class `SDCSingleTrade.sol` for single trade SDCs as well as a full reference implementation SDCPledgedBalance.sol for an OTC-Derivative is provided and is based on the [ERC-20](./eip-20.md) token standard.
See folder `/assets/contracts`, more explanation on the implementation is provided inline.

### Trade Data Specification (suggestion)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: CC0-1.0
pragma solidity >=0.8.0 <0.9.0;

import "./SDC.sol";
import "./SDCSingleTrade.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC20Settlement.sol";
Expand Down

0 comments on commit e21527a

Please sign in to comment.