You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create main escrow contract and claim/refund interfaces for starknet.
Main escrow contract for starknet, it should be able to:
manage LP vaults (funds deposited to the contract to save on execution steps for LPs)
tracking reputation of LPs
manage escrows:
create escrows funded externally and from LP vaults
claim escrows based on the specified claim handler
refund escrows based on the specific refund handler
cooperatively refund escrows based on signatures from both parties
execute action on claim (TBD)
Claim handler interface
Handles verification for claiming of the escrow, could be hash-lock or proof-lock (utilizing the specific light client contract), with more possible extensions in the future.
Example interface in Solidity
interfaceClaimHandler {
function claim(bytes32claimData, bytescalldatawitness) external;
}
Refund handler interface
Handles verification to determine whether an escrow is refundable, could be time-lock or blockheight-lock, with more possibilities in the future.
Example interface in Solidity
interfaceRefundHandler {
function refund(bytes32refundData, bytescalldatawitness) external;
}
Escrow contract
Responsible for managing escrow funds & LP vault. Each escrow specifies which claim handler and refund handler interface they use, easily allowing HTLC (combination of hash-lock claim handler & blockheight-lock refund handler), PTLC (combination of proof-lock claim handler & blockheight-lock refund handler) & whatever other future locks will be required in the future. Also, escrow state contains the call address and calldata that will be called during claim, this needs to be handled in a "try-catch" block, as to not invalidate the whole claim tx when the claim action fails.
Create main escrow contract and claim/refund interfaces for starknet.
Main escrow contract for starknet, it should be able to:
Claim handler interface
Handles verification for claiming of the escrow, could be hash-lock or proof-lock (utilizing the specific light client contract), with more possible extensions in the future.
Example interface in Solidity
Refund handler interface
Handles verification to determine whether an escrow is refundable, could be time-lock or blockheight-lock, with more possibilities in the future.
Example interface in Solidity
Escrow contract
Responsible for managing escrow funds & LP vault. Each escrow specifies which claim handler and refund handler interface they use, easily allowing HTLC (combination of hash-lock claim handler & blockheight-lock refund handler), PTLC (combination of proof-lock claim handler & blockheight-lock refund handler) & whatever other future locks will be required in the future. Also, escrow state contains the call address and calldata that will be called during claim, this needs to be handled in a "try-catch" block, as to not invalidate the whole claim tx when the claim action fails.
Example escrow struct in Solidity
The text was updated successfully, but these errors were encountered: