DEPOSITS AND WITHDRAWALS
//01_ THE COLLATERAL
Paperhands is settled in USDG, the dollar stablecoin issued by Paxos. Every margin, gain, loss, fee, claim and reward is an amount of USDG. No other asset is accepted.
- //ASSET_
- USDG
- //DECIMALS_
- 6 ($1 = 1,000,000 base units)
- //CHAIN_
- 4663
Check the address before you send anything. The exchange contract only ever pulls this token.
//02_ DEPOSITING
USDG supports EIP-2612 permits on this chain, so the app offers two ways to deposit:
- 01Permit. You sign a permit message in your wallet (a signature, not a transaction), then send one transaction,
depositWithPermit(amount, deadline, v, r, s), which approves and deposits in a single step. - 02Approve, then deposit. Two transactions: a classic
approveof the exchange contract on USDG, thendeposit(amount). Useful if your wallet does not sign permits.
If a permit cannot be used (it expired, or someone already submitted it), the contract ignores it and the deposit relies on an existing approval instead; without one, the transaction fails and nothing moves. The contract also checks that it received exactly the amount you deposited.
//03_ BALANCES
| BALANCE | WHAT IT HOLDS | HOW IT MOVES |
|---|---|---|
| Available | free USDG | deposit, withdraw, margin for new positions |
| Locked | margin of open positions and pending opens | returns to available at close or refund |
| Claims | gains waiting in the queue line | collectClaims moves the paid part to available |
| Rewards | USDG earned by your paper | claimRewards moves it to available |
available is everything that is not locked. You can only open a position with margin from available, and you can only withdraw from it. Claims and rewards are yours as soon as they are paid or earned, but you have to collect or claim them before you can withdraw them.
//04_ WITHDRAWING
withdraw(amount) sends any amount up to your available balance back to your wallet, at any time, including while you have open positions. It always pays the address that calls it. A one-click trading key cannot withdraw your funds: called from the key, it would act on the key's own balance, which is zero.
Nobody else can withdraw on your behalf, and no one can freeze, move or seize a balance: the contract has no function for it.
//05_ COSTS
- //DEPOSIT FEE_
- none
- //WITHDRAWAL FEE_
- none
- //GAS_
- paid in ETH to the chain, by your wallet
Credits: hands from Michelangelo, The Creation of Adam (detail), public domain, via Wikimedia Commons. Marks of the markets and integrations belong to their owners (sources, credits).