Per-position accounting
A new swap must not reset the lock for an older position. Amount, destination and unlock time are recorded together.
Case 04 · Solidity · Token conversion & claims
Solidity contracts for PHL swaps and locked token claims.
PHL holders swap on Polygon and claim destination tokens after a lock. I built the Solidity swap and receipt contracts, per-position locks, Merkle claims with duplicate-claim protection and wallet interface. The public BSC demo pays TGIVE after ten minutes.
Deployed the public interface, Polygon swap and receipt contracts, and a funded BSC demo claim contract. Demo parameters: a ten-minute lock and TGIVE destination token.
Each swap needs its own destination and unlock time. Multiple positions from the same wallet must remain independently claimable, even when their amounts and timestamps are identical.
Built positions with their own amount, destination and unlock time. New swaps preserve older positions’ locks.
Built proof verification, unlock checks and claimed-leaf tracking. The position index allows identical positions to be claimed once each.
Built wallet pairing, on-chain agreements and position views; deployed Polygon contracts and funded the BSC demo claim contract.
The wallet signs the acknowledgement and records the document hash before the swap. Personal information is not written as plain text on-chain.
Document hash + wallet signatureThe acknowledgement is tied to the wallet and document version.The swap creates a position carrying its amount, destination chain and unlock time. The interface reads positions directly from the contract.
PositionOpened → positionsOfThe lock belongs to the position, not the whole wallet.A snapshot becomes a Merkle root published to the destination claim contract by its administrator.
account + positionIndex + amount + unlockAtThe position index distinguishes otherwise identical positions.After the position unlocks, the contract verifies its proof, marks the leaf as claimed and sends the destination tokens to the recipient.
MerkleProof → claimedLeaf → transferAn already-claimed leaf cannot pay a second time.A new swap must not reset the lock for an older position. Amount, destination and unlock time are recorded together.
The administrator publishes the snapshot root. This is a snapshot-based conversion system, not a trustless bridge.
Public demo interface. Inspect without connecting a wallet or making a transaction.

Based on contract source, deployment handoff and the publicly accessible demo. Contract and product links identify the implementation artifacts.
Demonstration configuration: ten-minute lock and TGIVE demo token on BSC. This is not represented as the final production rollout.