✔️How to create a bank
Last updated
Last updated
You can create a new custom Bank using the BankFactory contract. This process involves calling the createBank
function and specifying various parameters to configure the initial settings of the Bank.
Parameter | Type | Description |
---|---|---|
Bank
: The address of the newly created Bank contract
initialFee
should be a value between 0 and 1000 (0% - 10%).
minDelay
should be set carefully. Too short may pose security risks, while too long may cause operational inconvenience. (minimum: 600 seconds)
If creating a Private Bank (type: 1), subsequent whitelist management will be necessary.
After creating the Bank, you need to add the required Markets and set allocations.
A BankCreated
event is emitted when a Bank is created:
You can monitor this event to track the creation of new Banks.
After creating a Bank, you can use its address to perform additional setup and management operations.
asset
IERC20
The address of the base asset (token) to be used in the Bank
name
string
The name of the Bank
symbol
string
The symbol of the Bank
initialFee
uint256
Initial fee setting (max 1000, which represents 10%)
initialFeeRecipient
address
The initial address to receive fees
minDelay
uint256
Minimum delay for timelock operations (in seconds)
bankType
IBank.BankType
Type of the Bank (Public or Private)