Skip to Content
GuidesSplit, redemption, lock issuance

Split, redemption, lock issuance

A fresh asset for this guide, so the Quickstart’s asset is left as it is.

1. A new asset, part of it with the investor

R=$(alias_tx asset create-asset ECONOMIC --settlement-denom aeusd --from issuer) CA=$(wait_tx "$(jq -r .txhash <<<"$R")" | created_asset) R=$(alias_tx rights issue "$CA" 0 "$ISSUER" 1000 --from issuer); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null R=$(alias_tx rights transfer "$INVESTOR" "$CA" 0:100 --from issuer); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null echo "asset: $AEVA_EXPLORER/assets/$CA"

2. A 4-for-1 split

R=$(alias_tx waterfall split "$CA" 0 4 --from issuer); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null aevad query rights position "$CA" 0 "$INVESTOR" --node "$AEVA_NODE" -o json | jq -r '"raw \(.position.units), effective \(.effective_units), multiplier \(.multiplier)"'
Expected output
raw 100, effective 400, multiplier 4

From now on, amounts in messages are effective and must be a multiple of 4:

R=$(alias_tx rights transfer "$ISSUER" "$CA" 0:10 --from investor); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null || true R=$(alias_tx rights transfer "$ISSUER" "$CA" 0:40 --from investor); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null aevad query rights position "$CA" 0 "$INVESTOR" --node "$AEVA_NODE" -o json | jq -r '"raw \(.position.units), effective \(.effective_units)"'
Expected output
tx refused: code 21 (asset): … raw 90, effective 360

3. A redemption pool

The issuer offers to buy units back at 1 000 aeusd (0.001 aeUSD) per raw unit, with 1 aeUSD in the pool, for one hour:

POOL_UNTIL=$(date -u -v+1H +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -d '+1 hour' +%Y-%m-%dT%H:%M:%SZ) R=$(alias_tx waterfall fund-redemption "$CA" 0 1000 1000000aeusd "$POOL_UNTIL" --from issuer); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null R=$(alias_tx waterfall redeem-for-pool "$CA" 0 aeusd 40 --from investor); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null aevad query waterfall redemption-pools "$CA" --node "$AEVA_NODE" -o json | jq -r '.pools[] | "price \(.price_per_unit), funded \(.funded), paid \(.paid)"'
Expected output
price 1000, funded 1000000, paid 10000

Redeeming 40 effective units burned 10 raw units and paid 10 000 aeusd. After the pool closes, the issuer withdraws what is left:

aevad tx waterfall withdraw-redemption "$CA" 0 aeusd --from issuer

4. End issuance

R=$(alias_tx asset lock-issuance "$CA" --from issuer); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null R=$(alias_tx rights issue "$CA" 0 "$ISSUER" 4 --from issuer); wait_tx "$(jq -r .txhash <<<"$R")" >/dev/null || true echo "Issuance locked: $AEVA_EXPLORER/assets/$CA"
Expected output
tx refused: code 18 (asset): …

Locking issuance is irreversible. See Splits and Waterfalls & redemption.

Last updated