Security Model
1
Immutable Destination Addresses (Anti-Rugpull)
This is our most important security feature.
When a vault is created, the Withdrawal Address for the Buyer and the Refund Address for the Seller are hardcoded into the blockchain as immutable variables.
Code Evidence (Tscrow.sol):
address public immutable buyerWithdrawAddress;
address public immutable sellerRefundAddress;
constructor(...) {
// ...
buyerWithdrawAddress = _buyerWithdrawAddress; // Set once, never changes
sellerRefundAddress = _sellerRefundAddress; // Set once, never changes
}2
Pull Payments (Anti-Locking)
We never "push" funds to a user automatically during a logic change. We only update the state (e.g., "Money now belongs to Buyer"). The user must then manually call withdraw().
Why?
Reentrancy Attacks: Sending tokens triggers code execution on the receiver's side. This is a common attack vector.
Denial of Service: If a user deposits from a "blacklisted" address or a contract that reverts transactions, a "Push" system would fail, locking the funds forever. "Pull" ensures the system never gets stuck.
3
Last updated