Title: Sidechain Gluwacoin Standard
Author: Tae Lim Oh <[email protected]>
Type: Standard
Created: 2020-10-19
A standard interface for 2-way pegged Gluwacoin deployed on a sidechain.
The following standard allows the implementation of a standard API for Gluwacoin with two gatekeepers: Gluwa and Luniverse. A user on the Ethereum network can peg his or her Gluwacoin to a gateway contract. Gatekeepers verify if Gluwacoin is pegged on the Ethereum network. If both Gatekeepers approves the peg, Gluwa can mint the Gluwacoin to the user on Luniverse. The user can burn his or her balance when wants to return to the Ethereum network. The user will submit the transaction ID of the burn to the gateway contract on the Ethereum network. This standard is Gluwacoin compatible, and, thus, ERC-20 compliant.
A standard interface to add any sidechain to the Gluwa ecosystem.
Gluwacoin Standard has extended on ERC-20 to enhance usability. ETHless transfer freed users from buying Ether before they can start using a dapp. Non-custodial exchange functions allow users to make exchange without giving up custody of their fund and access a pool of orders instead of taking a whole order at a time. Again, without buying Ether. Also, Gluwa provides a suite of web services to ease on-boarding, including REST API, mobile apps (iOS, Android), and dashboard.
NOTE: Callers MUST handle false
from returns (bool success)
.
Callers MUST NOT assume that false
is never returned!
Creates a peg object in sender
address.
The amount of the peg is amount
and each peg has txnHash
which is unique.
A peg represents a Gluwacoin deposit to the Luniverse Gluwacoin Gateway contract.
function peg(bytes32 txnHash, uint256 amount, address sender)
Approves a peg object in sender
address.
The peg is specified by txnHash
.
Reserved for the Gluwa
role.
function gluwaApprove(bytes32 txnHash)
Approves a peg object in sender
address.
The peg is specified by txnHash
.
Reserved for the Luniverse
role.
function luniverseApprove(bytes32 txnHash)
Creates amount
tokens to the sender
of the peg
specified by txnHash
.
Note
- the
peg
must be Gluwa Approved and Luniverse Approved. - the caller must have a
Gluwa
role orLuniverse
role.
function mint(bytes32 txnHash)
Returns if the account
has Gluwa role or not.
function isGluwa(address account)
Assign Gluwa role to the account
.
Note
- the caller must have a
Gluwa
role.
function addGluwa(address account)
Remove Gluwa role from the account
.
Note
- the caller must have a
Gluwa
role.
function removeGluwa(address account)
The caller renounces Gluwa role.
Note
- the caller must have a
Gluwa
role.
function renounceGluwa()
Returns if the account
has Luniverse role or not.
function isLuniverse(address account)
Assign Luniverse role to the account
.
Note
- the caller must have a
Luniverse
role.
function addLuniverse(address account)
Remove Luniverse role from the account
.
Note
- the caller must have a
Luniverse
role.
function removeLuniverse(address account)
The caller renounces Luniverse role.
Note
- the caller must have a
Luniverse
role.
function renounceLuniverse()
Refer to Gluwacoin for general Gluwacoin methods and events.
Copyright and related rights waived via CC0.