Skip to main content

Rules

The three components asset, from, and to are required for every rule.

A transfer allow rule applies to an address-to-address transfer if all of below are true

  • asset match:
    • rule.asset is wildcard ("any/asset"), or
    • rule.asset equals or contains transfer.asset.
  • from match:
    • rule.from is wildcare ("any/address"), or
    • rule.from equals or contains transfer.account, or
    • rule.from equals or contains transfer.address
  • to match: see from match.

In order for a transfer to be allowed, the following must be true:

  • At least one matching ALLOW rule must pass
  • All matching REQUIRE rules must pass
  • All matching DENY rules must fail

Access controls and approval quoroms may be set on transfer rules. Use this to control different roles, users, or approval requirements based on addresses, accounts, and/or assets.

Default addresses

A to filter in a transfer rule may opt to use a default address in a target account by appending /defaults to the account name. This will evaluate to a single address depending on the default address set on the respective Account for the given asset or chain being transferred.

Example: Sending to default address(es) on "coinbase" account.

Account {
"name": "accounts/coinbase",
"defaults": {
"chains/ETH": "chains/ETH/addresses/0xAA",
"chains/ETH/assets/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "chains/ETH/addresses/0xBB"
}
}

If we create a transfer rule with to set to accounts/coinbase/defaults, then this permits sending to default addresses on coinbase account.

If we send USDC to 0xBB, it will be allowed. If we send any other permitted asset to 0xAA, it will be allowed. If we try sending a permitted asset to an address not set as a default, however, it will not be allowed.

Sending USDC to 0xAA in this example would not be allowed, as only the most specific match (USDC matches 0xBB first) will get used as the allowed destination for a given transfer asset.

Notional limits

Transfer amounts may be limited according to supported quote currencies (e.g. USD). Currently USD is the only supported quote currency. Limits may be based on a time period, e.g. to limit to $10M/day.

Prices are updated on Treasury automatically for assets where pricing is known. If you have a transfer rule with a notional limit, and try to make a matching transfer for an asset where pricing is not known, then it will default to reject.