AccountExtension

Protocol.AccountExtension History

Hide minor edits - Show changes to output

Changed lines 1-2 from:
The Account Extension provides a simple accounting system for creating a neighbour connection where no current formal account exists between node owners, or the existing account would be awkward to integrate with the Ripple core payment protocol (eg, it is not kept electronically).
to:
The Account Extension specifies common account types and the way they integrate with the basic protocol.  The formal extension name for use in @@host-status@@ messages is @@ripple-account@@.

!!! Ripple External Account Type

The
Ripple External account allows an existing electronic financial account between two parties to be used in the Ripple network.
Added lines 9-10:
The following fields/values are added to the account data structure specified in [[PaymentProtocol]].
Changed lines 14-23 from:
   "balance": (decimal)
   
"initiator": {
     ("limit": (decimal))
    }
,
    "partner": {
      ("limit": (decimal))
    },
    "precision": (integer),
    ("interest-rate": (decimal),)
    ("agreement": (string))
to:
   "account-type": "ripple-external",
    "external-account-id": (string),
Changed lines 20-29 from:
'''Notes:'''

* these are in addition to core fields
* balance is immutable by direct account-sets, it is a synthetic field calculated from past transactions plus interest
* interest rate is given as a percentage per annum

'''Handling Interest'''

Interest is compounded continuously.
  Accumulated oustanding interest on the account is tacked on to each transaction to keep the balance up-to-date.  For this purpose, there is an additional field on the @@receipt-redeem@@ message:
to:
The balance, credit limits, and other account details are stored in an underlying system by one of the parties, called the account authority, who must always act as the formal initiator of the account (ie, send the initial @@account-request@@).  The account authority's Ripple host must be able to communicate with the underlying accounting system to pre-approve and commit transactions appropriately to enable Ripple payments.  The exact details depend on the nature of the underlying system.


!!! Ripple Mutual Account Type

The Ripple Mutual account provides a simple accounting system for creating a neighbour connection where no current formal account exists between node owners, or the existing account would be awkward to integrate with the Ripple core payment protocol (eg, it is not kept electronically).

'''Account Data Structure'''

The following fields/values are added to the account data structure specified in [[PaymentProtocol]].  Those fields in brackets are optional for any given account.

Changed lines 33-34 from:
  "receipt-redeem": {
    "interest": (decimal),
to:
  "account": {
    "account-type": "ripple-mutual",
    "balance": (decimal)
    "initiator": {
      ("limit": (decimal))
    },
    "partner": {
      ("limit": (decimal))
    },
    "precision": (integer),
    ("interest-rate": (decimal),)
    ("agreement": (string))
Added lines 49-65:
'''Notes:'''

* balance is immutable by direct account-sets, it is a synthetic field calculated from past transactions plus interest
* interest rate is given as a percentage per annum

'''Handling Interest'''

Interest is compounded continuously.  Accumulated oustanding interest on the account is tacked on to each transaction to keep the balance up-to-date.  For this purpose, there is an additional field on the @@receipt-redeem@@ message:

[@
{
  "receipt-redeem": {
    "interest": (decimal),
  }
}
@]

Added line 69:
January 07, 2007, at 04:42 AM by ryan - handling interest
Deleted line 16:
   ("compounding-period": (integer | "monthly" | "yearly"),)
Changed lines 25-42 from:
* balance is immutable by direct account-sets, it is a synthetic field calculated from past transactions plus interest
to:
* balance is immutable by direct account-sets, it is a synthetic field calculated from past transactions plus interest
* interest rate is given as a percentage per annum

'''Handling Interest'''

Interest is compounded continuously.  Accumulated oustanding interest on the account is tacked on to each transaction to keep the balance up-to-date.  For this purpose, there is an additional field on the @@receipt-redeem@@ message:

[@
{
  "receipt-redeem": {
    "interest": (decimal),
  }
}
@]

This @@interest@@ field indicates the amount that the @@amount@@ field on the same @@receipt-redeem@@ message has been adjusted by due to accumulated interest since the last transaction.  It may be a positive or a negative amount.  Either partner may make a dummy payment with a zero amount to the other partner in order to trigger an interest update. 

Implementations must take into account leap years as having 366 days when calculating accumulated interest between transactions based on the specified annual rate.  If the annual rate was changed at some point between transactions, that must also be taken into account, by applying the first rate to the period before the change, and the second rate to the period after the change.
Added lines 1-26:
The Account Extension provides a simple accounting system for creating a neighbour connection where no current formal account exists between node owners, or the existing account would be awkward to integrate with the Ripple core payment protocol (eg, it is not kept electronically).

'''Account Data Structure'''

[@
{
  "account": {
    "balance": (decimal)
    "initiator": {
      ("limit": (decimal))
    },
    "partner": {
      ("limit": (decimal))
    },
    "precision": (integer),
    ("interest-rate": (decimal),)
    ("compounding-period": (integer | "monthly" | "yearly"),)
    ("agreement": (string))
  }
}
@]

'''Notes:'''

* these are in addition to core fields
* balance is immutable by direct account-sets, it is a synthetic field calculated from past transactions plus interest