Depositing Stablecoins
Last updated
Last updated
ERC20 stablecoins (e.g. UST) can be redeemed to receive ERC20 aTerra using the below endpoints:
POST
https://eth-api.anchorprotocol.com/api/v1/init_deposit_stable
POST /api/v1/init_deposit_stable
allows you to fabricate an unsigned Ethereum Tx payload that initiates a stablecoin deposit request. You can sign the Tx payload transaction yourself and broadcast to the Ethereum network, or broadcast via any custodian API that supports signing a raw Tx payload.
Note that only one init_deposit_stable
operation can take place at the same time; even if you successfully broadcast the resulting Tx to the network, the EthAnchor Account contract will block any subsequent operations (including stablecoin redemptions) until an ongoing stablecoin deposit request is finished with finish_deposit_stable
.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
POST
https://eth-api.anchorprotocol.com/api/v1/finish_deposit_stable
POST /api/v1/finish_deposit_stable
allows you to finish a previously requested deposit stable operation.
This endpoint returns an unsigned Ethereum transaction payload. You can sign the transaction yourself and send to the network, or broadcast using any custodian API that supports signing a raw Tx payload.
GET
https://eth-api.anchorprotocol.com/api/v1/deposit_stable_status
GET /api/v1/deposit_stable_status
allows you to check the status of an ongoing deposit_stable
operation.
You may want to periodically check the progress of your deposit_stable
request, since an operation may take up to minutes due to congestion on the Ethereum network.
Please note that status being "finished"
does NOT mean you have run a full cycle of deposit_stable
operation; you still need to send another transaction from POST /api/v1/finish_deposit_stable
to finalize your operation.
This endpoint responds with HTTP 204 when there is no ongoing operation.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Endpoint
Method
Description
POST
Initiates the deposit of ERC20 stablecoins
POST
Claims minted ERC20 aTerra
GET
Gets status of an ongoing stablecoin deposit request
Authentication
string
Anchor client key.
stable_denom
string
Denomination of stablecoin to deposit
Example: "uusd"
stable_amount
string
(uint256) Amount of stablecoins to deposit to Anchor in 18 decimals.
Authentication
string
Anchor client key.api/
Authentication
string
Anchor client access key.