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
We want to facilitate trustless swapping of starnames for IOV tokens. "Trustless" means that the seller doesn't have to trust that the buyer will send the tokens after the seller sends the starname. Similarly, the buyer doesn't want to send the tokens directly to the seller since the seller could just keep both the starname and the tokens. The solution is to use an escrow - a third party to the deal.
Determine if the escrow should be a module unto itself or be embedded within the starname module. Prefer embedding the tech within the starname module. Let's discuss.
Use cosmos-sdk-crud for access to the KV store as long as it's not insane to do so.
Swap requirements:
A swap should be initiated by the seller by sending the starname to an escrow account along with its price and swap expiration date.
If a buyer sends IOV tokens to the escrow account that meet or exceed the seller's price then the ownership of the starname should be transferred to the buyer.
If the buyer sends more than the seller's price then the excess should be returned to the buyer.
If the buyer sends less than the seller's price then the transaction should fail.
If no one buys the starname before the swap expiration date then the seller should be able to reclaim their starname by sending a "return" message to the escrow.
Anyone, not just the seller, can initiate the return of a starname from an expired escrow.
Make sure that the deadline does not exceed the starname expiration date
The text was updated successfully, but these errors were encountered:
If no one buys the starname before the swap expiration date then the seller should be able to reclaim their starname by sending a "return" message to the escrow.
I think this should be handled automatically in the BeginBlocker() call
davepuchyr
changed the title
Add escrow functionality to the starname module
Add a swap module for exchanging starnames and tokens
Jun 2, 2021
We want to facilitate trustless swapping of starnames for IOV tokens. "Trustless" means that the seller doesn't have to trust that the buyer will send the tokens after the seller sends the starname. Similarly, the buyer doesn't want to send the tokens directly to the seller since the seller could just keep both the starname and the tokens. The solution is to use an escrow - a third party to the deal.
Leverage as much technology as possible from https://github.com/iov-one/weave/tree/master/x/escrow.
Swap requirements:
The text was updated successfully, but these errors were encountered: