The endpoints are named
withdraw because they are shared across Paxos Labs
yield products. For PAXGy, a withdrawal is a redemption.Step 1: Quote the fee
Do this first. The fee is deducted from the PAXGy you offer, and you need it to size the approval in step 2.feeAmount is authoritative for the amount you passed. The PAXGy redemption fee has two parts: a fixed rate charged on every redemption, plus a variable component that appears only when PAXG trades above its gold peg. That is why the rate is marked dynamic and why you should quote per request rather than caching a percentage.
Step 2: Approve the redemption queue
feeAmount comes back formatted ("0.0035"), not in base units, so convert it against the share token’s decimals before adding it to shareAmount:
shareAmount, because the post-fee math underflows on-chain and the request reverts. Compare in base units, using the converted value above.
Step 3: Prepare the redemption
Parameters
Response
transaction the same way as a mint.
Settlement estimate
estimatedWithdrawalLatency is how long this redemption is expected to take, as a duration string. It is banded by the total PAXG queued for redemption, meaning this order plus the pending orders ahead of it, relative to the PAXG the vault has on hand:
Splitting one large redemption into several smaller ones does not reliably
land them all in the faster band: each order consumes available liquidity for
the ones behind it, so later slices band slower as the queue fills.
Error handling
When the response carriesestimatedWithdrawalLatencyError in place of estimatedWithdrawalLatency, the transaction is still returned and can be broadcast as usual. The error object has the same code, message and status fields as the API’s other error responses.
Check for the presence of estimatedWithdrawalLatencyError rather than parsing its message.
Step 4: Track the request
status:
You can also filter on it directly:
Next
Minting
Deposit PAXG and receive PAXGy.
Cross-chain
Move PAXGy between Ethereum and X Layer.