Loyalty Program
Earn loyalty rewards for consistent usage of Scallop protocol.
Overview
Scallop's loyalty program rewards active users:
- Activity-Based: Rewards based on protocol usage
- Cumulative: Points accumulate over time
- Claimable: Convert points to rewards
How It Works
1. Use Scallop protocol (deposit, borrow, etc.)
2. Earn loyalty points based on activity
3. Points accumulate in your account
4. Claim rewards when ready
Claim Loyalty Revenue
tx = builder.create_tx_block()
# Claim accumulated loyalty rewards
revenue = tx.claim_loyalty_revenue(
vesca_key_id=vesca_key_id # Your veSCA key
)
tx.transfer_objects([revenue], wallet_address)
result = builder.sign_and_send_tx_block(tx)
print(f"Claimed loyalty rewards: {result.digest}")
Query Loyalty Status
Note: The Python SDK (
sui-scallop-sdk>= 0.3.0a1) exposes loyalty reads onScallopQuery:get_loyalty_program_info(s)andget_vesca_loyalty_program_info(s)(per veSCA key).
Loyalty Tiers
| Tier | Points Required | Benefits |
|---|---|---|
| Bronze | 0+ | Base rewards |
| Silver | 10,000+ | +10% rewards |
| Gold | 50,000+ | +25% rewards |
| Platinum | 200,000+ | +50% rewards |
| Diamond | 1,000,000+ | +100% rewards |
These thresholds are unverified — they are not in the Addresses API and not queryable from the Python SDK. Confirm against the Scallop app. Note the curve is steep: Diamond needs 100× the points of Silver for 2× the multiplier. See tier-benefits.md.
Earning Points
Points are earned through various activities:
| Activity | Points per $1 |
|---|---|
| Deposit | 1 point |
| Borrow | 2 points |
| Repay | 1 point |
| Liquidate | 5 points |
| Flash Loan | 3 points |
Also unverified — see loyalty-mechanics.md. Points scale with dollar value, not transaction count, so splitting activity into many small transactions earns the same points for more gas.
Complete Loyalty Flow
from sui_scallop_sdk import ScallopClient
client = ScallopClient(secret_key="...", network="mainnet")
builder = client.create_builder()
query = client.create_query()
# Step 1: Use protocol to earn loyalty points
tx1 = builder.create_tx_block()
market_coin = tx1.supply_quick(10_000_000_000, "sui", client.wallet_address)
tx1.transfer_objects([market_coin], client.wallet_address)
builder.sign_and_send_tx_block(tx1)
print("Deposited 10 SUI - earning loyalty points!")
# Step 2: Claim accumulated rewards
tx2 = builder.create_tx_block()
rewards = tx2.claim_loyalty_revenue(vesca_key_id=vesca_key_id)
tx2.transfer_objects([rewards], client.wallet_address)
builder.sign_and_send_tx_block(tx2)
print("Claimed loyalty rewards!")
Maximize Loyalty Rewards
Active Usage Strategy
def maximize_loyalty(client, amount):
"""Maximize loyalty points through active usage."""
builder = client.create_builder()
# More activity = more points
activities = [
# Deposit
lambda tx: tx.supply_quick(amount, "sui", client.wallet_address),
# Borrow (2x points)
lambda tx: tx.borrow_quick(amount // 2, "usdc", obligation_id, obligation_key),
# Repay
lambda tx: tx.repay_quick(amount // 2, "usdc", obligation_id, client.wallet_address),
]
for activity in activities:
tx = builder.create_tx_block()
result = activity(tx)
if result:
tx.transfer_objects([result], client.wallet_address)
builder.sign_and_send_tx_block(tx)
Auto-Claim Strategy
import time
def auto_claim_loyalty(client, vesca_key_id, interval_hours=24):
"""Periodically claim loyalty rewards."""
builder = client.create_builder()
while True:
try:
tx = builder.create_tx_block()
rewards = tx.claim_loyalty_revenue(vesca_key_id=vesca_key_id)
tx.transfer_objects([rewards], client.wallet_address)
builder.sign_and_send_tx_block(tx)
print("Claimed loyalty rewards")
except Exception as e:
print(f"Error (may be no rewards to claim): {e}")
time.sleep(interval_hours * 3600)
Tier Progression
Tier thresholds for reference:
tier_thresholds = {
'Bronze': 0,
'Silver': 10_000,
'Gold': 50_000,
'Platinum': 200_000,
'Diamond': 1_000_000
}
Note: Loyalty tier and points data is not yet queryable via the Python SDK. Check the Scallop app or TypeScript SDK for current tier status.
Error Handling
| Error | Cause | Solution |
|---|---|---|
NoLoyaltyRewards |
No pending rewards | Use protocol more |
InsufficientPoints |
Below claim threshold | Accumulate more |
References
- Loyalty Mechanics - How loyalty works
- Tier Benefits - Tier rewards