Initial commit
This commit is contained in:
53
docs/zagros/withdraw-deposit-limitation/limitation.md
Normal file
53
docs/zagros/withdraw-deposit-limitation/limitation.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# KYC withdraw, deposit limitation
|
||||
###### Sprint: 4
|
||||
[first read](../../../docs/peatio/withdraw_limits.md)
|
||||
### Outcome:
|
||||
each user's withdrawing and deposit for executing must not be reached to daily or monthly limitation
|
||||
|
||||
|
||||
### Implementation description:
|
||||
|
||||
|
||||
#### File destination:
|
||||
{$Dena_Path}/app/models/deposit.rb<br />
|
||||
{$Dena_Path}/app/models/withdraw.rb<br />
|
||||
{$Dena_Path}/app/models/deposit_limit.rb<br />
|
||||
{$Dena_Path}/app/models/withdraw_limit.rb<br />
|
||||
{$Dena_Path}/app/models/withdraws/fiat.rb<br />
|
||||
{$Dena_Path}/app/models/deposits/fiat.rb<br />
|
||||
{$Dena_Path}/db/migrate/20210504102945_add_kind_to_withdraw_limits.rb<br />
|
||||
{$Dena_Path}/db/migrate/20210504102945_add_kind_to_withdraw_limits.rb<br />
|
||||
|
||||
|
||||
#### Commits:
|
||||
7d4bd576<br/>
|
||||
d436176b
|
||||
|
||||
#### What did we implement:
|
||||
in the Opendax, withdrawal limitation was handled by a model named `WithdrawLimit`,
|
||||
but for deposit limitation, there was no way.<br />
|
||||
so by following existence rules, we create a new model and called it `DepositLimit` with the same columns,
|
||||
and those columns are :
|
||||
|
||||
|
||||
| Name | Type | Description |<br/>
|
||||
| ---- | ---- | ----------- |<br/>
|
||||
| id | integer | Unique table identifier in database. |<br/>
|
||||
| group | string | Member group for define limits. |<br/>
|
||||
| kyc_level | string | KYC level for define limits.|<br/>
|
||||
| limit_24_hour | double | 24 hours limit. |<br/>
|
||||
| limit_1_month | double | 1 month limit. |<br/>
|
||||
|
||||
and also we added a new column to the mentioned models by name: `kind` to support `fiat` and `coin` limitation<br/>
|
||||
| Name | Type | Description |<br/>
|
||||
| ---- | ---- | ----------- |<br/>
|
||||
| kind | integer | Withdraw or Deposit kind (coin or fiat).|<br/>
|
||||
|
||||
before creation a withdrawal or deposit record by the user,
|
||||
we implemented a new function called `verify_limits` that check the user reached limitation or not,
|
||||
then permit the new withdraw or deposit record to be created.
|
||||
|
||||
### TODO
|
||||
implement admin side include APIs (tower panel) for deposit limitation part
|
||||
|
||||
|
||||
Reference in New Issue
Block a user