Skip to content

Add a policy for an automatic release of quarantined transfers Beta

Quarantined transfers need a policy that automates the release of quarantined transfers on child domains.

Note:

Alternatively, you can add a policy for manually releasing quarantined transfers. For more information, see Add a policy for a manual release of quarantined transfers.

To add a policy for automatically releasing quarantined transfers in your Elliptic or Chainalysis integration, complete these steps:

  1. In the left navigation, select Integrations, and on the tile for your compliance solution provider, select Configure.

  2. In the Integration window, next to Add policy for automatic release of quarantined transfers, select Start.
    The Add a policy for automatic release of quarantined transfers window opens, displaying your previously configured risk scores.

    Example using Elliptic integration Policy automatic release quarantined transfers

  3. In the Policy name field, change the name to a unique name of your choosing.

  4. In the Role fields, select the amount of users and the role type from the drop-down list, for example 1 and Admin.

  5. If you want two or more different role types to be required for approving quarantine releases, select the AND condition. If you want either the role you already defined or another role to be required for approving quarantine releases, select OR.

  6. Repeat step 4, for example 1 and Compliance manager.

  7. Optional: If you wish to set up additional conditions that must be met for the approval of quarantined releases workflow, select Add condition and repeat step 4.

  8. When you're done adding all conditions, select Submit for approval.

  9. On your security device or the desktop app, sign the operation. For more information, see Sign intents.

Automate release with the SDK

The policy governs who approves the release of quarantined transfers. Each release is still a v0_ReleaseQuarantinedTransfers intent that someone must submit. To submit release intents from your own service, use the QuarantineReleaseAgent in the SDK.

The agent lists the quarantined transfers in each domain that you name. It reads each transfer again and passes it to a decision function that you supply. If the function approves the release, the agent submits one release intent for the custody account that holds the funds: the recipient account for an incoming transfer, or the sender account for an outgoing transfer. It skips transfers that it has already released, and an error on one transfer doesn't stop the others.

Decide which transfers to release

A quarantine is a compliance hold, so the agent never releases a transfer on its own. You must give it the domains to scan and a decision function. The agent releases a transfer only when the function returns true. If the function returns anything else or throws an error, the transfer stays in quarantine and the agent asks again on the next pass.

The decision function receives a context with the transfer, the custody account ID, the domain ID, and a method that returns the transfer's screening results. Write your own function, or use one that the SDK provides:

DecisionTypeScriptJavaPythonReleases a transfer when
Managed accountsreleaseFromManagedAccounts()QuarantineDecisions.releaseFromManagedAccounts()release_from_managed_accounts()Every sender is an account on the platform. You can limit the senders to a list of account IDs or domain IDs.
Low riskreleaseIfLowRiskQuarantineDecisions.releaseIfLowRisk()release_if_low_riskScreening returned at least one result, and every result is low risk with no errors.
EverythingreleaseAllQuarantineDecisions.releaseAll()release_allAlways. This releases every quarantined transfer in the domains that the agent scans.

For asyncio code in Python, use async_release_from_managed_accounts() and async_release_if_low_risk.

Releasing everything removes the compliance hold

With the releaseAll decision, the agent releases transfers that screening flagged, including transfers to or from sanctioned addresses. Use it only if another control makes the release decision.

The platform doesn't sign transfer records, so the decision function works from data that the SDK can't verify. The managed accounts decision confirms each sender account through a signed account response.

Run the agent

Scope the client to the compliance domain

The agent submits release intents as the user that its configuration authenticates as. If the quarantined accounts are in subdomains of the compliance domain, configure that user in the compliance domain. If the user belongs to the root domain, release intents for those subdomains fail with an UnauthorizedException.

The SDK examples assume a configured client. See Integrate via SDK. The following examples run the agent:

The TypeScript agent takes a configuration rather than a client. The domainIds and decide options are required.

import {
  QuarantineReleaseAgent,
  loadConfiguration,
  releaseFromManagedAccounts,
} from '@ripple/ripple-custody-client-lib-typescript';

const agent = new QuarantineReleaseAgent({
  config: loadConfiguration(),
  domainIds: [domainId],
  decide: releaseFromManagedAccounts({ domainIds: [domainId] }),
  pollIntervalMs: 10_000,
  onRelease: (r) => console.log(`Released ${r.transferId}`),
  onSkip: (transferId, reason) => console.log(`Left in quarantine ${transferId}: ${reason}`),
  onError: (transferId, error) => console.error(transferId, error.message),
});

agent.start();
// On shutdown:
await agent.stop();

To run a single scan instead of polling, call await agent.run(). It returns the transfers released in that pass.

By default, the TypeScript and Python agents record a transfer as released as soon as they submit the release intent. To record it only after the intent executes, set waitExecuted: true (TypeScript) or wait_executed=True (Python).

For a complete program, see example 32 (quarantine release agent). To get the examples, see Examples.