# 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
{$Dena_Path}/app/models/withdraw.rb
{$Dena_Path}/app/models/deposit_limit.rb
{$Dena_Path}/app/models/withdraw_limit.rb
{$Dena_Path}/app/models/withdraws/fiat.rb
{$Dena_Path}/app/models/deposits/fiat.rb
{$Dena_Path}/db/migrate/20210504102945_add_kind_to_withdraw_limits.rb
{$Dena_Path}/db/migrate/20210504102945_add_kind_to_withdraw_limits.rb
#### Commits:
7d4bd576
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.
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 |
| ---- | ---- | ----------- |
| id | integer | Unique table identifier in database. |
| group | string | Member group for define limits. |
| kyc_level | string | KYC level for define limits.|
| limit_24_hour | double | 24 hours limit. |
| limit_1_month | double | 1 month limit. |
and also we added a new column to the mentioned models by name: `kind` to support `fiat` and `coin` limitation
| Name | Type | Description |
| ---- | ---- | ----------- |
| kind | integer | Withdraw or Deposit kind (coin or fiat).|
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