Skip to content

Latest commit

 

History

History
77 lines (43 loc) · 5.02 KB

CHANGELOG.md

File metadata and controls

77 lines (43 loc) · 5.02 KB

Magic Protocol Web App

1.0.0

Major Changes

  • a3c8d89: The Magic Protocol web app is now built for version 2 of the Magic protocol. Improvements include segwit capabilities, less transactions, and improved security.

Minor Changes

  • 58c2d4b: Adds validation to an inbound's swap expiration to ensure it doesn't expire too far in the future.

Patch Changes

  • c877f7b: Fixes issues with Gaia hub integration due to domain migration

0.5.0

Minor Changes

  • 6e076a7 Thanks @dumbledope! - Fixed an issue where validating outbound swap expiry used block-height instead of burn-block-height.

    In bridge.clar, outbound swaps have a created-at field which is set when the swap is initiated. This field represents the burn block height where the swap transaction was confirmed.

    In the revoke-outbound-swap function, there is validation to ensure that the swap has expired (200 blocks have passed). Unfortunately, this function was checking the Stacks block height, not the burn block height.

    While not exploitable, this unfortunately would prevent users from revoking outbound swaps in production environments. This is because a Stacks block height is thousands of blocks lower than burn chain heights - meaning it would take years for a swap to "expire".

    The fix was to change line 759 in bridge.clar to use burn-block-height instead of block-height.

  • 3027586 Thanks @dumbledope! - Added better print events to major contract calls, which allows for better off-chain monitoring.
  • 515f698 Thanks @dumbledope! - Updated the project to use the official xBTC contract, using Clarinet requirements for development.

0.4.0

Minor Changes

  • #11 30d6fd4 Thanks @dumbledope! - In escrow-swap, validate that the tx-sender is equal to the swapper. This ensures that min-to-receive is specified by the end user.

Patch Changes

  • af53850 Thanks @dumbledope! - Adds a revoke-expired-inbound function. This is used after an inbound swap is expired and not finalized. It will mark the swap as finalized and move funds from escrow back to the supplier.

0.3.0

Minor Changes

  • dd7c72e Thanks @dumbledope! - Removed the update-supplier method in favor of 3 separate methods: update-supplier-fees, update-supplier-name, and update-supplier-public-key.

    Also added docs for the main public-facing functions in the bridge contract.

0.2.0

Minor Changes

  • #1 a965339 Thanks @dumbledope! - - We’ve extended the clarity-bitcoin contract to enable validating BTC transactions that occurred during a Stacks block
    • The new function is called was-tx-mined-prev?
    • Previously, this would lead to users or suppliers being “stuck” in some situations
    • Updated the bridge contract to support this new functionality
    • Tests and code for recovering an inbound swap
      • In rare scenarios, an inbound swap can fail at the “escrow” phase if the supplier runs out of liquidity before the escrow is completed. In this scenario, the swapper needs to wait 500 blocks before recovering their BTC.
    • Contract code for recovering an outbound swap (revoke-expired-outbound-swap)
      • If the supplier never sends BTC to a swapper, a user can recover their xBTC after waiting 1 day.
    • Renamed all operator contract variables to supplier

0.1.1

Patch Changes

  • First version!