# Mint stable credit

## Parameters

| Name               | Description                                                                 | Required? | Validation                                                                                                 |
| ------------------ | --------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
| `AssetCode`        | The name of your custom asset.                                              | Yes       | <p></p><ul><li>Unique for trusted partner.</li><li>Correct format (1-7 alphanumeric characters).</li></ul> |
| `collateralAmount` | The amount of collateral that you which to exchange into the stable credit. | Yes       | <ul><li>Must be a positive number greater than 0 and has less than or equal to 7 decimal places </li></ul> |

{% tabs %}
{% tab title="GO SDK" %}

```go
package main

import (
	"context"
	"github.com/velo-protocol/DRSv2_Evrynet/libs/vclient"
	"log"
)

func main() {

	client, err := vclient.NewClient("<evrynet rpc>", "<account private key>", ContractAddress{
		DrsAddress:   "<drs address>",  
		HeartAddress: "<heart address>", 
	})

	if err != nil {
		panic(err)
	}

	result, err := client.MintFromCollateralAmount(context.Background(), &MintFromCollateralAmountInput{
		AssetCode:        "vUSD",
		CollateralAmount: "100",
	})
	if err != nil {
		panic(err)
	}

	log.Println("Mint From Collateral Amount Transaction Hash: ", result.Tx.Hash().String())
	log.Println("Asset Address: ", result.Event.AssetAddress)
	log.Println("Asset Code: ", result.Event.AssetCode)
	log.Println("Collateral Amount: ", result.Event.CollateralAmount)
	log.Println("Collateral Asset Code: ", result.Event.CollateralAssetCode)
	log.Println("Stable Credit Amount: ", result.Event.StableCreditAmount)
}

```

{% endtab %}
{% endtabs %}

## What's next?

You now have stable credit. Play around with it! When you are ready, you can redeem the collateral back.
