How To Guides
How to apply limits to a wallet
Date | Responsible | Changes |
---|---|---|
March 11, 2024 | @Omar Monterrey | Initial version |
Applying limits
A wallet can hold balance in multiple symbols. By default this balance is only limited to be at least 0. Limits allow wallets to have negative balance up to an specified amount or to have an upper limit, for example.
In order to apply limits to a wallet an intent
with valid limit
claims needs to be executed. For example, in order to allow wallet bank
to have negative balance up to -200
, for the symbol usd
, the metric minBalance
should be limited to -200
with an intent that looks like this:
For -200 usd the amount is -20000 because of a factor of 100
Or using the ledger sdk
Available metrics for limiting
Name | Description | Default |
---|---|---|
minBalance | Lowest balance this wallet can hold | 0 |
maxBalance | Highest balance this wallet can hold | N/A |
dailyCount | Maximal number of transfers this wallet can do in a 24 hours timeframe | N/A |
dailyAmount | Maximal cumulative amount this wallet can transfer in a 24 hours timeframe. This includes both receiving and sending. | N/A |