Skip to content

Depositing tokens

Guilherme Dantas edited this page Nov 7, 2025 · 7 revisions

The Honeypot application supports two actions: deposits and withdrawals. Anyone can deposit tokens, but only a trusted party can withdraw them. Users who wish to deposit tokens should first be made aware of the involved risks:

Warning

  • For Authority-based deployments, deposited funds may be lost if the authority's private key is stolen or lost.
  • For PRT-based deployments, deposited funds may be lost if...
    • No commitment is submitted to the top tournament during the challenge period, which takes...
      • around 1 week and 1 hour on Ethereum Mainnet.
      • around 9 hours on Ethereum Sepolia.
    • A large-scale Sybil attack is deployed, delaying state settlement for an unreasonable amount of time.

Note

Resource-exhaustion attacks are unlikely in PRT, due to the exponential resource advantage the honest validators have over the attackers. As such, even under large-scale Sybil attacks, safety and decentralization are unaffected.

Users can deposit tokens like so:

  1. Give the ERC-20 portal contract approval for the deposit amount.
To: ERC-20 Token Contract ⚠️
Function: "approve(address,uint256)"
Arguments:
- ERC-20 Portal Contract Address ⚠️
- Deposit Amount
  1. Call the deposit function on the ERC-20 portal contract.
To: ERC-20 Portal Contract ⚠️
Function: "depositERC20Tokens(address,address,uint256,bytes)"
Arguments:
- ERC-20 Token Contract Address ⚠️
- Application Contract Address ⚠️
- Deposit Amount
- "0x"

For the fields with the ⚠️ sign, you can find the appropriate addresses in the Deployments page. These addresses may change depending on the Cartesi Rollups SDK version, Honeypot version, and network.

Clone this wiki locally