Skip to main content

Funding Accounts

You will use USDF API endpoints to the DCC Middleware to give registered Provenance Blockchain addresses USDF. This simulates a conversion from Fiat at a user's bank account at your institution to the USDF coin. It is expected that your bank middleware restricts access to the Fiat that backs the USDF minted by your coin to prevent the possibility of double spend.

Funding Sequence

1. Mint to Account

You can now call the DCC middleware to mint to a Provenance Blockchain account.

Mint using the POST /api/v1/mints endpoint. Ensure the bankAccountUUID is the same uuid specified during registration. The uuid is an idempotency identifier to prevent double mints.

curl -X POST "http://localhost:8080/digital-currency-consortium/api/v1/mints" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "{ \"amount\": 500, \"bankAccountUUID\": \"e2ab9433-6a6b-4b23-aff4-8c4026120cec\", \"uuid\": \"98ed07e9-39e9-4d47-af48-e801a8a2d086\"}"

The human-readable payload is:

{
"amount": 500,
"bankAccountUUID": "e2ab9433-6a6b-4b23-aff4-8c4026120cec",
"uuid": "98ed07e9-39e9-4d47-af48-e801a8a2d086"
}

The DCC middleware will asynchronously broadcast a transaction against the smart contract to mint USDF, backed by your bank, and transfer it to the specified registered account.

2. Confirm Balance

If you want to confirm that the registered account has the minted coin, query the CLI.

provenanced q bank balances tp1snzxllsxggj6mt3kuz35tqs3zqppz54t3xpdeh -t -o json | jq
{
"balances": [
{
"denom": "nhash",
"amount": "98000000000"
},
{
"denom": "usdf.local",
"amount": "50000"
}
],
"pagination": {
"next_key": null,
"total": "0"
}
}

The Provenance Blockchain account you minted to should have an equivalent amount of USDF coin in cents.

3. Transfer USDF

The user3 key pair can now send USDF to other AML/KYC'ed Provenance Blockchain accounts in the Provenance ecosystem.

See transfer CLI command to move USDF from user3 to user1 or user2 or another bank.