Pulse Markets

NEAR Protocol

Pulse Markets are originally designed to work with the NEAR Protocol
Since the main market logic is written in Rust, it could be implemented to work with other protocols in the future.
A suite of 4 contracts interface with the UI in order to create an efficient and economically appealing experience for the end user.
A few things to know:
  • Each event requires its own Market contract
  • A market contract is aware of the balances of each bettor for each outcome
    • Yet, each bettor money is held in escrow using the selected NEP141 fungible token
      • USDT.e is set as the default NEP141 stablecoin
      • All arithmetic operations employ uint128 fixed-point decimals
      • Bettors money can only be withdrawn by transferring out the USDT.e held in the NEP141 contract. The owner of this balance held in escrow in the market contract until the event is resolved
      • Technically speaking, to place a bet, a user calls ft_transfer_call on the predefined NEP141 fungible token to transfer their bet to the active market contract, then the NEP141 calls ft_on_transfer on the receiver market contract to buy an outcome
      • Each buy transaction charges a 2% of the input amount. This is not refundable and the fees get sent to the Pulse DAO to maintain the project
  • Each market contract account is created by a single Market Factory contract
    • To create a market for an event, someone, anybody, has to deploy it. In other words, pays to create it
    • Current price starts at ~4.0 NEAR. This payment covers the storage costs and is paid with the NEAR native currency and it can be recovered after the market is over and the claiming period has ended or the market turns out unresolved
  • A market is resolved only by a call from the authorized Switchboard Resolver contract
    • This contract is the oracle of the market event outcome
      • Currently, it only resolves for price outcomes. eg. The price of the BTC/USDT pair
    • It checks for the winning outcome at the market event ends_at timestamp
    • Once a market is resolved, winning bettors can claim their earnings