DepositAuth edits per reviews

This commit is contained in:
mDuo13
2018-02-01 13:49:08 -08:00
parent 1298326bd6
commit ec9a124ce3
2 changed files with 58 additions and 23 deletions

View File

@@ -8,7 +8,7 @@ Deposit Authorization is an optional feature of an [account](concept-accounts.ht
Financial services regulations and licenses may require that a business or entity must know the sender of all transactions it receives. This presents a challenge on a decentralized system like the XRP Ledger where participants are identified by pseudonyms which can be freely generated and the default behavior is for any address to be able to pay any other.
The Deposit Authorization flag introduces an option for those using the XRP Ledger to become compliant with such regulations without changing the fundamental nature of the decentralized ledger. With Deposit Authorization enabled, an account can only receive funds it explicitly approves by sending a transaction. The owner of an account using Deposit Authorization can perform the due diligence necessary to identify the sender of any funds _before_ sending the transaction that causes the account to receive the money.
The Deposit Authorization flag introduces an option for those using the XRP Ledger to comply with such regulations without changing the fundamental nature of the decentralized ledger. With Deposit Authorization enabled, an account can only receive funds it explicitly approves by sending a transaction. The owner of an account using Deposit Authorization can perform the due diligence necessary to identify the sender of any funds _before_ sending the transaction that causes the account to receive the money.
Deposit Authorization is intended to be used with [Checks](reference-amendments.html#checks), [Escrow](concept-escrow.html), and [Payment Channels](reference-amendments.html#paychan). In this "two-step" model, first the source sends a transaction to authorize sending funds, then the destination sends a transaction to authorize receiving those funds. Deposit Authorization cannot be used with [Payment transactions][].
@@ -25,14 +25,17 @@ To get the full effect of Deposit Authorization, Ripple recommends also doing th
An account with Deposit Authorization enabled:
- **Cannot** be the destination of [Payment transactions][], with **one exception**:
- If the account's XRP balance is equal to or below the minimum account [reserve requirement](concept-reserves.html), it can be the destination of a Payment whose `Amount` is equal or less than the minimum account reserve (currently 20 XRP). This is to prevent an account from becoming "stuck" by being unable to send transactions but also unable to receive XRP. The account's owner reserve does not matter for this case.
- If the account's XRP balance is equal to or below the minimum account [reserve requirement](concept-reserves.html), it can be the destination of an XRP Payment whose `Amount` is equal or less than the minimum account reserve (currently 20 XRP). This is to prevent an account from becoming "stuck" by being unable to send transactions but also unable to receive XRP. The account's owner reserve does not matter for this case.
- Can receive XRP from [PaymentChannelClaim transactions][] **only if** the sender of the PaymentChannelClaim transaction is the destination of the payment channel.
- Can receive XRP from [EscrowFinish transactions][] **only if** the sender of the EscrowFinish transaction is the destination of the escrow.
- **Can** receive XRP or issued currencies by sending a [CheckCash][] transaction. _(Requires the [Checks amendment](reference-amendments.html#checks).)_
- **Can** receive XRP or issued currencies by sending [OfferCreate transactions][].
- If the account sends an OfferCreate transaction that is not fully executed immediately, it **can** receive the remainder of the ordered XRP or issued currency later when the offer is consumed by other accounts' [Payment][] and [OfferCreate][] transactions.
- If the account has created any trust lines without the [NoRipple flag](concept-noripple.html) enabled, or has enabled the DefaultRipple flag and issued any currency, the account **can** receive the issued currencies of those trust lines in [Payment transactions][] as a result of rippling. It cannot be the destination of those transactions.
- If the account has not created any trust lines with a nonzero limit, and has not issued currency on trust lines created by others, it **cannot** receive any issued currencies in any transaction. (This rule is not specific to the DepositAuth flag.)
- In general, an account in the XRP Ledger **cannot** receive any non-XRP currencies in the XRP Ledger as long as all of the following are true. (This rule is not specific to the DepositAuth flag.)
- The account has not created any trust lines with a nonzero limit.
- The account has not issued currency on trust lines created by others
- The account has not placed any offers.
The following table summarizes whether a transaction type can deposit money with DepositAuth enabled or disabled:
@@ -45,9 +48,9 @@ An account can enable deposit authorization by sending an [AccountSet transactio
## Checking Whether an Account Has DepositAuth Enabled
To see whether an account has Deposit Authorization enabled, use the [`account_info` command](reference-rippled.html#account-info) to look up the account. Compare the value of the `Flags` field (in the `result.account_data` object) with the [boolean flags defined for an AccountRoot ledger object](reference-ledger-format.html#accountroot-flags).
To see whether an account has Deposit Authorization enabled, use the [`account_info` command](reference-rippled.html#account-info) to look up the account. Compare the value of the `Flags` field (in the `result.account_data` object) with the [bitwise flags defined for an AccountRoot ledger object](reference-ledger-format.html#accountroot-flags).
If the result of the `Flags` value boolean-AND the `lsfDepositAuth` flag value (0x01000000) is nonzero, then the account has DepositAuth enabled. If the result is zero, then the account has DepositAuth disabled.
If the result of the `Flags` value bitwise-AND the `lsfDepositAuth` flag value (0x01000000) is nonzero, then the account has DepositAuth enabled. If the result is zero, then the account has DepositAuth disabled.
## See Also

View File

@@ -3,100 +3,124 @@
<tr>
<th>DepositAuth status:</th>
<th colspan="2" class="depauth-status">Disabled</th>
<th class="depauth-spacer">&nbsp;</th>
<th colspan="2" class="depauth-status">Enabled</th>
</tr>
<tr>
<th>Transaction Type</th>
<th>Sent by Destination</th><th>Sent by Others</th>
<th class="depauth-spacer">&nbsp;</th>
<th>Sent by Destination</th><th>Sent by Others</th>
</tr>
</thead>
<tbody>
<tr>
<td class="depauth-txtype">AccountSet</td>
<td colspan="4" class="depauth-na">(This transaction type never sends money.)</td>
<td colspan="5" class="depauth-na">(This transaction type never sends money.)</td>
</tr>
<tr>
<td class="depauth-txtype">CheckCancel</td>
<td colspan="4" class="depauth-na">(This transaction type never sends money.)</td>
<td colspan="5" class="depauth-na">(This transaction type never sends money.)</td>
</tr>
<tr>
<td class="depauth-txtype">CheckCash</td>
<td class="depauth-ok">OK</td>
<td class="depauth-no">No Permission</td>
<td class="depauth-spacer">&nbsp;</td>
<td class="depauth-ok">OK</td>
<td class="depauth-no">No Permission</td>
</tr>
<tr>
<td class="depauth-txtype">CheckCreate</td>
<td colspan="4" class="depauth-na">(This transaction type never sends money.)</td>
<td colspan="5" class="depauth-na">(This transaction type never sends money.)</td>
</tr>
<tr>
<td class="depauth-txtype">EscrowCancel</td>
<td class="depauth-maybe" colspan="4">(Can return XRP from an expired escrow)</td>
<td class="depauth-maybe" colspan="5">Can return XRP from an expired escrow</td>
</tr>
<tr>
<td class="depauth-txtype">EscrowCreate</td>
<td colspan="4" class="depauth-na">(This transaction type can only debit XRP, not credit it.)</td>
<td colspan="5" class="depauth-na">(This transaction type can only debit XRP, not credit it.)</td>
</tr>
<tr>
<td class="depauth-txtype">EscrowFinish</td>
<td class="depauth-ok">OK</td>
<td class="depauth-ok">OK</td>
<td class="depauth-spacer">&nbsp;</td>
<td class="depauth-ok">OK</td>
<td class="depauth-maybe">No Permission</td>
</tr>
<tr>
<td class="depauth-txtype">OfferCancel</td>
<td colspan="4" class="depauth-na">(This transaction type never sends money.)</td>
<td colspan="5" class="depauth-na">This transaction type never sends money.</td>
</tr>
<tr>
<td class="depauth-txtype">OfferCreate</td>
<td class="depauth-ok">OK</td>
<td class="depauth-maybe">(Only if account previously created a matching offer)</td>
<td class="depauth-maybe">Only if account previously created a matching offer</td>
<td class="depauth-spacer">&nbsp;</td>
<td class="depauth-ok">OK</td>
<td class="depauth-maybe">(Only if account previously created a matching offer)</td>
<td class="depauth-maybe">Only if account previously created a matching offer</td>
</tr>
<tr>
<td class="depauth-txtype">Payment (if account has no trust lines or offers)</td>
<td class="depauth-maybe">(Cross-currency payments only)</td>
<td class="depauth-txtype">Payment <div class="depauth-subtype">(If account has more than the minimum XRP reserve, enables NoRipple on all trust lines, and places no offers)</div></td>
<td class="depauth-maybe">Cross-currency only</td>
<td class="depauth-ok">OK</td>
<td class="depauth-spacer">&nbsp;</td>
<td class="depauth-no">No Permission</td>
<td class="depauth-no">No Permission</td>
</tr>
<tr>
<td class="depauth-txtype">Payment (if account has trust lines or offers)</td>
<td class="depauth-maybe">(Cross-currency payments only)</td>
<td class="depauth-txtype">Payment <div class="depauth-subtype">(If account XRP balance is below the minimum XRP reserve)</div></td>
<td class="depauth-maybe">Cross-currency only</td>
<td class="depauth-ok">OK</td>
<td class="depauth-spacer">&nbsp;</td>
<td class="depauth-maybe">Cross-currency payments delivering XRP up to the minimum reserve <!--{# TODO: double-check this #}-->}</td>
<td class="depauth-maybe">XRP payments up to the minimum reserve</td>
</tr>
<tr>
<td class="depauth-txtype">Payment <div class="depauth-subtype">(If account has any trust lines with NoRipple disabled)</div></td>
<td class="depauth-maybe">Cross-currency only</td>
<td class="depauth-ok">OK</td>
<td class="depauth-spacer">&nbsp;</td>
<td class="depauth-no">No Permission</td>
<td class="depauth-maybe"><b>(TODO: Maybe By consuming offers or rippling?)</b></td>
<td class="depauth-maybe">Balance changes from rippling</td>
</tr>
<tr>
<td class="depauth-txtype">Payment <div class="depauth-subtype">(If account has placed offers)</div></td>
<td class="depauth-maybe">Cross-currency only</td>
<td class="depauth-ok">OK</td>
<td class="depauth-spacer">&nbsp;</td>
<td class="depauth-no">No Permission</td>
<td class="depauth-maybe">Balance changes from executing offers</td>
</tr>
<tr>
<td class="depauth-txtype">PaymentChannelClaim</td>
<td class="depauth-ok">OK</td>
<td class="depauth-ok">OK</td>
<td class="depauth-spacer">&nbsp;</td>
<td class="depauth-ok">OK</td>
<td class="depauth-no">No Permission</td>
</tr>
<tr>
<td class="depauth-txtype">PaymentChannelCreate</td>
<td colspan="4" class="depauth-na">(This transaction type can only debit XRP, not credit it.)</td>
<td colspan="5" class="depauth-na">(This transaction type can only debit XRP, not credit it.)</td>
</tr>
<tr>
<td class="depauth-txtype">PaymentChannelFund</td>
<td class="depauth-maybe" colspan="4">(Can return XRP when closing a channel created by self)</td>
<td class="depauth-maybe" colspan="5">Can return XRP when closing a channel created by self</td>
</tr>
<tr>
<td class="depauth-txtype">SetRegularKey</td>
<td colspan="4" class="depauth-na">(This transaction type never sends money.)</td>
<td colspan="5" class="depauth-na">(This transaction type never sends money.)</td>
</tr>
<tr>
<td class="depauth-txtype">SignerListSet</td>
<td colspan="4" class="depauth-na">(This transaction type never sends money.)</td>
<td colspan="5" class="depauth-na">(This transaction type never sends money.)</td>
</tr>
<tr>
<td class="depauth-txtype">TrustSet</td>
<td colspan="4" class="depauth-na">(This transaction type never sends money.)</td>
<td colspan="5" class="depauth-na">(This transaction type never sends money.)</td>
</tr>
</table>
@@ -119,4 +143,12 @@
.depauth-maybe {
background-color: #ffa;
}
.depauth-subtype {
font-weight: normal;
font-size: 8pt;
}
.depauth-spacer {
width: 10px;
background-color: #999;
}
</style>