pendulum-chain / pendulum-prototype

Pendulum prototype: Second Layer Network for Stellar and the DeFi ecosystem
MIT License
10 stars 6 forks source link

Withdrawal #22

Closed andywer closed 3 years ago

andywer commented 3 years ago

Implementation of withdrawals from Pendulum to Stellar.

Limitations

How to use it

After a couple of seconds the Stellar account with the same public key as the withdrawing Pendulum account should have received the payout. The Pendulum account's balance should have been deducted.

andywer commented 3 years ago

Just thought about it and we should probably change the withdrawal code, so that the withdrawal amount is only deducted from the Pendulum account at the very end of the process when we know that the payout transaction on Stellar has been successful. Might need to block that amount of the balance between withdrawal initiation and settlement or re-mint those funds in case of failure.

Anyway, good enough as a proof of concept for now. Still need to fix those new merge conflicts, though.