SDK and Contract Operations
Raphael contracts can be integrated with standard ABI clients. Use Raphael's verified ABIs and addresses; upstream interfaces are useful references, but they are not deployment records.
Basic liquidity
A typical add-liquidity flow is:
- read token decimals and pool state;
- call the router's quote function for the intended deposit;
- compute minimum accepted amounts from an explicit slippage policy;
- approve the router;
- call the appropriate add-liquidity function with a future deadline.
Basic pool positions are normally fungible ERC-20 LP tokens.
To remove liquidity, ensure the router can spend the LP tokens and pass minimum token outputs.
Basic-pool fees and staking
Depending on the deployed interfaces:
- claim unstaked LP fees from the pool or fee contract;
- approve the gauge to spend LP tokens;
- stake with the gauge deposit function;
- unstake with the gauge withdrawal function;
- claim emissions using the gauge reward function.
The economic consequences of staking are covered in Fees, Staking and Gauges.
Concentrated positions
A concentrated-liquidity flow normally uses the nonfungible position manager:
- resolve token order, current price and tick spacing;
- choose valid lower and upper ticks;
- estimate token amounts;
- approve both tokens;
- mint an ERC-721 position;
- optionally approve and deposit the token ID into a compatible gauge.
Collect fees before burning an empty position. A position can generally be burned only after liquidity, fees and gauge rewards have been handled.
Transaction safety
Every state-changing integration should:
- verify chain ID
4663or46630as intended; - use checksummed verified addresses;
- set deadlines;
- set minimum outputs;
- simulate before submission;
- handle ERC-20 tokens with non-standard return values carefully;
- wait for a suitable confirmation policy;
- surface revert reasons and the submitted transaction hash.