This is a single coin pool implemented with Move that allows you to borrow coins. At the same time users can supply their coins and get some revenue by providing liquidity.
single_pool.move represents a general single-coin pool that satisfies the following characteristics:
- Anyone can create a single coin pool of multiple coin types through
create_pool
- The single currency pool is hosted on the creator's account
- The single currency pool represents root authority through
RootCapability
- The user recharges through the
supply
function and getsWithdrawProof
as proof - Users can withdraw through the
withdraw
function, including throughRootCapability
andWithdrawProof
- External programs can introduce
single_pool
and self-manageRootCapability
andWithdrawProof
for extension
omni_pool.move represents the OminBTC cross-chain single currency pool, which has the following characteristics:
omni_pool
is an extension based onsingle_pool
- The owner of
omni_pool
is responsible for managingRootCapability
, including root permission transfer and upgrade - The owner of
omni_pool
is responsible for managing thewhitelist
, and those in the whitelist can useRootCapability
to withdraw - The user can initiate the
supply|withdraw|borrow|repay|cross
behavior, and the relayer is responsible for the response
aptos move compile --named-addresses coin_pool=<deployer-address>
aptos move test