type RealWorldAssetsState {
accounts: [Account!]!
principalLenderAccountId: ID! # Account.id (That relates to the Maker account)
spvs: [Spv!]!
feeTypes: [ServiceProvider!]!
fixedIncomeTypes: [FixedIncomeType!]!
portfolio: [Asset!]!
transactions: [GroupTransaction!]!
}
union Asset = FixedIncome | Cash
type FixedIncome {
id: ID!
fixedIncomeTypeId: ID! # FixedIncomeType.id
name: String!
spvId: ID! # Spv.id
maturity: DateTime!
purchaseDate: DateTime! # Weighted average of underlying transactions
notional: Float! # Face value
purchasePrice: Float! # purchaseProceeds / notional
purchaseProceeds: Float! # Total cash outflow spent on purchases
totalDiscount: Float! # notional - purchaseProceeds
marketValue: Float!
annualizedYield: Float! # (Purchase Price / ( Notional - Purchase Price)) x (365 / Days to Maturity ) * 100
realizedSurplus: Float!
totalSurplus: Float!
ISIN: String
CUSIP: String
coupon: Float
currentValue(currentDate: DateTime!): Float # (Current Date - Purchase Date) / ((Maturity Date - Current Date) * Total Discount + Purchase Proceeds
}
type Cash {
id: ID!
spvId: ID! # Spv.id
currency: String! # Will always be "USD" for version 1
}
type FixedIncomeType {
id: ID!
name: String!
}
type Spv {
id: ID!
name: String!
}
type BaseTransaction {
id: ID!
assetId: ID! # Asset.id
amount: Float!
entryTime: DateTime!
tradeTime: DateTime
settlementTime: DateTime
txRef: String
accountId: ID # Account.id
counterPartyAccountId: ID # Account.id
}
type Account {
id: ID!
reference: String! # e.g. bank account number or ETH address
label: String
}
union GroupTransaction =
| PrincipalDrawGroupTransaction
| PrincipalReturnGroupTransaction
| AssetPurchaseGroupTransaction
| AssetSaleGroupTransaction
| InterestDrawGroupTransaction
| InterestReturnGroupTransaction
| FeesPaymentGroupTransaction
type PrincipalDrawGroupTransaction {
id: ID!
type: GroupTransactionType!
cashTransaction: BaseTransaction
}
type PrincipalReturnGroupTransaction {
id: ID!
type: GroupTransactionType!
cashTransaction: BaseTransaction
}
type AssetPurchaseGroupTransaction {
id: ID!
type: GroupTransactionType!
fixedIncomeTransaction: BaseTransaction
}
type AssetSaleGroupTransaction {
id: ID!
type: GroupTransactionType!
fixedIncomeTransaction: BaseTransaction
}
type InterestDrawGroupTransaction {
id: ID!
type: GroupTransactionType!
interestTransaction: BaseTransaction
}
type InterestReturnGroupTransaction {
id: ID!
type: GroupTransactionType!
interestTransaction: BaseTransaction
}
type FeesPaymentGroupTransaction {
id: ID!
type: GroupTransactionType!
feeTransactions: [BaseTransaction]
}
enum CashGroupTransactionType {
PrincipalDraw
PrincipalReturn
}
enum FixedIncomeGroupTransactionType {
AssetPurchase
AssetSale
InterestDraw # Payment from Borrower to Arranger (If there is a coupon)
InterestReturn # Payment from Arranger to Maker
FeesPayment
}
union GroupTransactionType =
| CashGroupTransactionType
| FixedIncomeGroupTransactionType
type ServiceProvider {
id: ID!
name: String!
feeType: String!
accountId: ID! # Account.id
}
type TransactionFee {
serviceProviderId: ID!
amount: Float!
}
scalar DateTime
EDIT_ACCOUNT
Edit an existing account.
Reducer Exceptions
RwaAccountNotFound
input EditAccountInput {
id: ID!
reference: String # e.g. bank account number or ETH address
label: String
}
DELETE_ACCOUNT
Delete an existing account.
Reducer Exceptions
RwaAccountNotFound
input DeleteAccountInput {
id: ID!
}